Copyright (c) 2000, 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]
#include <sys/scsi/scsi.h>
uchar sts_scsi2 :1; /* SCSI-2 modifier bit */ uchar sts_is :1; /* intermediate status sent */ uchar sts_busy :1; /* device busy or reserved */ uchar sts_cm :1; /* condition met */ ucha sts_chk :1; /* check condition */
sts_chk indicates that a contingent allegiance condition has occurred.
sts_cm is returned whenever the requested operation is satisfied
sts_busy indicates that the target is busy. This status is returned whenever a target is unable to accept a command from an otherwise acceptable initiator (that is, no reservation conflicts). The recommended initiator recovery action is to issue the command again later.
sts_is is returned for every successfully completed command in a series of linked commands (except the last command), unless the command is terminated with a check condition status, reservation conflict, or command terminated status. Note that host bus adapter drivers may not support linked commands (see scsi_ifsetcap(9F)). If sts_is and sts_busy are both set, then a reservation conflict has occurred.
sts_scsi2 is the SCSI-2 modifier bit. If sts_scsi2 and sts_chk are both set, this indicates a command terminated status. If sts_scsi2 and sts_busy are both set, this indicates that the command queue in the target is full.
For accessing the status as a byte, the following values are appropriate: STATUS_GOOD
This status indicates that the target has successfully completed the command.
This status indicates that a contingent allegiance condition has occurred.
This status is returned when the requested operations are satisfied.
This status indicates that the target is busy.
This status is returned for every successfully completed command in a series of linked commands.
This is the SCSI-2 modifier bit.
This status is a combination of STATUS_MET and STATUS_INTERMEDIATE.
This status is a combination of STATUS_INTERMEDIATE and STATUS_BUSY, and it is returned whenever an initiator attempts to access a logical unit or an extent within a logical unit is reserved.
This status is a combination of STATUS_SCSI2 and STATUS_CHECK, and it is returned whenever the target terminates the current I/O process after receiving a terminate I/O process message.
This status is a combination of STATUS_SCSI2 and STATUS_BUSY, and it is returned when the command queue in the target is full.
Writing Device Drivers