Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:put_sg_io_hdr

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

Type:int

Parameter:

TypeParameterName
const struct sg_io_hdr *hdr
void __user *argp
557  If in_compat_syscall() Then
558  struct compat_sg_io_hdr hdr32 = { [i] 'S' for SCSI generic (required) = [i] 'S' for SCSI generic (required) , [i] data transfer direction = [i] data transfer direction , [i] SCSI command length ( <= 16 bytes) = [i] SCSI command length , [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 = (uintptr_t) [i], [*io] points to data transfer memory or scatter gather list , [i], [*i] points to command to perform = (uintptr_t) [i], [*i] points to command to perform , [i], [*o] points to sense_buffer memory = (uintptr_t) [i], [*o] points to sense_buffer memory , [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 = (uintptr_t) [i->o] unused internally , [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 , }
583  If copy_to_user(argp, & hdr32, size of hdr32 ) Then Return -EFAULT
586  Return 0
590  If copy_to_user(argp, hdr, size of hdr ) Then Return -EFAULT
593  Return 0
Caller
NameDescribe
scsi_cmd_ioctl