Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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 activityDownload SCCTChinese

Name:bsg_transport_complete_rq

Proto:static int bsg_transport_complete_rq(struct request *rq, struct sg_io_v4 *hdr)

Type:int

Parameter:

TypeParameterName
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
91  [o] bytes of response actually written = 0
93  If result < 0 Then
95  reply_len = sizeof(u32)
96  ret = result
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
109  [o] dout_xfer_len - actual_dout_xfer_len = 0
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
116  Else [o] din_xfer_len - actual_din_xfer_len = rsp_len - reply_payload_rcv_len
118  Else
119  [o] din_xfer_len - actual_din_xfer_len = 0
122  Return ret