xref: /titanic_50/usr/src/uts/common/io/cpqary3/cpqary3_noe.h (revision 80c94ecd7a524eb933a4bb221a9618b9dc490e76)
1*80c94ecdSKeith M Wesolowski /*
2*80c94ecdSKeith M Wesolowski  * This file and its contents are supplied under the terms of the
3*80c94ecdSKeith M Wesolowski  * Common Development and Distribution License ("CDDL"), version 1.0.
4*80c94ecdSKeith M Wesolowski  * You may only use this file in accordance with the terms of version
5*80c94ecdSKeith M Wesolowski  * 1.0 of the CDDL.
6*80c94ecdSKeith M Wesolowski  *
7*80c94ecdSKeith M Wesolowski  * A full copy of the text of the CDDL should have accompanied this
8*80c94ecdSKeith M Wesolowski  * source.  A copy of the CDDL is also available via the Internet at
9*80c94ecdSKeith M Wesolowski  * http://www.illumos.org/license/CDDL.
10*80c94ecdSKeith M Wesolowski  */
11*80c94ecdSKeith M Wesolowski 
12*80c94ecdSKeith M Wesolowski /*
13*80c94ecdSKeith M Wesolowski  * Copyright (C) 2013 Hewlett-Packard Development Company, L.P.
14*80c94ecdSKeith M Wesolowski  */
15*80c94ecdSKeith M Wesolowski 
16*80c94ecdSKeith M Wesolowski #ifndef	_CPQARY3_NOE_H
17*80c94ecdSKeith M Wesolowski #define	_CPQARY3_NOE_H
18*80c94ecdSKeith M Wesolowski 
19*80c94ecdSKeith M Wesolowski #ifdef	__cplusplus
20*80c94ecdSKeith M Wesolowski extern "C" {
21*80c94ecdSKeith M Wesolowski #endif
22*80c94ecdSKeith M Wesolowski 
23*80c94ecdSKeith M Wesolowski /*
24*80c94ecdSKeith M Wesolowski  * Information from CPQARY3 on Notification of Events
25*80c94ecdSKeith M Wesolowski  * View Hardware API for more information
26*80c94ecdSKeith M Wesolowski  */
27*80c94ecdSKeith M Wesolowski 
28*80c94ecdSKeith M Wesolowski #define	CISS_NOE_CDB_LEN 			0x0D
29*80c94ecdSKeith M Wesolowski #define	CISS_CANCEL_NOE_CDB_LEN		0x10
30*80c94ecdSKeith M Wesolowski #define	BMIC_NOTIFY_ON_EVENT 		0xD0
31*80c94ecdSKeith M Wesolowski #define	BMIC_CANCEL_NOTIFY_ON_EVENT 0xD1
32*80c94ecdSKeith M Wesolowski #define	NOE_BUFFER_LENGTH			0x200
33*80c94ecdSKeith M Wesolowski 
34*80c94ecdSKeith M Wesolowski #pragma pack(1)
35*80c94ecdSKeith M Wesolowski 
36*80c94ecdSKeith M Wesolowski typedef struct Noe_Buffer {
37*80c94ecdSKeith M Wesolowski 	uint32_t	relative_controller_time;
38*80c94ecdSKeith M Wesolowski 	uint16_t	event_class_code;
39*80c94ecdSKeith M Wesolowski 	uint16_t	event_subclass_code;
40*80c94ecdSKeith M Wesolowski 	uint16_t	event_detail_code;
41*80c94ecdSKeith M Wesolowski 	uint8_t		event_specific_data[64];
42*80c94ecdSKeith M Wesolowski 	uint8_t		ascii_message[80];
43*80c94ecdSKeith M Wesolowski 	uint32_t	event_tag;
44*80c94ecdSKeith M Wesolowski 	uint16_t	month_day;
45*80c94ecdSKeith M Wesolowski 	uint16_t	year;
46*80c94ecdSKeith M Wesolowski 	uint32_t	hms;
47*80c94ecdSKeith M Wesolowski 	uint16_t	pre_powerup_time;
48*80c94ecdSKeith M Wesolowski 	uint8_t		device_address[8];
49*80c94ecdSKeith M Wesolowski 	uint8_t		reserved[336];
50*80c94ecdSKeith M Wesolowski } NoeBuffer;
51*80c94ecdSKeith M Wesolowski 
52*80c94ecdSKeith M Wesolowski #pragma pack()
53*80c94ecdSKeith M Wesolowski 
54*80c94ecdSKeith M Wesolowski #define	CPQARY3_NOE_INIT	0
55*80c94ecdSKeith M Wesolowski #define	CPQARY3_NOE_RESUBMIT 	1
56*80c94ecdSKeith M Wesolowski #define	CPQARY3_NOE_FAILED	3
57*80c94ecdSKeith M Wesolowski 
58*80c94ecdSKeith M Wesolowski /*
59*80c94ecdSKeith M Wesolowski  * This hierarchy is described in the firmware spec.
60*80c94ecdSKeith M Wesolowski  * It provides various categories of reports to provide for
61*80c94ecdSKeith M Wesolowski  * notification to host regarding asynchronous phenomena.
62*80c94ecdSKeith M Wesolowski  */
63*80c94ecdSKeith M Wesolowski #define	CLASS_PROTOCOL		0	/* Event Notifier Protocol */
64*80c94ecdSKeith M Wesolowski #define	SUB_CLASS_NON_EVENT	0
65*80c94ecdSKeith M Wesolowski #define	DETAIL_DISABLED		1
66*80c94ecdSKeith M Wesolowski #define	SUB_CLASS_PROTOCOL_ERR	1
67*80c94ecdSKeith M Wesolowski #define	DETAIL_EVENT_Q_OVERFLOW	0
68*80c94ecdSKeith M Wesolowski 
69*80c94ecdSKeith M Wesolowski #define	CLASS_HOT_PLUG		1	/* All Hot-Plug Operations */
70*80c94ecdSKeith M Wesolowski #define	SUB_CLASS_HP_CHANGE	0
71*80c94ecdSKeith M Wesolowski 
72*80c94ecdSKeith M Wesolowski /*
73*80c94ecdSKeith M Wesolowski  * New events for HP Smart Array controllers - FW revision greater than 5.14
74*80c94ecdSKeith M Wesolowski  * or later
75*80c94ecdSKeith M Wesolowski  */
76*80c94ecdSKeith M Wesolowski 
77*80c94ecdSKeith M Wesolowski /* Storage Box HotPlug or Cabling Change */
78*80c94ecdSKeith M Wesolowski #define	SUB_CLASS_SB_HP_CHANGE		6
79*80c94ecdSKeith M Wesolowski #define	DETAIL_STORAGEBOX_REMOVED	0	/* Storage box Removed */
80*80c94ecdSKeith M Wesolowski #define	DETAIL_STORAGEBOX_ADDED		1	/* Storage Box Added */
81*80c94ecdSKeith M Wesolowski /* Storage Box Redundant I/O Module Removed */
82*80c94ecdSKeith M Wesolowski #define	DETAIL_PATH_REMOVED		2
83*80c94ecdSKeith M Wesolowski /* Storage Box Redundant I/O Module (or its path) Added */
84*80c94ecdSKeith M Wesolowski #define	DETAIL_PATH_ADDED		3
85*80c94ecdSKeith M Wesolowski /* Storage Box (or its first path) Repaired (re-added after failure) */
86*80c94ecdSKeith M Wesolowski #define	DETIAL_STORAGEBOX_REPAIRED	4
87*80c94ecdSKeith M Wesolowski /* Storage Box Redundant I/O Module (or its path) Repaired */
88*80c94ecdSKeith M Wesolowski #define	DETAIL_PATH_REPAIRED		5
89*80c94ecdSKeith M Wesolowski 
90*80c94ecdSKeith M Wesolowski /* Disk Drive Redundant Path Change */
91*80c94ecdSKeith M Wesolowski #define	SUB_CLASS_DD_PATH_CHANGE	7
92*80c94ecdSKeith M Wesolowski /* Redundant path to configured disk drive is Hot Removed */
93*80c94ecdSKeith M Wesolowski #define	DETAIL_DD_HOT_REMOVED		0
94*80c94ecdSKeith M Wesolowski 
95*80c94ecdSKeith M Wesolowski #define	CLASS_HARDWARE		2	/* Cable, Memory, Fan */
96*80c94ecdSKeith M Wesolowski #define	SUB_CLASS_RC_CHANGE	7	/* Redundant Cabling Change */
97*80c94ecdSKeith M Wesolowski /* Unsupported Configuration Occurred Online */
98*80c94ecdSKeith M Wesolowski #define	DETAIL_UNSUPPORTED_CONFIGURATION 0
99*80c94ecdSKeith M Wesolowski #define	CLASS_ENVIRONMENT	3	/* Temperature, Power, Chasis, UPS */
100*80c94ecdSKeith M Wesolowski 
101*80c94ecdSKeith M Wesolowski #define	CLASS_PHYSICAL_DRIVE	4	/* Physical drive Changes */
102*80c94ecdSKeith M Wesolowski 
103*80c94ecdSKeith M Wesolowski #define	CLASS_LOGICAL_DRIVE	5	/* Logical drive Changes */
104*80c94ecdSKeith M Wesolowski #define	SUB_CLASS_STATUS	0
105*80c94ecdSKeith M Wesolowski #define	DETAIL_CHANGE		0
106*80c94ecdSKeith M Wesolowski #define	MEDIA_EXCHANGE		1
107*80c94ecdSKeith M Wesolowski 
108*80c94ecdSKeith M Wesolowski /* Spare Status States */
109*80c94ecdSKeith M Wesolowski #define	SPARE_UNDEFINED		0x00
110*80c94ecdSKeith M Wesolowski #define	SPARES_DESIGNATED	0x01
111*80c94ecdSKeith M Wesolowski #define	SPARE_REBUILDING	0x02
112*80c94ecdSKeith M Wesolowski #define	SPARE_REBUILT		0x04
113*80c94ecdSKeith M Wesolowski #define	SPARES_BAD		0x08
114*80c94ecdSKeith M Wesolowski #define	SPARE_ACTIVE		0x10
115*80c94ecdSKeith M Wesolowski #define	SPARE_AVAILABLE   		0x20
116*80c94ecdSKeith M Wesolowski 
117*80c94ecdSKeith M Wesolowski #ifdef	__cplusplus
118*80c94ecdSKeith M Wesolowski }
119*80c94ecdSKeith M Wesolowski #endif
120*80c94ecdSKeith M Wesolowski 
121*80c94ecdSKeith M Wesolowski #endif	/* _CPQARY3_NOE_H */
122