xref: /illumos-gate/usr/src/lib/scsi/plugins/ses/libses/common/libses.h (revision aedf2b3bb56b025fcaf87b49ec6c8aeea07f16d7)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License (the "License").
6  * You may not use this file except in compliance with the License.
7  *
8  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL HEADER in each
14  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15  * If applicable, add the following below this CDDL HEADER, with the
16  * fields enclosed by brackets "[]" replaced with your own identifying
17  * information: Portions Copyright [yyyy] [name of copyright owner]
18  *
19  * CDDL HEADER END
20  */
21 
22 /*
23  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_FRAMEWORK_LIBSES_H
28 #define	_FRAMEWORK_LIBSES_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * These are properties attached to the root target node of the enclosure, and
36  * represent the SCSI inquiry data.
37  */
38 #define	SCSI_PROP_VENDOR		"scsi-inquiry-vendor"
39 #define	SCSI_PROP_PRODUCT		"scsi-inquiry-product"
40 #define	SCSI_PROP_REVISION		"scsi-inquiry-revision"
41 
42 /*
43  * This property provides a human-readable name for the element type.  This is
44  * constant, and not derived from the enclosure data.
45  */
46 #define	LIBSES_PROP_ELEMENT_TYPE_NAME	"libses-element-type-name"
47 
48 /*
49  * The following properties can be added to any node.  There is no provision in
50  * the specification for these properties, but they can be derived from vendor
51  * specific data for some enclosures.
52  */
53 #define	LIBSES_PROP_PART		"libses-part-number"
54 #define	LIBSES_PROP_SERIAL		"libses-serial-number"
55 
56 /*
57  * The chassis serial number is a pseudo property that doesn't exist in SES
58  * spec.  A single physical chassis may present several logically different SES
59  * targets that are connected to the same or different elements.  These targets
60  * can extract the chassis serial number in a vendor-specific way so that
61  * consumers know these SES targets refer to the same device.  This defaults to
62  * to the logical-id, and is always present.
63  */
64 #define	LIBSES_EN_PROP_CSN		"libses-chassis-serial"
65 
66 /*
67  * This boolean property identifies a chassis as internal, where the connected
68  * elements are part of a single system chassis and not an external enclosure.
69  * This is used on platforms with a disk backplane that exports a SES target.
70  */
71 #define	LIBSES_EN_PROP_INTERNAL		"libses-internal"
72 
73 /*
74  * This property identifies the subchassis id for those systems that
75  * support the concept of a subchassis.
76  */
77 #define	LIBSES_EN_PROP_SUBCHASSIS_ID	"libses-subchassis-id"
78 
79 #ifdef	__cplusplus
80 }
81 #endif
82 
83 #endif	/* _FRAMEWORK_LIBSES_H */
84