Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:get_sg_io_hdr

Proto:int get_sg_io_hdr(struct sg_io_hdr *hdr, const void __user *argp)

Type:int

Parameter:

TypeParameterName
struct sg_io_hdr *hdr
const void __user *argp
602  If in_compat_syscall() Then
603  If copy_from_user( & hdr32, argp, size of hdr32 ) Then Return -EFAULT
606  * hdr = (struct sg_io_hdr){ [i] 'S' for SCSI generic (required) = [i] 'S' for SCSI generic (required) , [i] data transfer direction = [i] data transfer direction , [i] SCSI command length = [i] SCSI command length ( <= 16 bytes) , [i] max length to write to sbp = [i] max length to write to sbp , [i] 0 implies no scatter gather = [i] 0 implies no scatter gather , [i] byte count of data transfer = [i] byte count of data transfer , [i], [*io] points to data transfer memory or scatter gather list = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., [i], [*i] points to command to perform = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., [i], [*o] points to sense_buffer memory = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., [i] MAX_UINT->no timeout (unit: millisec) = [i] MAX_UINT->no timeout (unit: millisec) , [i] 0 -> default, see SG_FLAG... = [i] 0 -> default, see SG_FLAG... , [i->o] unused internally (normally) = [i->o] unused internally (normally) , [i->o] unused internally = A pointer passed in from user mode. This should not* be used for syscall parameters, just declare them* as pointers because the syscall entry code will have* appropriately converted them already., [o] scsi status = [o] scsi status , [o] shifted, masked scsi status = [o] shifted, masked scsi status , [o] messaging level data (optional) = [o] messaging level data (optional) , [o] byte count actually written to sbp = [o] byte count actually written to sbp , [o] errors from host adapter = [o] errors from host adapter , [o] errors from software driver = [o] errors from software driver , [o] dxfer_len - actual_transferred = [o] dxfer_len - actual_transferred , [o] time taken by cmd (unit: millisec) = [o] time taken by cmd (unit: millisec) , [o] auxiliary information = [o] auxiliary information , }
631  Return 0
635  If copy_from_user(hdr, argp, size of hdr ) Then Return -EFAULT
638  Return 0
Caller
NameDescribe
scsi_cmd_ioctl