xref: /illumos-gate/usr/src/lib/scsi/plugins/ses/ses2/common/ses2.h (revision 3ced7af1ee4d7b1d1a3766385fdb7527a2abda93)
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 2008 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_FRAMEWORK_SES_H
28 #define	_FRAMEWORK_SES_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 /*
37  * Node properties
38  */
39 #define	SES_PROP_ELEMENT_TYPE		"ses-element-type"
40 typedef enum ses2_element_type {
41 	SES_ET_UNSPECIFIED = 0,
42 	SES_ET_DEVICE = 0x1,
43 	SES_ET_POWER_SUPPLY = 0x2,
44 	SES_ET_COOLING = 0x3,
45 	SES_ET_TEMPERATURE_SENSOR = 0x4,
46 	SES_ET_DOOR_LOCK = 0x5,
47 	SES_ET_AUDIBLE_ALARM = 0x6,
48 	SES_ET_ESC_ELECTRONICS = 0x7,
49 	SES_ET_SCC_ELECTRONICS = 0x8,
50 	SES_ET_NONVOLATILE_CACHE = 0x9,
51 	SES_ET_INVALID_OPERATION_REASON = 0xa,
52 	SES_ET_UPS = 0xb,
53 	SES_ET_DISPLAY = 0xc,
54 	SES_ET_KEY_PAD_ENTRY = 0xd,
55 	SES_ET_ENCLOSURE = 0xe,
56 	SES_ET_SCSI_PORT_XCVR = 0xf,
57 	SES_ET_LANGUAGE = 0x10,
58 	SES_ET_COMMUNICATION_PORT = 0x11,
59 	SES_ET_VOLTAGE_SENSOR = 0x12,
60 	SES_ET_CURRENT_SENSOR = 0x13,
61 	SES_ET_SCSI_TARGET_PORT = 0x14,
62 	SES_ET_SCSI_INITIATOR_PORT = 0x15,
63 	SES_ET_SIMPLE_SUBENCLOSURE = 0x16,
64 	SES_ET_ARRAY_DEVICE = 0x17,
65 	SES_ET_SAS_EXPANDER = 0x18,
66 	SES_ET_SAS_CONNECTOR = 0x19
67 } ses2_element_type_t;
68 
69 #define	SES_PROP_STATUS_CODE		"ses-status-code"
70 typedef enum ses_element_status_code {
71 	SES_ESC_UNSUPPORTED = 0,
72 	SES_ESC_OK = 1,
73 	SES_ESC_CRITICAL = 2,
74 	SES_ESC_NONCRITICAL = 3,
75 	SES_ESC_UNRECOVERABLE = 4,
76 	SES_ESC_NOT_INSTALLED = 5,
77 	SES_ESC_UNKNOWN = 6,
78 	SES_ESC_UNAVAIL = 7,
79 	SES_ESC_NO_ACCESS = 8
80 } ses_element_status_code_t;
81 
82 #define	SES_PROP_ELEMENT_CLASS_INDEX	"ses-element-class-index" /* U64 */
83 #define	SES_PROP_ELEMENT_INDEX		"ses-element-index"	/* U64 */
84 #define	SES_PROP_BAY_NUMBER		"ses-bay-number"	/* U64 */
85 #define	SES_PROP_PRDFAIL		"ses-failure-predicted"
86 #define	SES_PROP_SWAP			"ses-swapped"
87 #define	SES_PROP_DISABLED		"ses-disabled"
88 #define	SES_PROP_IDENT			"ses-identify"
89 #define	SES_PROP_WARN			"ses-warning"
90 #define	SES_PROP_FAIL			"ses-failed"
91 #define	SES_PROP_WARN_REQ		"ses-warning-indicator-requested"
92 #define	SES_PROP_FAIL_REQ		"ses-failure-indicator-requested"
93 #define	SES_PROP_REPORT			"ses-reported-via"
94 #define	SES_PROP_RMV			"ses-ready-to-remove"
95 #define	SES_PROP_OFF			"ses-off"
96 #define	SES_PROP_REQUESTED_ON		"ses-requested-on"
97 #define	SES_PROP_CLASS_DESCRIPTION	"ses-class-description"	/* S */
98 #define	SES_PROP_DESCRIPTION		"ses-description"	/* S */
99 #define	SES_PROP_HOT_SWAP		"ses-hot-swappable"
100 
101 #define	SES_FC_PROP_NODE_NAME		"ses-fc-node-name"	/* U64 */
102 #define	SES_FC_PROP_LOOP_POS		"ses-fc-loop-position"	/* U64 */
103 #define	SES_FC_PROP_REQ_HARDADDR	"ses-fc-requested-hard-address"
104 #define	SES_FC_PROP_N_PORT_ID		"ses-fc-n_port-identifier" /* U64 */
105 #define	SES_FC_PROP_N_PORT_NAME		"ses-fc-n_port-name"	/* U64 */
106 #define	SES_FC_PROP_PORTS		"ses-fc-ports"		/* NVA */
107 
108 #define	SES_SAS_PROP_DEVICE_TYPE	"ses-sas-device-type"	/* U64 */
109 /*
110  * SAS2r11 7.8.2 Table 123
111  */
112 typedef enum sas_device_type {
113 	SAS_DT_END_DEVICE = 0x01,
114 	SAS_DT_EXPANDER = 0x02,
115 	SAS_DT_LEGACY_EXPANDER = 0x3
116 } sas_device_type_t;
117 
118 #define	SES_SAS_PROP_SMPI_PORT		"ses-sas-smp-initiator-port"
119 #define	SES_SAS_PROP_STPI_PORT		"ses-sas-stp-initiator-port"
120 #define	SES_SAS_PROP_SSPI_PORT		"ses-sas-ssp-initiator-port"
121 #define	SES_SAS_PROP_SATA_DEVICE	"ses-sas-sata-device"
122 #define	SES_SAS_PROP_SMPT_PORT		"ses-sas-smp-target-port"
123 #define	SES_SAS_PROP_STPT_PORT		"ses-sas-stp-target-port"
124 #define	SES_SAS_PROP_SSPT_PORT		"ses-sas-ssp-target-port"
125 #define	SES_SAS_PROP_ATT_ADDR		"ses-sas-attached-address" /* U64 */
126 #define	SES_SAS_PROP_ADDR		"ses-sas-address"	/* U64 */
127 #define	SES_SAS_PROP_PHY_ID		"ses-sas-phy-identifier" /* U64 */
128 #define	SES_SAS_PROP_PHYS		"ses-sas-phys"		/* NVA */
129 #define	SES_PROP_CE_IDX			"ses-connector-element-index" /* U64 */
130 #define	SES_PROP_OE_IDX			"ses-other-element-index" /* U64 */
131 
132 #define	SES_PROP_THRESH_CRIT_HI		"ses-high-critical-threshold" /* U64 */
133 #define	SES_PROP_THRESH_WARN_HI		"ses-high-warning-threshold" /* U64 */
134 #define	SES_PROP_THRESH_CRIT_LO		"ses-low-critical-threshold" /* U64 */
135 #define	SES_PROP_THRESH_WARN_LO		"ses-low-warning-threshold" /* U64 */
136 
137 /*
138  * Audible Alarm properties
139  */
140 #define	SES_ALARM_PROP_UNRECOV		"ses-indicating-unrecoverable"
141 #define	SES_ALARM_PROP_CRIT		"ses-indicating-critical"
142 #define	SES_ALARM_PROP_NONCRIT		"ses-indicating-noncritical"
143 #define	SES_ALARM_PROP_INFO		"ses-indicating-informational"
144 #define	SES_ALARM_PROP_REMIND		"ses-reminder-mode"
145 #define	SES_ALARM_PROP_MUTED		"ses-muted"
146 #define	SES_ALARM_PROP_RQST_MUTE	"ses-mute-requested"
147 
148 /*
149  * Nonvolatile Cache properties
150  */
151 #define	SES_CACHE_PROP_SIZE		"ses-cache-size"	/* U64 */
152 
153 /*
154  * Cooling Element properties
155  */
156 #define	SES_COOLING_PROP_FAN_SPEED	"ses-fan-speed"		/* U64 */
157 #define	SES_COOLING_PROP_SPEED_CODE	"ses-fan-speed-code"	/* U64 */
158 typedef enum ses_cooling_fan_speed {
159 	SES_COOLING_FAN_SPEED_STOPPED = 0,
160 	SES_COOLING_FAN_SPEED_LOWEST = 1,
161 	SES_COOLING_FAN_SPEED_LOWER = 2,
162 	SES_COOLING_FAN_SPEED_LOW = 3,
163 	SES_COOLING_FAN_SPEED_INTERMEDIATE = 4,
164 	SES_COOLING_FAN_SPEED_HIGH = 5,
165 	SES_COOLING_FAN_SPEED_HIGHER = 6,
166 	SES_COOLING_FAN_SPEED_HIGHEST = 7
167 } ses_cooling_fan_speed_t;
168 
169 /*
170  * Device/Array Device properties
171  */
172 #define	SES_DEV_PROP_SLOT_ADDR		"ses-slot-address"	/* U64 */
173 #define	SES_DEV_PROP_PRDFAIL		"ses-failure-predicted"
174 #define	SES_DEV_PROP_READY_TO_INSERT	"ses-ready-to-insert"
175 #define	SES_DEV_PROP_ENC_BYP_A		"ses-enclosure-bypassed-a"
176 #define	SES_DEV_PROP_ENC_BYP_B		"ses-enclosure-bypassed-b"
177 #define	SES_DEV_PROP_DO_NOT_REMOVE	"ses-do-not-remove"
178 #define	SES_DEV_PROP_APP_BYP_A		"ses-app-client-bypassed-a"
179 #define	SES_DEV_PROP_APP_BYP_B		"ses-app-client-bypassed-b"
180 #define	SES_DEV_PROP_DEV_BYP_A		"ses-device-bypassed-a"
181 #define	SES_DEV_PROP_DEV_BYP_B		"ses-device-bypassed-b"
182 #define	SES_DEV_PROP_BYP_A		"ses-bypassed-a"
183 #define	SES_DEV_PROP_BYP_B		"ses-bypassed-b"
184 #define	SES_DEV_PROP_FAULT_RQSTD	"ses-fault-requested"
185 #define	SES_DEV_PROP_FAULT_SENSED	"ses-fault-sensed"
186 #define	SES_DEV_PROP_SAS_NOT_ALL_PHYS	"ses-sas-not-all-phys"
187 
188 /* Control only */
189 #define	SES_DEV_PROP_REQ_MISSING	"ses-request-missing"
190 #define	SES_DEV_PROP_REQ_ACTIVE		"ses-request-activity"
191 
192 #define	SES_AD_PROP_RR_ABORT		"ses-remap-rebuild-abort"
193 #define	SES_AD_PROP_REBUILD		"ses-remap-rebuild"
194 #define	SES_AD_PROP_IN_FAILED_ARRAY	"ses-in-failed-array"
195 #define	SES_AD_PROP_IN_CRIT_ARRAY	"ses-in-critical-array"
196 #define	SES_AD_PROP_CONS_CHK		"ses-consistency-check"
197 #define	SES_AD_PROP_HOT_SPARE		"ses-hot-spare"
198 #define	SES_AD_PROP_RSVD_DEVICE		"ses-reserved-device"
199 #define	SES_AD_PROP_OK			"ses-ok"
200 
201 /*
202  * Display Element properties
203  */
204 #define	SES_DPY_PROP_CHAR		"ses-displayed-character" /* U16 */
205 #define	SES_DPY_PROP_MODE		"ses-display-mode"	/* U64 */
206 /*
207  * SES-2r17 Table 96, 7.3.14
208  */
209 typedef enum ses_display_mode_ctl {
210 	SES_DISPLAY_MC_NOCHG = 0,
211 	SES_DISPLAY_MC_ESP = 1,
212 	SES_DISPLAY_MC_SET = 2
213 } ses_display_mode_ctl_t;
214 
215 typedef enum ses2_display_mode_status {
216 	SES_DISPLAY_MS_NOTSUP = 0,
217 	SES_DISPLAY_MS_ESP = 1,
218 	SES_DISPLAY_MS_SET = 2
219 } ses_display_mode_status_t;
220 
221 /*
222  * Current Sensor properties
223  */
224 #define	SES_CS_PROP_CRIT_OVER		"ses-overcurrent-critical"
225 #define	SES_CS_PROP_WARN_OVER		"ses-overcurrent-warning"
226 #define	SES_CS_PROP_CURRENT_MA		"ses-current"		/* I64 */
227 
228 /*
229  * Door Lock properties
230  */
231 #define	SES_LOCK_PROP_UNLOCKED		"ses-unlocked"
232 
233 /*
234  * SCSI Initiator or Target Port properties
235  */
236 #define	SES_ITP_PROP_ENABLED		"ses-enabled"
237 
238 /*
239  * Language Module properties
240  */
241 #define	SES_LANG_PROP_LANGCODE		"ses-language-code"	/* U64 */
242 
243 /*
244  * SCSI Port/Transceiver properties
245  */
246 #define	SES_PX_PROP_XMIT_FAIL		"ses-transmitter-failure"
247 #define	SES_PX_PROP_LOL			"ses-loss-of-link"
248 
249 /*
250  * Power Supply properties
251  */
252 #define	SES_PSU_PROP_DC_OVER_CURRENT	"ses-dc-over-current"
253 #define	SES_PSU_PROP_DC_UNDER_VOLTAGE	"ses-dc-under-voltage"
254 #define	SES_PSU_PROP_DC_OVER_VOLTAGE	"ses-dc-over-voltage"
255 #define	SES_PSU_PROP_DC_FAIL		"ses-dc-fail"
256 #define	SES_PSU_PROP_AC_FAIL		"ses-ac-fail"
257 #define	SES_PSU_PROP_TEMP_WARN		"ses-temperature-warning" /* I64 */
258 #define	SES_PSU_PROP_OVERTEMP_FAIL	"ses-overtemperature-failure"
259 
260 /*
261  * SAS Expander properties
262  */
263 #define	SES_EXP_PROP_SAS_ADDR		"ses-expander-sas-address" /* U64 */
264 
265 /*
266  * SAS Connector properties
267  */
268 #define	SES_SC_PROP_PHYSICAL_LINK	"ses-sas-physical-link"	/* U64 */
269 #define	SES_SC_PROP_CONNECTOR_TYPE	"ses-sas-connector-type" /* U64 */
270 /*
271  * SES2r17 Table 122, 7.3.26
272  */
273 typedef enum ses_sasconn_type {
274 	SES_SASCONN_T_UNKNOWN = 0,
275 	SES_SASCONN_T_SFF_8470 = 0x1,
276 	SES_SASCONN_T_SFF_8088 = 0x2,
277 	SES_SASCONN_T_VENDOR_EXT = 0xf,
278 	SES_SASCONN_T_SFF_8484 = 0x10,
279 	SES_SASCONN_T_SFF_8087 = 0x11,
280 	SES_SASCONN_T_SFF_8482_R = 0x20,
281 	SES_SASCONN_T_SATA_HOST = 0x21,
282 	SES_SASCONN_T_SFF_8482_P = 0x22,
283 	SES_SASCONN_T_SATA_DEV = 0x23,
284 	SES_SASCONN_T_VIRTUAL = 0x2f,
285 	SES_SASCONN_T_VENDOR_INT = 0x3f,
286 	SES_SASCONN_T_VENDOR_70 = 0x70,
287 	SES_SASCONN_T_VENDOR_71 = 0x71,
288 	SES_SASCONN_T_VENDOR_72 = 0x72,
289 	SES_SASCONN_T_VENDOR_73 = 0x73,
290 	SES_SASCONN_T_VENDOR_74 = 0x74,
291 	SES_SASCONN_T_VENDOR_75 = 0x75,
292 	SES_SASCONN_T_VENDOR_76 = 0x76,
293 	SES_SASCONN_T_VENDOR_77 = 0x77,
294 	SES_SASCONN_T_VENDOR_78 = 0x78,
295 	SES_SASCONN_T_VENDOR_79 = 0x79,
296 	SES_SASCONN_T_VENDOR_7A = 0x7a,
297 	SES_SASCONN_T_VENDOR_7B = 0x7b,
298 	SES_SASCONN_T_VENDOR_7C = 0x7c,
299 	SES_SASCONN_T_VENDOR_7D = 0x7d,
300 	SES_SASCONN_T_VENDOR_7E = 0x7e,
301 	SES_SASCONN_T_VENDOR_7F = 0x7f
302 } ses_sasconn_type_t;
303 
304 /*
305  * Simple Subenclosure properties
306  */
307 #define	SES_SS_PROP_SHORT_STATUS	"ses-short-status"	/* U64 */
308 
309 /*
310  * Temperature Sensor properties
311  */
312 #define	SES_TEMP_PROP_TEMP		"ses-temperature"	/* I64 */
313 #define	SES_TEMP_PROP_UNDERTEMP_WARN	"ses-undertemperature-warning"
314 #define	SES_TEMP_PROP_UNDERTEMP_FAIL	"ses-undertemperature-failure"
315 #define	SES_TEMP_PROP_OVERTEMP_WARN	"ses-overtemperature-warning"
316 #define	SES_TEMP_PROP_OVERTEMP_FAIL	"ses-overtemperature-failure"
317 
318 /*
319  * Uninterruptible Power Supply properties
320  */
321 #define	SES_UPS_PROP_TIMELEFT		"ses-battery-time-remaining" /* U64 */
322 #define	SES_UPS_PROP_INTF_FAIL		"ses-interface-failure"
323 #define	SES_UPS_PROP_WARN		"ses-low-battery-warning"
324 #define	SES_UPS_PROP_UPS_FAIL		"ses-ups-failure"
325 #define	SES_UPS_PROP_DC_FAIL		"ses-dc-failure"
326 #define	SES_UPS_PROP_AC_FAIL		"ses-ac-failure"
327 #define	SES_UPS_PROP_AC_QUAL		"ses-ac-quality-exception"
328 #define	SES_UPS_PROP_AC_HI		"ses-ac-overvoltage-exception"
329 #define	SES_UPS_PROP_AC_LO		"ses-ac-undervoltage-exception"
330 #define	SES_UPS_PROP_BPF		"ses-battery-failure-predicted"
331 #define	SES_UPS_PROP_BATT_FAIL		"ses-battery-failure"
332 
333 /*
334  * Voltage Sensor properties
335  */
336 #define	SES_VS_PROP_CRIT_UNDER		"ses-undervoltage-critical"
337 #define	SES_VS_PROP_CRIT_OVER		"ses-overvoltage-critical"
338 #define	SES_VS_PROP_WARN_UNDER		"ses-undervoltage-warning"
339 #define	SES_VS_PROP_WARN_OVER		"ses-overvoltage-warning"
340 #define	SES_VS_PROP_VOLTAGE_MV		"ses-voltage"		/* I64 */
341 
342 /*
343  * Enclosure Services Controller properties (Control only)
344  */
345 #define	SES_ESC_PROP_SELECT		"ses-select-element"
346 
347 /*
348  * Primary/Subenclosure properties
349  */
350 #define	SES_EN_PROP_EID			"ses-enclosure-id"	/* U64 */
351 #define	SES_EN_PROP_ESPID		"ses-enclosure-service-proc-id"
352 #define	SES_EN_PROP_NESP		"ses-enclosure-service-proc-count"
353 #define	SES_EN_PROP_LID			"ses-logical-id"		/* NV */
354 #define	SES_EN_PROP_VID			"ses-vendor-id"		/* S */
355 #define	SES_EN_PROP_PID			"ses-product-id"	/* S */
356 #define	SES_EN_PROP_REV			"ses-product-revision"	/* S */
357 #define	SES_EN_PROP_VS			"ses-product-vendor-specific" /* BA */
358 
359 #define	SES_EN_PROP_UNRECOV		"ses-status-unrecoverable"
360 #define	SES_EN_PROP_CRIT		"ses-status-critical"
361 #define	SES_EN_PROP_NONCRIT		"ses-status-noncritical"
362 #define	SES_EN_PROP_INFO		"ses-status-informational"
363 #define	SES_EN_PROP_INVOP		"ses-status-invalid-operation"
364 #define	SES_EN_PROP_HELP		"ses-help-text"		/* S */
365 #define	SES_EN_PROP_STRING		"ses-string-in-data"	/* BA */
366 #define	SES_EN_PROP_SHORT		"ses-short-status"	/* U64 */
367 #define	SES_EN_PROP_UCODE		"ses-microcode-dl-status" /* U64 */
368 typedef enum ses2_dl_ucode_status {
369 	SES2_DLUCODE_S_NOP = 0,
370 	SES2_DLUCODE_S_INPROGRESS = 0x1,
371 	SES2_DLUCODE_S_SAVING = 0x2,
372 	SES2_DLUCODE_S_INTERIM_3 = 0x3,
373 	SES2_DLUCODE_S_INTERIM_4 = 0x4,
374 	SES2_DLUCODE_S_INTERIM_5 = 0x5,
375 	SES2_DLUCODE_S_INTERIM_6 = 0x6,
376 	SES2_DLUCODE_S_INTERIM_7 = 0x7,
377 	SES2_DLUCODE_S_INTERIM_8 = 0x8,
378 	SES2_DLUCODE_S_INTERIM_9 = 0x9,
379 	SES2_DLUCODE_S_INTERIM_A = 0xa,
380 	SES2_DLUCODE_S_INTERIM_B = 0xb,
381 	SES2_DLUCODE_S_INTERIM_C = 0xc,
382 	SES2_DLUCODE_S_INTERIM_D = 0xd,
383 	SES2_DLUCODE_S_INTERIM_E = 0xe,
384 	SES2_DLUCODE_S_INTERIM_F = 0xf,
385 	SES2_DLUCODE_S_COMPLETE_NOW = 0x10,
386 	SES2_DLUCODE_S_COMPLETE_AT_RESET = 0x11,
387 	SES2_DLUCODE_S_COMPLETE_AT_POWERON = 0x12,
388 	SES2_DLUCODE_S_VENDOR_70 = 0x70,
389 	SES2_DLUCODE_S_VENDOR_71 = 0x71,
390 	SES2_DLUCODE_S_VENDOR_72 = 0x72,
391 	SES2_DLUCODE_S_VENDOR_73 = 0x73,
392 	SES2_DLUCODE_S_VENDOR_74 = 0x74,
393 	SES2_DLUCODE_S_VENDOR_75 = 0x75,
394 	SES2_DLUCODE_S_VENDOR_76 = 0x76,
395 	SES2_DLUCODE_S_VENDOR_77 = 0x77,
396 	SES2_DLUCODE_S_VENDOR_78 = 0x78,
397 	SES2_DLUCODE_S_VENDOR_79 = 0x79,
398 	SES2_DLUCODE_S_VENDOR_7A = 0x7a,
399 	SES2_DLUCODE_S_VENDOR_7B = 0x7b,
400 	SES2_DLUCODE_S_VENDOR_7C = 0x7c,
401 	SES2_DLUCODE_S_VENDOR_7D = 0x7d,
402 	SES2_DLUCODE_S_VENDOR_7E = 0x7e,
403 	SES2_DLUCODE_S_VENDOR_7F = 0x7f,
404 	SES2_DLUCODE_S_PAGE_ERR = 0x80,
405 	SES2_DLUCODE_S_IMAGE_ERR = 0x81,
406 	SES2_DLUCODE_S_TIMEOUT = 0x82,
407 	SES2_DLUCODE_S_INTERNAL_NEEDIMAGE = 0x83,
408 	SES2_DLUCODE_S_INTERNAL_SAFE = 0x84,
409 	SES2_DLUCODE_S_VENDOR_ERR_F0 = 0xf0,
410 	SES2_DLUCODE_S_VENDOR_ERR_F1 = 0xf1,
411 	SES2_DLUCODE_S_VENDOR_ERR_F2 = 0xf2,
412 	SES2_DLUCODE_S_VENDOR_ERR_F3 = 0xf3,
413 	SES2_DLUCODE_S_VENDOR_ERR_F4 = 0xf4,
414 	SES2_DLUCODE_S_VENDOR_ERR_F5 = 0xf5,
415 	SES2_DLUCODE_S_VENDOR_ERR_F6 = 0xf6,
416 	SES2_DLUCODE_S_VENDOR_ERR_F7 = 0xf7,
417 	SES2_DLUCODE_S_VENDOR_ERR_F8 = 0xf8,
418 	SES2_DLUCODE_S_VENDOR_ERR_F9 = 0xf9,
419 	SES2_DLUCODE_S_VENDOR_ERR_FA = 0xfa,
420 	SES2_DLUCODE_S_VENDOR_ERR_FB = 0xfb,
421 	SES2_DLUCODE_S_VENDOR_ERR_FC = 0xfc,
422 	SES2_DLUCODE_S_VENDOR_ERR_FD = 0xfd,
423 	SES2_DLUCODE_S_VENDOR_ERR_FE = 0xfe,
424 	SES2_DLUCODE_S_VENDOR_ERR_FF = 0xff
425 } ses2_dl_ucode_status_t;
426 
427 typedef enum ses_dl_ucode_mode {
428 	SES_DLUCODE_M_WITH_OFFS = 6,
429 	SES_DLUCODE_M_WITH_OFFS_SAVE = 7
430 } ses_dl_ucode_mode_t;
431 
432 #define	SES_EN_PROP_UCODE_A		"ses-microcode-dl-addl-status" /* U64 */
433 #define	SES_EN_PROP_UCODE_SZ		"ses-microcode-maximum-size" /* U64 */
434 #define	SES_EN_PROP_UCODE_BUF		"ses-microcode-buffer-id" /* U64 */
435 #define	SES_EN_PROP_UCODE_OFF		"ses-microcode-buffer-offset" /* U64 */
436 
437 #define	SES_EN_PROP_NICK		"ses-nickname"		/* S */
438 #define	SES_EN_PROP_NICK_STATUS		"ses-nickname-status"	/* U64 */
439 typedef enum ses_subnick_status {
440 	SES_SNS_NO_ERROR = 0x0,
441 	SES_SNS_ERR_PAGE = 0x80,
442 	SES_SNS_ERR_INT_NICKLOST = 0x81,
443 	SES_SNS_ERR_INT_PRESERVED = 0x82
444 } ses_subnick_status_t;
445 
446 #define	SES_EN_PROP_NICK_ADDL_STATUS	"ses-nickname-additional-status"
447 #define	SES_EN_PROP_NICK_LANG		"ses-nickname-language"	/* U64 */
448 
449 #define	SES_EN_PROP_POWER_DELAY		"ses-power-cycle-delay"	/* U64 */
450 #define	SES_EN_PROP_POWER_DURATION	"ses-power-cycle-duration" /* U64 */
451 #define	SES_EN_PROP_POWER_REQUEST	"ses-power-cycle-request" /* U64 */
452 
453 typedef enum ses_power_delay {
454 	SES_PDL_NONE = 0x0,
455 	SES_PDL_IMMEDIATE = 0x3f
456 } ses_power_delay_t;
457 
458 typedef enum ses_power_duration {
459 	SES_PDR_NONE = 0x0,
460 	SES_PDR_MANUAL = 0x3f
461 } ses_power_duration_t;
462 
463 typedef enum ses_power_request {
464 	SES_PRQ_NONE = 0x0,
465 	SES_PRQ_SET = 0x1,
466 	SES_PRQ_CANCEL = 0x2
467 } ses_power_request_t;
468 
469 /*
470  * IEEE logical IDs (for SES_EN_PROP_LID)
471  */
472 #define	SPC3_NAA_INT			"naa-id-integer"	/* U64 */
473 #define	SPC3_NAA_ID_TYPE		"naa-id-type"		/* U64 */
474 #define	SPC3_NAA_COMPANY_ID		"naa-company-id"	/* U64 */
475 #define	SPC3_NAA_VS_A			"naa-vendor-specific-a"	/* U64 */
476 #define	SPC3_NAA_VS_B			"naa-vendor-specific-b"	/* U64 */
477 
478 /*
479  * SES-2 Diagnostic page codes (Table 5, 6.1.1).  The set of exported pages
480  * constitutes an inter-plugin interface and is therefore part of the public
481  * header file.
482  */
483 typedef enum ses2_diag_page {
484 	SES2_DIAGPAGE_SUPPORTED_PAGES = 0x00,
485 	SES2_DIAGPAGE_CONFIG = 0x01,
486 	SES2_DIAGPAGE_ENCLOSURE_CTL_STATUS = 0x02,
487 	SES2_DIAGPAGE_HELP_TEXT = 0x03,
488 	SES2_DIAGPAGE_STRING_IO = 0x04,
489 	SES2_DIAGPAGE_THRESHOLD_IO = 0x05,
490 	SES2_DIAGPAGE_ELEMENT_DESC = 0x07,
491 	SES2_DIAGPAGE_SHORT_STATUS = 0x08,
492 	SES2_DIAGPAGE_ENCLOSURE_BUSY = 0x09,
493 	SES2_DIAGPAGE_ADDL_ELEM_STATUS = 0x0a,
494 	SES2_DIAGPAGE_SUBENCLOSURE_HELP_TEXT = 0x0b,
495 	SES2_DIAGPAGE_SUBENCLOSURE_STRING_IO = 0x0c,
496 	SES2_DIAGPAGE_SUPPORTED_SES_PAGES = 0x0d,
497 	SES2_DIAGPAGE_DL_MICROCODE_CTL_STATUS = 0x0e,
498 	SES2_DIAGPAGE_SUBENCLOSURE_NICKNAME_CTL_STATUS = 0x0f,
499 	SES2_DIAGPAGE_VENDOR_0 = 0x10,
500 	SES2_DIAGPAGE_VENDOR_1 = 0x11,
501 	SES2_DIAGPAGE_VENDOR_2 = 0x12,
502 	SES2_DIAGPAGE_VENDOR_3 = 0x13,
503 	SES2_DIAGPAGE_VENDOR_4 = 0x14,
504 	SES2_DIAGPAGE_VENDOR_5 = 0x15,
505 	SES2_DIAGPAGE_VENDOR_6 = 0x16,
506 	SES2_DIAGPAGE_VENDOR_7 = 0x17,
507 	SES2_DIAGPAGE_VENDOR_8 = 0x18,
508 	SES2_DIAGPAGE_VENDOR_9 = 0x19,
509 	SES2_DIAGPAGE_VENDOR_A = 0x1a,
510 	SES2_DIAGPAGE_VENDOR_B = 0x1b,
511 	SES2_DIAGPAGE_VENDOR_C = 0x1c,
512 	SES2_DIAGPAGE_VENDOR_D = 0x1d,
513 	SES2_DIAGPAGE_VENDOR_E = 0x1e,
514 	SES2_DIAGPAGE_VENDOR_F = 0x1f
515 } ses2_diag_page_t;
516 
517 #define	SES_CTL_OP_SETPROP		"ses-ctl-setprop"
518 #define	SES_CTL_OP_DL_UCODE		"ses-ctl-dl-ucode"
519 
520 #define	SES_CTL_PROP_UCODE_DATA		"ses-ctl-ucode-data"
521 #define	SES_CTL_PROP_UCODE_BUFID	"ses-ctl-ucode-bufid"
522 #define	SES_CTL_PROP_UCODE_MODE		"ses-ctl-ucode-mode"
523 
524 #ifdef	__cplusplus
525 }
526 #endif
527 
528 #endif	/* _FRAMEWORK_SES_H */
529