other versions
SCSI_EXECUTE(9) | SCSI mid layer | SCSI_EXECUTE(9) |
NAME¶
scsi_execute - insert request and wait for the resultSYNOPSIS¶
int scsi_execute(struct scsi_device * sdev, const unsigned char * cmd, int data_direction, void * buffer, unsigned bufflen, unsigned char * sense, struct scsi_sense_hdr * sshdr, int timeout, int retries, u64 flags, req_flags_t rq_flags, int * resid);
ARGUMENTS¶
struct scsi_device * sdevscsi device
const unsigned char * cmd
scsi command
int data_direction
data direction
void * buffer
data buffer
unsigned bufflen
len of buffer
unsigned char * sense
optional sense buffer
struct scsi_sense_hdr * sshdr
optional decoded sense header
int timeout
request timeout in seconds
int retries
number of times to retry request
u64 flags
flags for ->cmd_flags
req_flags_t rq_flags
flags for ->rq_flags
int * resid
optional residual length
DESCRIPTION¶
Returns the scsi_cmnd result field if a command was executed, or a negative Linux error code if we didn't get that far.AUTHORS¶
James Bottomley <James.Bottomley@hansenpartnership.com>Author.
Rob Landley <rob@landley.net>
Author.
COPYRIGHT¶
September 2017 | Kernel Hackers Manual 4.12 |