Function report |
Source Code:block\bsg-lib.c |
Create Date:2022-07-28 17:38:24 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:bsg_transport_complete_rq
Proto:static int bsg_transport_complete_rq(struct request *rq, struct sg_io_v4 *hdr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct request * | rq | |
struct sg_io_v4 * | hdr |
78 | job = lk_mq_rq_to_pdu - cast a request to a PDU*@rq: the request to be casted* Return: pointer to the PDU* Driver command data is immediately after the request. So add request to get* the PDU. |
79 | ret = 0 |
85 | [o] {SCSI: command completion status} = result & 0xff |
86 | [o] 0 -> ok = host_byte(result) |
87 | [o] 0 -> ok = driver_byte(result) |
88 | [o] additional information = 0 |
89 | If [o] {SCSI: command completion status} || [o] 0 -> ok || [o] 0 -> ok Then [o] additional information |= something abnormal happened |
93 | If result < 0 Then |
99 | If reply_len && [i], [*o] {SCSI: (auto)sense data} Then |
100 | len = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value( [i] in bytes , reply_len) |
102 | If copy_to_user(uptr64( [i], [*o] {SCSI: (auto)sense data} ), reply, len) Then ret = -EFAULT |
104 | Else [o] bytes of response actually written = len |
111 | If BIDI support Then |
112 | rsp_len = payload_len |
114 | If WARN_ON(reply_payload_rcv_len > rsp_len) Then [o] din_xfer_len - actual_din_xfer_len = 0 |
118 | Else |
122 | Return ret |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |