函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\bsg-lib.c Create Date:2022-07-27 19:13:58
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:bsg_transport_complete_rq

函数原型:static int bsg_transport_complete_rq(struct request *rq, struct sg_io_v4 *hdr)

返回类型:int

参数:

类型参数名称
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  如果 [o] {SCSI: command completion status} [o] 0 -> ok [o] 0 -> ok [o] additional information 或等于something abnormal happened
91  [o] bytes of response actually written 等于0
93  如果result小于0则
95  reply_len等于sizeof(u32)
96  ret等于result
99  如果reply_len [i], [*o] {SCSI: (auto)sense data}
100  len等于两数取小( [i] in bytes , reply_len)
102  如果copy_to_user(uptr64( [i], [*o] {SCSI: (auto)sense data} ), reply, len)则ret等于负EFAULT
104  否则 [o] bytes of response actually written 等于len
109  [o] dout_xfer_len - actual_dout_xfer_len 等于0
111  如果 BIDI support
112  rsp_len等于payload_len
114  如果WARN_ON(reply_payload_rcv_len > rsp_len)则 [o] din_xfer_len - actual_din_xfer_len 等于0
116  否则 [o] din_xfer_len - actual_din_xfer_len 等于rsp_lenreply_payload_rcv_len
118  否则
119  [o] din_xfer_len - actual_din_xfer_len 等于0
122  返回:ret