函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:blk_complete_sghdr_rq

函数原型:static int blk_complete_sghdr_rq(struct request *rq, struct sg_io_hdr *hdr, struct bio *bio)

返回类型:int

参数:

类型参数名称
struct request *rq
struct sg_io_hdr *hdr
struct bio *bio
247  req等于scsi_req(rq)
248  ret等于0
253  [o] scsi status 等于result按位与0xff
254  [o] shifted, masked scsi status 等于Use these to separate status msg and our bytes* These are set by:* status byte = set from target device* msg_byte = return status from host adapter itself.* host_byte = set by low-level driver to indicate status.* driver_byte = set by mid-level.(result)
255  [o] messaging level data (optional) 等于msg_byte(result)
256  [o] errors from host adapter 等于host_byte(result)
257  [o] errors from software driver 等于driver_byte(result)
258  [o] auxiliary information 等于0
259  如果 [o] shifted, masked scsi status [o] errors from host adapter [o] errors from software driver [o] auxiliary information 或等于something abnormal happened
261  [o] dxfer_len - actual_transferred 等于 residual count
262  [o] byte count actually written to sbp 等于0
264  如果sense_len [i], [*o] points to sense_buffer memory
265  len等于两数取小((unsignedint) [i] max length to write to sbp , sense_len)
267  如果非copy_to_user( [i], [*o] points to sense_buffer memory , sense, len)则 [o] byte count actually written to sbp 等于len
269  否则ret等于负EFAULT
273  r等于卸载一个用户数据的请求
274  如果非retret等于r
277  返回:ret
调用者
名称描述
sg_io