Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bsg.c Create Date:2022-07-28 17:37:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:bsg_scsi_complete_rq

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

Type:int

Parameter:

TypeParameterName
struct request *rq
struct sg_io_v4 *hdr
91  sreq = scsi_req(rq)
92  ret = 0
97  [o] {SCSI: command completion status} = result & 0xff
98  [o] 0 -> ok = host_byte(result)
99  [o] 0 -> ok = driver_byte(result)
100  [o] additional information = 0
101  If [o] {SCSI: command completion status} || [o] 0 -> ok || [o] 0 -> ok Then [o] additional information |= something abnormal happened
103  [o] bytes of response actually written = 0
105  If sense_len && [i], [*o] {SCSI: (auto)sense data} Then
106  len = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(unsignedint, [i] in bytes , sense_len)
109  If copy_to_user(uptr64( [i], [*o] {SCSI: (auto)sense data} ), sense, len) Then ret = -EFAULT
111  Else [o] bytes of response actually written = len
115  If rq_data_dir(rq) == generic data direction definitions Then [o] din_xfer_len - actual_din_xfer_len = residual count
117  Else [o] dout_xfer_len - actual_dout_xfer_len = residual count
120  Return ret