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