xref: /illumos-gate/usr/src/lib/fm/libdiskstatus/common/ds_scsi_uscsi.h (revision 1da57d551424de5a9d469760be7c4b4d4f10a755)
1*24db4641Seschrock /*
2*24db4641Seschrock  * CDDL HEADER START
3*24db4641Seschrock  *
4*24db4641Seschrock  * The contents of this file are subject to the terms of the
5*24db4641Seschrock  * Common Development and Distribution License (the "License").
6*24db4641Seschrock  * You may not use this file except in compliance with the License.
7*24db4641Seschrock  *
8*24db4641Seschrock  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*24db4641Seschrock  * or http://www.opensolaris.org/os/licensing.
10*24db4641Seschrock  * See the License for the specific language governing permissions
11*24db4641Seschrock  * and limitations under the License.
12*24db4641Seschrock  *
13*24db4641Seschrock  * When distributing Covered Code, include this CDDL HEADER in each
14*24db4641Seschrock  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*24db4641Seschrock  * If applicable, add the following below this CDDL HEADER, with the
16*24db4641Seschrock  * fields enclosed by brackets "[]" replaced with your own identifying
17*24db4641Seschrock  * information: Portions Copyright [yyyy] [name of copyright owner]
18*24db4641Seschrock  *
19*24db4641Seschrock  * CDDL HEADER END
20*24db4641Seschrock  */
21*24db4641Seschrock /*
22*24db4641Seschrock  * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
23*24db4641Seschrock  * Use is subject to license terms.
24*24db4641Seschrock  */
25*24db4641Seschrock 
26*24db4641Seschrock #ifndef	_DS_SCSI_USCSI_H
27*24db4641Seschrock #define	_DS_SCSI_USCSI_H
28*24db4641Seschrock 
29*24db4641Seschrock #ifdef	__cplusplus
30*24db4641Seschrock extern "C" {
31*24db4641Seschrock #endif
32*24db4641Seschrock 
33*24db4641Seschrock /*
34*24db4641Seschrock  * "impossible" status value
35*24db4641Seschrock  */
36*24db4641Seschrock #define	IMPOSSIBLE_SCSI_STATUS	0xff
37*24db4641Seschrock 
38*24db4641Seschrock /*
39*24db4641Seschrock  * Minimum length of Request Sense data that we can accept
40*24db4641Seschrock  */
41*24db4641Seschrock #define	MIN_REQUEST_SENSE_LEN	18
42*24db4641Seschrock 
43*24db4641Seschrock /*
44*24db4641Seschrock  * Rounded parameter, as returned in Extended Sense information
45*24db4641Seschrock  */
46*24db4641Seschrock #define	ROUNDED_PARAMETER	0x37
47*24db4641Seschrock 
48*24db4641Seschrock int uscsi_mode_sense(int, int, int, caddr_t, int, scsi_ms_header_t *,
49*24db4641Seschrock     void *, int *);
50*24db4641Seschrock int uscsi_mode_sense_10(int, int, int, caddr_t, int, scsi_ms_header_g1_t *,
51*24db4641Seschrock     void *, int *);
52*24db4641Seschrock int uscsi_mode_select(int, int, int, caddr_t, int, scsi_ms_header_t *,
53*24db4641Seschrock     void *, int *);
54*24db4641Seschrock int uscsi_mode_select_10(int, int, int, caddr_t, int, scsi_ms_header_g1_t *,
55*24db4641Seschrock     void *, int *);
56*24db4641Seschrock int uscsi_log_sense(int, int, int, caddr_t, int, void *, int *);
57*24db4641Seschrock int uscsi_request_sense(int, caddr_t, int, void *, int *);
58*24db4641Seschrock 
59*24db4641Seschrock #ifdef	__cplusplus
60*24db4641Seschrock }
61*24db4641Seschrock #endif
62*24db4641Seschrock 
63*24db4641Seschrock #endif	/* _DS_SCSI_USCSI_H */
64