1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
|
/*
* ****************************************************************************
* I2O SIG All rights reserved.
*
* These header files are provided, pursuant to your I2O SIG membership
* agreement, free of charge on an as-is basis without warranty of any kind,
* either express or implied, including but not limited to, implied warranties
* or merchantability and fitness for a particular purpose. I2O SIG does not
* warrant that this program will meet the user's requirements or that the
* operation of these programs will be uninterrupted or error-free.
* Acceptance and use of this program constitutes the user's understanding
* that he will have no recourse to I2O SIG for any actual or consequential
* damages including, but not limited to, loss profits arising out of use
* or inability to use this program.
*
* Member is permitted to create derivative works to this header-file program.
* However, all copies of the program and its derivative works must contain the
* I2O SIG copyright notice.
*
* ****************************************************************************
*/
/*
* **************************************************************************
*
* i2oadptr.h -- I2O Adapter Class Message defintion file
*
* This file contains information presented in Chapter 6 of
* the I2o Specification.
*
* ***************************************************************************
*/
/*
* Copyright (c) 1998 by Sun Microsystems, Inc.
* All rights reserved.
*/
#ifndef _SYS_I2OADPTR_H
#define _SYS_I2OADPTR_H
#pragma ident "%W% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#define I2OADPTR_REV 1_5_1 /* Header file revision string */
/*
* NOTES: See i2omsg.h for more info
*/
#include <sys/i2o/i2omsg.h> /* Include the Base Message file */
#include <sys/types.h> /* For system types defines */
/*
* BUS ADAPTER CLASS SPECIFIC FUNCTIONS
*/
#define I2O_HBA_ADAPTER_RESET 0x85
#define I2O_HBA_BUS_QUIESCE 0x8b
#define I2O_HBA_BUS_RESET 0x87
#define I2O_HBA_BUS_SCAN 0x89
/*
* Detailed Status Codes for HBA operations
*
* Note:
* The 16-bit Detailed Status Code field for HBA operations is divided
* into two separate 8-bit fields. The lower 8 bits are reserved. The
* upper 8 bits are used to report Adapter Status information. The
* definitions for these two fields, however, will be consistent with
* the standard reply message frame structure declaration, which treats
* this as a single 16-bit field. In addition, the values used will be
* consistent with the Adapter Status codes defined for the SCSI
* Peripheral class. Theses codes are based on CAM-1. In other words,
* these definitions are a subset of the SCSI peripheral class codes.
* Where applicable, "SCSI" has been removed from the definition.
*
*/
#define I2O_HBA_DSC_MASK 0xFF00
#define I2O_HBA_DSC_SUCCESS 0x0000
#define I2O_HBA_DSC_ADAPTER_BUSY 0x0500
#define I2O_HBA_DSC_COMMAND_TIMEOUT 0x0B00
#define I2O_HBA_DSC_COMPLETE_WITH_ERROR 0x0400
#define I2O_HBA_DSC_FUNCTION_UNAVAILABLE 0x3A00
#define I2O_HBA_DSC_NO_ADAPTER 0x1100
#define I2O_HBA_DSC_PARITY_ERROR_FAILURE 0x0F00
#define I2O_HBA_DSC_PATH_INVALID 0x0700
#define I2O_HBA_DSC_PROVIDE_FAILURE 0x1600
#define I2O_HBA_DSC_QUEUE_FROZEN 0x4000
#define I2O_HBA_DSC_REQUEST_ABORTED 0x0200
#define I2O_HBA_DSC_REQUEST_INVALID 0x0600
#define I2O_HBA_DSC_REQUEST_LENGTH_ERROR 0x1500
#define I2O_HBA_DSC_REQUEST_TERMINATED 0x1800
#define I2O_HBA_DSC_RESOURCE_UNAVAILABLE 0x3400
#define I2O_HBA_DSC_BUS_BUSY 0x3F00
#define I2O_HBA_DSC_BUS_RESET 0x0E00
#define I2O_HBA_DSC_ID_INVALID 0x3900
#define I2O_HBA_DSC_SEQUENCE_FAILURE 0x1400
#define I2O_HBA_DSC_UNABLE_TO_ABORT 0x0300
#define I2O_HBA_DSC_UNABLE_TO_TERMINATE 0x0900
#define I2O_HBA_DSC_UNACKNOWLEDGED_EVENT 0x3500
#define I2O_HBA_DSC_UNEXPECTED_BUS_FREE 0x1300
/*
* Bus Adapter Parameter Groups
*/
#define I2O_HBA_CONTROLLER_INFO_GROUP_NO 0x0000
#define I2O_HBA_HISTORICAL_STATS_GROUP_NO 0x0100
#define I2O_HBA_SCSI_CONTROLLER_INFO_GROUP_NO 0x0200
#define I2O_HBA_SCSI_BUS_PORT_INFO_GROUP_NO 0x0201
#define I2O_HBA_FCA_CONTROLLER_INFO_GROUP_NO 0x0300
#define I2O_HBA_FCA_PORT_INFO_GROUP_NO 0x0301
/*
* - 0000h - HBA Controller Information Parameter Group
*/
/*
* Bus Type
*/
#define I2O_HBA_BUS_TYPE_GENERIC 0x00
#define I2O_HBA_BUS_TYPE_SCSI 0x01
#define I2O_HBA_BUS_TYPE_FCA 0x10
typedef struct i2o_hba_controller_info_scalar {
uint8_t BusType;
uint8_t BusState;
uint16_t Reserved2;
uint8_t BusName[12];
} i2o_hba_controller_info_scalar_t;
/*
* - 0100h - HBA Historical Stats Parameter Group
*/
typedef struct i2o_hba_hist_stats_scalar {
uint32_t TimeLastPoweredUp;
uint32_t TimeLastReset;
} i2o_hba_hist_stats_scalar_t;
/*
* - 0200h - HBA SCSI Controller Information Parameter Group
*/
/*
* SCSI Type
*/
#define I2O_SCSI_TYPE_UNKNOWN 0x00
#define I2O_SCSI_TYPE_SCSI_1 0x01
#define I2O_SCSI_TYPE_SCSI_2 0x02
#define I2O_SCSI_TYPE_SCSI_3 0x03
/*
* Protection Management
*/
#define I2O_SCSI_PORT_PROT_OTHER 0x00
#define I2O_SCSI_PORT_PROT_UNKNOWN 0x01
#define I2O_SCSI_PORT_PROT_UNPROTECTED 0x02
#define I2O_SCSI_PORT_PROT_PROTECTED 0x03
#define I2O_SCSI_PORT_PROT_SCC 0x04
/*
* Settings
*/
#define I2O_SCSI_PORT_PARITY_FLAG 0x01
#define I2O_SCSI_PORT_PARITY_DISABLED 0x00
#define I2O_SCSI_PORT_PARITY_ENABLED 0x01
#define I2O_SCSI_PORT_SCAN_ORDER_FLAG 0x02
#define I2O_SCSI_PORT_SCAN_LOW_TO_HIGH 0x00
#define I2O_SCSI_PORT_SCAN_HIGH_TO_LOW 0x02
#define I2O_SCSI_PORT_IID_FLAG 0x04
#define I2O_SCSI_PORT_IID_DEFAULT 0x00
#define I2O_SCSI_PORT_IID_SPECIFIED 0x04
#define I2O_SCSI_PORT_SCAM_FLAG 0x08
#define I2O_SCSI_PORT_SCAM_DISABLED 0x00
#define I2O_SCSI_PORT_SCAM_ENABLED 0x08
#define I2O_SCSI_PORT_TYPE_FLAG 0x80
#define I2O_SCSI_PORT_TYPE_PARALLEL 0x00
#define I2O_SCSI_PORT_TYPE_SERIAL 0x80
typedef struct i2o_hba_scsi_controller_info_scalar {
uint8_t SCSIType;
uint8_t ProtectionManagement;
uint8_t Settings;
uint8_t Reserved1;
uint32_t InitiatorID;
uint64_t ScanLun0Only;
uint16_t DisableDevice;
uint8_t MaxOffset;
uint8_t MaxDataWidth;
uint64_t MaxSyncRate;
} i2o_hba_scsi_controller_info_scalar_t;
/*
* - 0201h - HBA SCSI Bus Port Information Parameter Group
*/
/*
* NOTE: Refer to the SCSI Peripheral Class Bus Port Information
* Parameter Group field definitions for HBA SCSI Bus Port
* field definitions.
*/
typedef struct i2o_hba_scsi_bus_port_info_scalar {
uint8_t PhysicalInterface;
uint8_t ElectricalInterface;
uint8_t Isochronous;
uint8_t ConnectorType;
uint8_t ConnectorGender;
uint8_t Reserved1;
uint16_t Reserved2;
uint32_t MaxNumberDevices;
uint32_t DeviceIdBegin;
uint32_t DeviceIdEnd;
uint8_t LunBegin[8];
uint8_t LunEnd[8];
} i2o_hba_scsi_bus_port_info_scalar_t;
/*
* - 0300h - HBA FCA Controller Information Parameters Group defines
*/
/*
* SCSI Type
*/
#define I2O_FCA_TYPE_UNKNOWN 0x00
#define I2O_FCA_TYPE_FCAL 0x01
typedef struct i2o_hba_fca_controller_info_scalar {
uint8_t FcaType;
uint8_t Reserved1;
uint16_t Reserved2;
} i2o_hba_fca_controller_info_scalar_t;
/*
* - 0301h - HBA FCA Port Information Parameters Group defines
*/
typedef struct i2o_hba_fca_port_info_scalar {
uint32_t Reserved4;
} i2o_hba_fca_port_info_scalar_t;
/*
* I2O BUS ADAPTER CLASS SPECIFIC MESSAGE DEFINITIONS
*/
/*
* I2O Bus Adapter Class Reply Message Frame
*/
typedef struct i2o_hba_reply_message_frame {
i2o_single_reply_message_frame_t StdReplyFrame;
} i2o_hba_reply_message_frame_t;
/*
* I2O HBA Adapter Reset Message Frame
*/
typedef struct i2o_hba_adapter_reset_message {
i2o_message_frame_t StdMessageFrame;
i2o_transaction_context_t TransactionContext;
} i2o_hba_adapter_reset_message_t;
/*
* I2O HBA Bus Quiesce Message Frame
*/
typedef uint32_t i2o_hbq_flags_t;
#define I2O_HBQ_FLAG_NORMAL 0x0000
#define I2O_HBQ_FLAG_QUIESCE 0x0001
typedef struct i2o_hba_bus_quiesce_message {
i2o_message_frame_t StdMessageFrame;
i2o_transaction_context_t TransactionContext;
i2o_hbq_flags_t Flags;
} i2o_hba_bus_quiesce_message_t;
/*
* I2O HBA Bus Reset Message Frame
*/
typedef struct i2o_hba_bus_reset_message {
i2o_message_frame_t StdMessageFrame;
i2o_transaction_context_t TransactionContext;
} i2o_hba_bus_reset_message_t;
/*
* I2O HBA Bus Scan Message Frame
*/
/*
* NOTE: SCSI-2 8-bit scalar LUN goes into offset 1 of Lun arrays
*/
typedef struct i2o_hba_bus_scan_message {
i2o_message_frame_t StdMessageFrame;
i2o_transaction_context_t TransactionContext;
} i2o_hba_bus_scan_message_t;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_I2OADPTR_H */
|