'\" t .\" Title: scsi_eh_prep_cmnd .\" 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_EH_PREP_CMND" "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_eh_prep_cmnd \- Save a scsi command info as part of error recovery .SH "SYNOPSIS" .HP \w'void\ scsi_eh_prep_cmnd('u .BI "void scsi_eh_prep_cmnd(struct\ scsi_cmnd\ *\ " "scmd" ", struct\ scsi_eh_save\ *\ " "ses" ", unsigned\ char\ *\ " "cmnd" ", int\ " "cmnd_size" ", unsigned\ " "sense_bytes" ");" .SH "ARGUMENTS" .PP \fIstruct scsi_cmnd * scmd\fR .RS 4 SCSI command structure to hijack .RE .PP \fIstruct scsi_eh_save * ses\fR .RS 4 structure to save restore information .RE .PP \fIunsigned char * cmnd\fR .RS 4 CDB to send\&. Can be NULL if no new cmnd is needed .RE .PP \fIint cmnd_size\fR .RS 4 size in bytes of \fIcmnd\fR (must be <= BLK_MAX_CDB) .RE .PP \fIunsigned sense_bytes\fR .RS 4 size of sense data to copy\&. or 0 (if != 0 \fIcmnd\fR is ignored) .RE .SH "DESCRIPTION" .PP This function is used to save a scsi command information before re\-execution as part of the error recovery process\&. If \fIsense_bytes\fR is 0 the command sent must be one that does not transfer any data\&. If \fIsense_bytes\fR != 0 \fIcmnd\fR is ignored and this functions sets up a REQUEST_SENSE command and cmnd buffers to read \fIsense_bytes\fR into \fIscmd\fR\->sense_buffer\&. .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