2 .\" Copyright (c) 2000, 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_ARQ_STATUS 9S "Sep 30, 1996"
8 scsi_arq_status \- SCSI auto request sense structure
12 #include <sys/scsi/scsi.h>
18 Solaris DDI specific (Solaris DDI)
22 When auto request sense has been enabled using \fBscsi_ifsetcap\fR(9F) and the
23 "auto-rqsense" capability, the target driver must allocate a status area in the
24 \fBSCSI\fR packet structure for the auto request sense structure (see
25 \fBscsi_pkt\fR(9S)). In the event of a \fBcheck\fR \fIcondition\fR, the
26 transport layer automatically executes a request sense command. This check
27 ensures that the request sense information does not get lost. The auto request
28 sense structure supplies the \fBSCSI\fR status of the original command, the
29 transport information pertaining to the request sense command, and the request
35 struct scsi_status sts_status; /* SCSI status */
36 struct scsi_status sts_rqpkt_status; /* SCSI status of
38 uchar_t sts_rqpkt_reason; /* reason completion */
39 uchar_t sts_rqpkt_resid; /* residue */
40 uint_t sts_rqpkt_state; /* state of command */
41 uint_t sts_rqpkt_statistics;/* statistics */
42 struct scsi_extended_sense sts_sensedata; /* actual sense data */
48 \fBsts_status\fR is the \fBSCSI\fR status of the original command. If the
49 status indicates a \fBcheck\fR \fIcondition\fR, the transport layer might have
50 performed an auto request sense command.
53 \fBsts_rqpkt_status\fR is the \fBSCSI\fR status of the request sense command.
54 \fBsts_rqpkt_reason\fR is the completion reason of the request sense command.
55 If the reason is not \fBCMD_CMPLT\fR, then the request sense command did not
59 \fBsts_rqpkt_resid\fR is the residual count of the data transfer and indicates
60 the number of data bytes that have not been transferred. The auto request sense
61 command requests \fBSENSE_LENGTH\fR bytes.
64 \fBsts_rqpkt_state\fR has bit positions representing the five most important
65 statuses that a \fBSCSI \fRcommand can go obtain.
68 \fBsts_rqpkt_statistics\fR maintains transport-related statistics of the
69 request sense command.
72 \fBsts_sensedata\fR contains the actual sense data if the request sense command
77 \fBscsi_ifgetcap\fR(9F), \fBscsi_init_pkt\fR(9F),
78 \fBscsi_extended_sense\fR(9S), \fBscsi_pkt\fR(9S)
81 \fIWriting Device Drivers\fR