'\" t .\" Title: i2o_scsi_queuecommand_lck .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: May 2018 .\" Manual: Message-based devices .\" Source: Kernel Hackers Manual 3.16.56 .\" Language: English .\" .TH "I2O_SCSI_QUEUECOMMAN" "9" "May 2018" "Kernel Hackers Manual 3\&.16\&" "Message-based devices" .\" ----------------------------------------------------------------- .\" * 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" i2o_scsi_queuecommand_lck \- queue a SCSI command .SH "SYNOPSIS" .HP \w'int\ i2o_scsi_queuecommand_lck('u .BI "int i2o_scsi_queuecommand_lck(struct\ scsi_cmnd\ *\ " "SCpnt" ", void\ (*" "done" ")\ (struct\ scsi_cmnd\ *));" .SH "ARGUMENTS" .PP \fISCpnt\fR .RS 4 scsi command pointer .RE .PP \fIdone\fR .RS 4 callback for completion .RE .SH "DESCRIPTION" .PP Issue a scsi command asynchronously\&. Return 0 on success or 1 if we hit an error (normally message queue congestion)\&. The only minor complication here is that I2O deals with the device addressing so we have to map the bus/dev/lun back to an I2O handle as well as faking absent devices ourself\&. .SH "LOCKS" .PP takes the controller lock on error path only .SH "COPYRIGHT" .br