9022 loader.efi: module placement must check memory map
[unleashed.git] / share / man / man9f / scsi_abort.9f
blob9d226699b90d5a4ec2f3a076a8b31ab0c007aa14
1 '\" te
2 .\"  Copyright (c) 2006, Sun Microsystems, Inc.  All Rights Reserved
3 .\" 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.
4 .\" 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.
5 .\" 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]
6 .TH SCSI_ABORT 9F "Jan 16, 2006"
7 .SH NAME
8 scsi_abort \- abort a SCSI command
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/scsi/scsi.h>
16 \fBint\fR\fBscsi_abort\fR(\fBstruct scsi_address *\fR\fIap\fR, \fBstruct scsi_pkt *\fR\fIpkt\fR);
17 .fi
19 .SH INTERFACE LEVEL
20 .sp
21 .LP
22 Solaris DDI specific (Solaris DDI).
23 .SH PARAMETERS
24 .sp
25 .ne 2
26 .na
27 \fB\fIap\fR\fR
28 .ad
29 .RS 7n
30 Pointer to a \fBscsi_address\fR structure.
31 .RE
33 .sp
34 .ne 2
35 .na
36 \fB\fIpkt\fR\fR
37 .ad
38 .RS 7n
39 Pointer to a \fBscsi_pkt\fR(9S) structure.
40 .RE
42 .SH DESCRIPTION
43 .sp
44 .LP
45 The \fBscsi_abort()\fR function terminates a command that has been transported
46 to the host adapter driver. A \fINULL\fR \fIpkt\fR causes all outstanding
47 packets to be aborted. On a successful abort, the \fBpkt_reason\fR is set to
48 \fBCMD_ABORTED\fR and \fBpkt_statistics\fR is \fBOR\fR'ed with
49 \fBSTAT_ABORTED\fR.
50 .SH RETURN VALUES
51 .sp
52 .LP
53 The \fBscsi_abort()\fR function returns:
54 .sp
55 .ne 2
56 .na
57 \fB\fB1\fR\fR
58 .ad
59 .RS 5n
60 on success.
61 .RE
63 .sp
64 .ne 2
65 .na
66 \fB\fB0\fR\fR
67 .ad
68 .RS 5n
69 on failure.
70 .RE
72 .SH CONTEXT
73 .sp
74 .LP
75 The \fBscsi_abort()\fR function can be called from user, interrupt, or kernel
76 context.
77 .SH EXAMPLES
78 .LP
79 \fBExample 1 \fRTerminating a command.
80 .sp
81 .in +2
82 .nf
83 \fBif (scsi_abort(&devp->sd_address, pkt) == 0) {
84         (void) scsi_reset(&devp->sd_address, RESET_ALL);
85 }\fR
86 .fi
87 .in -2
89 .SH SEE ALSO
90 .sp
91 .LP
92 \fBtran_abort\fR(9E), \fBscsi_reset\fR(9F), \fBscsi_pkt\fR(9S)
93 .sp
94 .LP
95 \fIWriting Device Drivers\fR