'\" te .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License. .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH SCSI_ABORT 9F "Jan 16, 2006" .SH NAME scsi_abort \- abort a SCSI command .SH SYNOPSIS .nf #include \fBint\fR\fBscsi_abort\fR(\fBstruct scsi_address *\fR\fIap\fR, \fBstruct scsi_pkt *\fR\fIpkt\fR); .fi .SH INTERFACE LEVEL illumos DDI specific (illumos DDI). .SH PARAMETERS .ne 2 .na \fB\fIap\fR\fR .ad .RS 7n Pointer to a \fBscsi_address\fR structure. .RE .sp .ne 2 .na \fB\fIpkt\fR\fR .ad .RS 7n Pointer to a \fBscsi_pkt\fR(9S) structure. .RE .SH DESCRIPTION The \fBscsi_abort()\fR function terminates a command that has been transported to the host adapter driver. A \fINULL\fR \fIpkt\fR causes all outstanding packets to be aborted. On a successful abort, the \fBpkt_reason\fR is set to \fBCMD_ABORTED\fR and \fBpkt_statistics\fR is \fBOR\fR'ed with \fBSTAT_ABORTED\fR. .SH RETURN VALUES The \fBscsi_abort()\fR function returns: .sp .ne 2 .na \fB\fB1\fR\fR .ad .RS 5n on success. .RE .sp .ne 2 .na \fB\fB0\fR\fR .ad .RS 5n on failure. .RE .SH CONTEXT The \fBscsi_abort()\fR function can be called from user, interrupt, or kernel context. .SH EXAMPLES \fBExample 1 \fRTerminating a command. .sp .in +2 .nf \fBif (scsi_abort(&devp->sd_address, pkt) == 0) { (void) scsi_reset(&devp->sd_address, RESET_ALL); }\fR .fi .in -2 .SH SEE ALSO \fBtran_abort\fR(9E), \fBscsi_reset\fR(9F), \fBscsi_pkt\fR(9S) .sp .LP \fIWriting Device Drivers\fR