2 .\" Copyright (c) 2000, Sun Microsystems, Inc.
3 .\" , All Rights Reserved
4 .\" 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.
5 .\" 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.
6 .\" 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]
7 .TH SCSI_STATUS 9S "Aug 30, 1995"
9 scsi_status \- SCSI status structure
13 #include <sys/scsi/scsi.h>
19 Solaris DDI specific (Solaris DDI)
23 The \fBSCSI-2\fRstandard defines a status byte that is normally sent by the
24 target to the initiator during the status phase at the completion of each
30 uchar sts_scsi2 :1; /* SCSI-2 modifier bit */
31 uchar sts_is :1; /* intermediate status sent */
32 uchar sts_busy :1; /* device busy or reserved */
33 uchar sts_cm :1; /* condition met */
34 ucha sts_chk :1; /* check condition */
40 \fBsts_chk\fR indicates that a contingent allegiance condition has occurred.
43 \fBsts_cm\fR is returned whenever the requested operation is satisfied
46 \fBsts_busy\fR indicates that the target is busy. This status is returned
47 whenever a target is unable to accept a command from an otherwise acceptable
48 initiator (that is, no reservation conflicts). The recommended initiator
49 recovery action is to issue the command again later.
52 \fBsts_is\fR is returned for every successfully completed command in a series
53 of linked commands (except the last command), unless the command is terminated
54 with a check condition status, reservation conflict, or command terminated
55 status. Note that host bus adapter drivers may not support linked commands (see
56 \fBscsi_ifsetcap\fR(9F)). If \fBsts_is\fR and \fBsts_busy\fR are both set, then
57 a reservation conflict has occurred.
60 \fBsts_scsi2\fR is the \fBSCSI-2 \fRmodifier bit. If \fBsts_scsi2\fR and
61 \fBsts_chk\fR are both set, this indicates a command terminated status. If
62 \fBsts_scsi2\fR and \fBsts_busy\fR are both set, this indicates that the
63 command queue in the target is full.
66 For accessing the status as a byte, the following values are appropriate:
70 \fB\fBSTATUS_GOOD\fR \fR
74 This status indicates that the target has successfully completed the command.
80 \fB\fBSTATUS_CHECK\fR \fR
84 This status indicates that a contingent allegiance condition has occurred.
90 \fB\fBSTATUS_MET\fR \fR
94 This status is returned when the requested operations are satisfied.
100 \fB\fBSTATUS_BUSY\fR \fR
104 This status indicates that the target is busy.
110 \fB\fBSTATUS_INTERMEDIATE\fR \fR
114 This status is returned for every successfully completed command in a series of
121 \fB\fBSTATUS_SCSI2\fR \fR
125 This is the \fBSCSI-2 \fRmodifier bit.
131 \fB\fBSTATUS_INTERMEDIATE_MET\fR \fR
135 This status is a combination of \fBSTATUS_MET\fR and \fBSTATUS_INTERMEDIATE\fR.
141 \fB\fBSTATUS_RESERVATION_CONFLICT\fR \fR
145 This status is a combination of \fBSTATUS_INTERMEDIATE\fR and
146 \fBSTATUS_BUSY\fR, and it is returned whenever an initiator attempts to access
147 a logical unit or an extent within a logical unit is reserved.
153 \fB\fBSTATUS_TERMINATED\fR \fR
157 This status is a combination of \fBSTATUS_SCSI2\fR and \fBSTATUS_CHECK,\fR and
158 it is returned whenever the target terminates the current \fBI/O\fR process
159 after receiving a terminate \fBI/O\fR process message.
165 \fB\fBSTATUS_QFULL\fR \fR
169 This status is a combination of \fBSTATUS_SCSI2\fR and \fBSTATUS_BUSY\fR, and
170 it is returned when the command queue in the target is full.
176 \fBscsi_ifgetcap\fR(9F), \fBscsi_init_pkt\fR(9F),
177 \fBscsi_extended_sense\fR(9S), \fBscsi_pkt\fR(9S)
180 \fIWriting Device Drivers\fR