'\" t .\" Title: scsi_execute .\" Author: .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: September 2017 .\" Manual: SCSI mid layer .\" Source: Kernel Hackers Manual 4.12.13 .\" Language: English .\" .TH "SCSI_EXECUTE" "9" "September 2017" "Kernel Hackers Manual 4\&.12\&" "SCSI mid layer" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" scsi_execute \- insert request and wait for the result .SH "SYNOPSIS" .HP \w'int\ scsi_execute('u .BI "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" ");" .SH "ARGUMENTS" .PP \fIstruct scsi_device * sdev\fR .RS 4 scsi device .RE .PP \fIconst unsigned char * cmd\fR .RS 4 scsi command .RE .PP \fIint data_direction\fR .RS 4 data direction .RE .PP \fIvoid * buffer\fR .RS 4 data buffer .RE .PP \fIunsigned bufflen\fR .RS 4 len of buffer .RE .PP \fIunsigned char * sense\fR .RS 4 optional sense buffer .RE .PP \fIstruct scsi_sense_hdr * sshdr\fR .RS 4 optional decoded sense header .RE .PP \fIint timeout\fR .RS 4 request timeout in seconds .RE .PP \fIint retries\fR .RS 4 number of times to retry request .RE .PP \fIu64 flags\fR .RS 4 flags for \->cmd_flags .RE .PP \fIreq_flags_t rq_flags\fR .RS 4 flags for \->rq_flags .RE .PP \fIint * resid\fR .RS 4 optional residual length .RE .SH "DESCRIPTION" .PP Returns the scsi_cmnd result field if a command was executed, or a negative Linux error code if we didn\*(Aqt get that far\&. .SH "AUTHORS" .PP \fBJames Bottomley\fR <\&James.Bottomley@hansenpartnership.com\&> .RS 4 Author. .RE .PP \fBRob Landley\fR <\&rob@landley.net\&> .RS 4 Author. .RE .SH "COPYRIGHT" .br