1502 Remove conversion cruft from manpages
[unleashed.git] / usr / src / man / man9f / scsi_validate_sense.9f
blob6e24cc8eaf792f955d7d9a12ac2d245557d309a3
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_VALIDATE_SENSE 9F "Jun 29, 2006"
7 .SH NAME
8 scsi_validate_sense \- find descriptor in SCSI sense data
9 .SH SYNOPSIS
10 .LP
11 .nf
12 #include <sys/scsi/scsi.h>
16 \fBint\fR \fBscsi_validate_sense\fR(\fBuint8_t *\fR\fIsense_buffer\fR, \fBint\fR \fIsense_buf_len\fR,
17      \fBint *\fR\fIflags\fR);
18 .fi
20 .SH INTERFACE LEVEL
21 .sp
22 .LP
23 Solaris DDI specific (Solaris DDI).
24 .SH PARAMETERS
25 .sp
26 .ne 2
27 .na
28 \fB\fIsense_buffer\fR\fR
29 .ad
30 .RS 17n
31 Pointer to a buffer containing \fBSCSI\fR sense data. The sense data is
32 expected in wire format starting at the response code.
33 .RE
35 .sp
36 .ne 2
37 .na
38 \fB\fIsense_buf_len\fR\fR
39 .ad
40 .RS 17n
41 Length of sense buffer in bytes.
42 .RE
44 .sp
45 .ne 2
46 .na
47 \fB\fIflags\fR\fR
48 .ad
49 .RS 17n
50 Returns additional properties of the sense data.
51 .RE
53 .SH DESCRIPTION
54 .sp
55 .LP
56 The \fBscsi_validate_sense()\fR function returns the format of the sense data
57 contained in the provided sense buffer. If the response code field in the sense
58 data is not recognized or if there is not enough sense data to include sense
59 key, asc, and ascq then \fBscsi_validate_sense()\fR returns
60 \fBSENSE_UNUSABLE\fR. If the buffer contains usable sense data in fixed format,
61 the function returns \fBSENSE_FIXED_FORMAT\fR. If the buffer contains usable
62 sense data in descriptor format, the function returns \fBSENSE_DESCR_FORMAT\fR.
63 .sp
64 .LP
65 The following flags may be set as appropriate depending on the sense data:
66 .sp
67 .ne 2
68 .na
69 \fB\fBSNS_BUF_OVERFLOW\fR\fR
70 .ad
71 .RS 20n
72 The sense data buffer provided for the request is too small to hold all the
73 sense data.
74 .RE
76 .sp
77 .ne 2
78 .na
79 \fB\fBSNS_BUF_DEFERRED\fR\fR
80 .ad
81 .RS 20n
82 The sense data contained in the buffer relates to an error that has occurred
83 during the processing of a successfully completed command, such as a cached
84 write that could not be commited to the media.
85 .RE
87 .SH RETURN VALUES
88 .sp
89 .ne 2
90 .na
91 \fB\fBSENSE_UNUSABLE\fR\fR
92 .ad
93 .RS 22n
94 The response code from the sense data is unrecognized or not enough sense data
95 present to provide the \fBsense key\fR, \fBasc\fR, and \fBascq\fR.
96 .RE
98 .sp
99 .ne 2
101 \fB\fBSENSE_FIXED_FORMAT\fR\fR
103 .RS 22n
104 The sense data in the buffer is in "fixed format".
108 .ne 2
110 \fB\fBSENSE_DESCR_FORMAT\fR\fR
112 .RS 22n
113 The sense data in the buffer is in "descriptor format".
116 .SH CONTEXT
119 The \fBscsi_validate_sense()\fR function can be called from user or interrupt
120 context.
121 .SH SEE ALSO
124 \fBscsi_ext_sense_fields\fR(9F), \fBscsi_find_sense_descr\fR(9F),
125 \fBscsi_sense_asc\fR(9F), \fBscsi_sense_ascq\fR(9F),
126 \fBscsi_sense_cmdspecific_uint64\fR(9F), \fBscsi_sense_info_uint64\fR(9F),
127 \fBscsi_sense_key\fR(9F)