xref: /linux/include/uapi/linux/i2o-dev.h (revision 498495dba268b20e8eadd7fe93c140c68b6cc9d2)
1*e2be04c7SGreg Kroah-Hartman /* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */
2607ca46eSDavid Howells /*
3607ca46eSDavid Howells  * I2O user space accessible structures/APIs
4607ca46eSDavid Howells  *
5607ca46eSDavid Howells  * (c) Copyright 1999, 2000 Red Hat Software
6607ca46eSDavid Howells  *
7607ca46eSDavid Howells  * This program is free software; you can redistribute it and/or
8607ca46eSDavid Howells  * modify it under the terms of the GNU General Public License
9607ca46eSDavid Howells  * as published by the Free Software Foundation; either version
10607ca46eSDavid Howells  * 2 of the License, or (at your option) any later version.
11607ca46eSDavid Howells  *
12607ca46eSDavid Howells  *************************************************************************
13607ca46eSDavid Howells  *
14607ca46eSDavid Howells  * This header file defines the I2O APIs that are available to both
15607ca46eSDavid Howells  * the kernel and user level applications.  Kernel specific structures
16607ca46eSDavid Howells  * are defined in i2o_osm. OSMs should include _only_ i2o_osm.h which
17607ca46eSDavid Howells  * automatically includes this file.
18607ca46eSDavid Howells  *
19607ca46eSDavid Howells  */
20607ca46eSDavid Howells 
21607ca46eSDavid Howells #ifndef _I2O_DEV_H
22607ca46eSDavid Howells #define _I2O_DEV_H
23607ca46eSDavid Howells 
24607ca46eSDavid Howells /* How many controllers are we allowing */
25607ca46eSDavid Howells #define MAX_I2O_CONTROLLERS	32
26607ca46eSDavid Howells 
27607ca46eSDavid Howells #include <linux/ioctl.h>
28607ca46eSDavid Howells #include <linux/types.h>
29607ca46eSDavid Howells 
30607ca46eSDavid Howells /*
31607ca46eSDavid Howells  * I2O Control IOCTLs and structures
32607ca46eSDavid Howells  */
33607ca46eSDavid Howells #define I2O_MAGIC_NUMBER	'i'
34607ca46eSDavid Howells #define I2OGETIOPS		_IOR(I2O_MAGIC_NUMBER,0,__u8[MAX_I2O_CONTROLLERS])
35607ca46eSDavid Howells #define I2OHRTGET		_IOWR(I2O_MAGIC_NUMBER,1,struct i2o_cmd_hrtlct)
36607ca46eSDavid Howells #define I2OLCTGET		_IOWR(I2O_MAGIC_NUMBER,2,struct i2o_cmd_hrtlct)
37607ca46eSDavid Howells #define I2OPARMSET		_IOWR(I2O_MAGIC_NUMBER,3,struct i2o_cmd_psetget)
38607ca46eSDavid Howells #define I2OPARMGET		_IOWR(I2O_MAGIC_NUMBER,4,struct i2o_cmd_psetget)
39607ca46eSDavid Howells #define I2OSWDL 		_IOWR(I2O_MAGIC_NUMBER,5,struct i2o_sw_xfer)
40607ca46eSDavid Howells #define I2OSWUL 		_IOWR(I2O_MAGIC_NUMBER,6,struct i2o_sw_xfer)
41607ca46eSDavid Howells #define I2OSWDEL		_IOWR(I2O_MAGIC_NUMBER,7,struct i2o_sw_xfer)
42607ca46eSDavid Howells #define I2OVALIDATE		_IOR(I2O_MAGIC_NUMBER,8,__u32)
43607ca46eSDavid Howells #define I2OHTML 		_IOWR(I2O_MAGIC_NUMBER,9,struct i2o_html)
44607ca46eSDavid Howells #define I2OEVTREG		_IOW(I2O_MAGIC_NUMBER,10,struct i2o_evt_id)
45607ca46eSDavid Howells #define I2OEVTGET		_IOR(I2O_MAGIC_NUMBER,11,struct i2o_evt_info)
46607ca46eSDavid Howells #define I2OPASSTHRU		_IOR(I2O_MAGIC_NUMBER,12,struct i2o_cmd_passthru)
47607ca46eSDavid Howells #define I2OPASSTHRU32		_IOR(I2O_MAGIC_NUMBER,12,struct i2o_cmd_passthru32)
48607ca46eSDavid Howells 
49607ca46eSDavid Howells struct i2o_cmd_passthru32 {
50607ca46eSDavid Howells 	unsigned int iop;	/* IOP unit number */
51607ca46eSDavid Howells 	__u32 msg;		/* message */
52607ca46eSDavid Howells };
53607ca46eSDavid Howells 
54607ca46eSDavid Howells struct i2o_cmd_passthru {
55607ca46eSDavid Howells 	unsigned int iop;	/* IOP unit number */
56607ca46eSDavid Howells 	void __user *msg;	/* message */
57607ca46eSDavid Howells };
58607ca46eSDavid Howells 
59607ca46eSDavid Howells struct i2o_cmd_hrtlct {
60607ca46eSDavid Howells 	unsigned int iop;	/* IOP unit number */
61607ca46eSDavid Howells 	void __user *resbuf;	/* Buffer for result */
62607ca46eSDavid Howells 	unsigned int __user *reslen;	/* Buffer length in bytes */
63607ca46eSDavid Howells };
64607ca46eSDavid Howells 
65607ca46eSDavid Howells struct i2o_cmd_psetget {
66607ca46eSDavid Howells 	unsigned int iop;	/* IOP unit number */
67607ca46eSDavid Howells 	unsigned int tid;	/* Target device TID */
68607ca46eSDavid Howells 	void __user *opbuf;	/* Operation List buffer */
69607ca46eSDavid Howells 	unsigned int oplen;	/* Operation List buffer length in bytes */
70607ca46eSDavid Howells 	void __user *resbuf;	/* Result List buffer */
71607ca46eSDavid Howells 	unsigned int __user *reslen;	/* Result List buffer length in bytes */
72607ca46eSDavid Howells };
73607ca46eSDavid Howells 
74607ca46eSDavid Howells struct i2o_sw_xfer {
75607ca46eSDavid Howells 	unsigned int iop;	/* IOP unit number */
76607ca46eSDavid Howells 	unsigned char flags;	/* Flags field */
77607ca46eSDavid Howells 	unsigned char sw_type;	/* Software type */
78607ca46eSDavid Howells 	unsigned int sw_id;	/* Software ID */
79607ca46eSDavid Howells 	void __user *buf;	/* Pointer to software buffer */
80607ca46eSDavid Howells 	unsigned int __user *swlen;	/* Length of software data */
81607ca46eSDavid Howells 	unsigned int __user *maxfrag;	/* Maximum fragment count */
82607ca46eSDavid Howells 	unsigned int __user *curfrag;	/* Current fragment count */
83607ca46eSDavid Howells };
84607ca46eSDavid Howells 
85607ca46eSDavid Howells struct i2o_html {
86607ca46eSDavid Howells 	unsigned int iop;	/* IOP unit number */
87607ca46eSDavid Howells 	unsigned int tid;	/* Target device ID */
88607ca46eSDavid Howells 	unsigned int page;	/* HTML page */
89607ca46eSDavid Howells 	void __user *resbuf;	/* Buffer for reply HTML page */
90607ca46eSDavid Howells 	unsigned int __user *reslen;	/* Length in bytes of reply buffer */
91607ca46eSDavid Howells 	void __user *qbuf;	/* Pointer to HTTP query string */
92607ca46eSDavid Howells 	unsigned int qlen;	/* Length in bytes of query string buffer */
93607ca46eSDavid Howells };
94607ca46eSDavid Howells 
95607ca46eSDavid Howells #define I2O_EVT_Q_LEN 32
96607ca46eSDavid Howells 
97607ca46eSDavid Howells struct i2o_evt_id {
98607ca46eSDavid Howells 	unsigned int iop;
99607ca46eSDavid Howells 	unsigned int tid;
100607ca46eSDavid Howells 	unsigned int evt_mask;
101607ca46eSDavid Howells };
102607ca46eSDavid Howells 
103607ca46eSDavid Howells /* Event data size = frame size - message header + evt indicator */
104607ca46eSDavid Howells #define I2O_EVT_DATA_SIZE 88
105607ca46eSDavid Howells 
106607ca46eSDavid Howells struct i2o_evt_info {
107607ca46eSDavid Howells 	struct i2o_evt_id id;
108607ca46eSDavid Howells 	unsigned char evt_data[I2O_EVT_DATA_SIZE];
109607ca46eSDavid Howells 	unsigned int data_size;
110607ca46eSDavid Howells };
111607ca46eSDavid Howells 
112607ca46eSDavid Howells struct i2o_evt_get {
113607ca46eSDavid Howells 	struct i2o_evt_info info;
114607ca46eSDavid Howells 	int pending;
115607ca46eSDavid Howells 	int lost;
116607ca46eSDavid Howells };
117607ca46eSDavid Howells 
118607ca46eSDavid Howells typedef struct i2o_sg_io_hdr {
119607ca46eSDavid Howells 	unsigned int flags;	/* see I2O_DPT_SG_IO_FLAGS */
120607ca46eSDavid Howells } i2o_sg_io_hdr_t;
121607ca46eSDavid Howells 
122607ca46eSDavid Howells /**************************************************************************
123607ca46eSDavid Howells  * HRT related constants and structures
124607ca46eSDavid Howells  **************************************************************************/
125607ca46eSDavid Howells #define I2O_BUS_LOCAL	0
126607ca46eSDavid Howells #define I2O_BUS_ISA	1
127607ca46eSDavid Howells #define I2O_BUS_EISA	2
128607ca46eSDavid Howells /* was  I2O_BUS_MCA	3 */
129607ca46eSDavid Howells #define I2O_BUS_PCI	4
130607ca46eSDavid Howells #define I2O_BUS_PCMCIA	5
131607ca46eSDavid Howells #define I2O_BUS_NUBUS	6
132607ca46eSDavid Howells #define I2O_BUS_CARDBUS 7
133607ca46eSDavid Howells #define I2O_BUS_UNKNOWN 0x80
134607ca46eSDavid Howells 
135607ca46eSDavid Howells typedef struct _i2o_pci_bus {
136607ca46eSDavid Howells 	__u8 PciFunctionNumber;
137607ca46eSDavid Howells 	__u8 PciDeviceNumber;
138607ca46eSDavid Howells 	__u8 PciBusNumber;
139607ca46eSDavid Howells 	__u8 reserved;
140607ca46eSDavid Howells 	__u16 PciVendorID;
141607ca46eSDavid Howells 	__u16 PciDeviceID;
142607ca46eSDavid Howells } i2o_pci_bus;
143607ca46eSDavid Howells 
144607ca46eSDavid Howells typedef struct _i2o_local_bus {
145607ca46eSDavid Howells 	__u16 LbBaseIOPort;
146607ca46eSDavid Howells 	__u16 reserved;
147607ca46eSDavid Howells 	__u32 LbBaseMemoryAddress;
148607ca46eSDavid Howells } i2o_local_bus;
149607ca46eSDavid Howells 
150607ca46eSDavid Howells typedef struct _i2o_isa_bus {
151607ca46eSDavid Howells 	__u16 IsaBaseIOPort;
152607ca46eSDavid Howells 	__u8 CSN;
153607ca46eSDavid Howells 	__u8 reserved;
154607ca46eSDavid Howells 	__u32 IsaBaseMemoryAddress;
155607ca46eSDavid Howells } i2o_isa_bus;
156607ca46eSDavid Howells 
157607ca46eSDavid Howells typedef struct _i2o_eisa_bus_info {
158607ca46eSDavid Howells 	__u16 EisaBaseIOPort;
159607ca46eSDavid Howells 	__u8 reserved;
160607ca46eSDavid Howells 	__u8 EisaSlotNumber;
161607ca46eSDavid Howells 	__u32 EisaBaseMemoryAddress;
162607ca46eSDavid Howells } i2o_eisa_bus;
163607ca46eSDavid Howells 
164607ca46eSDavid Howells typedef struct _i2o_mca_bus {
165607ca46eSDavid Howells 	__u16 McaBaseIOPort;
166607ca46eSDavid Howells 	__u8 reserved;
167607ca46eSDavid Howells 	__u8 McaSlotNumber;
168607ca46eSDavid Howells 	__u32 McaBaseMemoryAddress;
169607ca46eSDavid Howells } i2o_mca_bus;
170607ca46eSDavid Howells 
171607ca46eSDavid Howells typedef struct _i2o_other_bus {
172607ca46eSDavid Howells 	__u16 BaseIOPort;
173607ca46eSDavid Howells 	__u16 reserved;
174607ca46eSDavid Howells 	__u32 BaseMemoryAddress;
175607ca46eSDavid Howells } i2o_other_bus;
176607ca46eSDavid Howells 
177607ca46eSDavid Howells typedef struct _i2o_hrt_entry {
178607ca46eSDavid Howells 	__u32 adapter_id;
179607ca46eSDavid Howells 	__u32 parent_tid:12;
180607ca46eSDavid Howells 	__u32 state:4;
181607ca46eSDavid Howells 	__u32 bus_num:8;
182607ca46eSDavid Howells 	__u32 bus_type:8;
183607ca46eSDavid Howells 	union {
184607ca46eSDavid Howells 		i2o_pci_bus pci_bus;
185607ca46eSDavid Howells 		i2o_local_bus local_bus;
186607ca46eSDavid Howells 		i2o_isa_bus isa_bus;
187607ca46eSDavid Howells 		i2o_eisa_bus eisa_bus;
188607ca46eSDavid Howells 		i2o_mca_bus mca_bus;
189607ca46eSDavid Howells 		i2o_other_bus other_bus;
190607ca46eSDavid Howells 	} bus;
191607ca46eSDavid Howells } i2o_hrt_entry;
192607ca46eSDavid Howells 
193607ca46eSDavid Howells typedef struct _i2o_hrt {
194607ca46eSDavid Howells 	__u16 num_entries;
195607ca46eSDavid Howells 	__u8 entry_len;
196607ca46eSDavid Howells 	__u8 hrt_version;
197607ca46eSDavid Howells 	__u32 change_ind;
198607ca46eSDavid Howells 	i2o_hrt_entry hrt_entry[1];
199607ca46eSDavid Howells } i2o_hrt;
200607ca46eSDavid Howells 
201607ca46eSDavid Howells typedef struct _i2o_lct_entry {
202607ca46eSDavid Howells 	__u32 entry_size:16;
203607ca46eSDavid Howells 	__u32 tid:12;
204607ca46eSDavid Howells 	__u32 reserved:4;
205607ca46eSDavid Howells 	__u32 change_ind;
206607ca46eSDavid Howells 	__u32 device_flags;
207607ca46eSDavid Howells 	__u32 class_id:12;
208607ca46eSDavid Howells 	__u32 version:4;
209607ca46eSDavid Howells 	__u32 vendor_id:16;
210607ca46eSDavid Howells 	__u32 sub_class;
211607ca46eSDavid Howells 	__u32 user_tid:12;
212607ca46eSDavid Howells 	__u32 parent_tid:12;
213607ca46eSDavid Howells 	__u32 bios_info:8;
214607ca46eSDavid Howells 	__u8 identity_tag[8];
215607ca46eSDavid Howells 	__u32 event_capabilities;
216607ca46eSDavid Howells } i2o_lct_entry;
217607ca46eSDavid Howells 
218607ca46eSDavid Howells typedef struct _i2o_lct {
219607ca46eSDavid Howells 	__u32 table_size:16;
220607ca46eSDavid Howells 	__u32 boot_tid:12;
221607ca46eSDavid Howells 	__u32 lct_ver:4;
222607ca46eSDavid Howells 	__u32 iop_flags;
223607ca46eSDavid Howells 	__u32 change_ind;
224607ca46eSDavid Howells 	i2o_lct_entry lct_entry[1];
225607ca46eSDavid Howells } i2o_lct;
226607ca46eSDavid Howells 
227607ca46eSDavid Howells typedef struct _i2o_status_block {
228607ca46eSDavid Howells 	__u16 org_id;
229607ca46eSDavid Howells 	__u16 reserved;
230607ca46eSDavid Howells 	__u16 iop_id:12;
231607ca46eSDavid Howells 	__u16 reserved1:4;
232607ca46eSDavid Howells 	__u16 host_unit_id;
233607ca46eSDavid Howells 	__u16 segment_number:12;
234607ca46eSDavid Howells 	__u16 i2o_version:4;
235607ca46eSDavid Howells 	__u8 iop_state;
236607ca46eSDavid Howells 	__u8 msg_type;
237607ca46eSDavid Howells 	__u16 inbound_frame_size;
238607ca46eSDavid Howells 	__u8 init_code;
239607ca46eSDavid Howells 	__u8 reserved2;
240607ca46eSDavid Howells 	__u32 max_inbound_frames;
241607ca46eSDavid Howells 	__u32 cur_inbound_frames;
242607ca46eSDavid Howells 	__u32 max_outbound_frames;
243607ca46eSDavid Howells 	char product_id[24];
244607ca46eSDavid Howells 	__u32 expected_lct_size;
245607ca46eSDavid Howells 	__u32 iop_capabilities;
246607ca46eSDavid Howells 	__u32 desired_mem_size;
247607ca46eSDavid Howells 	__u32 current_mem_size;
248607ca46eSDavid Howells 	__u32 current_mem_base;
249607ca46eSDavid Howells 	__u32 desired_io_size;
250607ca46eSDavid Howells 	__u32 current_io_size;
251607ca46eSDavid Howells 	__u32 current_io_base;
252607ca46eSDavid Howells 	__u32 reserved3:24;
253607ca46eSDavid Howells 	__u32 cmd_status:8;
254607ca46eSDavid Howells } i2o_status_block;
255607ca46eSDavid Howells 
256607ca46eSDavid Howells /* Event indicator mask flags */
257607ca46eSDavid Howells #define I2O_EVT_IND_STATE_CHANGE		0x80000000
258607ca46eSDavid Howells #define I2O_EVT_IND_GENERAL_WARNING		0x40000000
259607ca46eSDavid Howells #define I2O_EVT_IND_CONFIGURATION_FLAG		0x20000000
260607ca46eSDavid Howells #define I2O_EVT_IND_LOCK_RELEASE		0x10000000
261607ca46eSDavid Howells #define I2O_EVT_IND_CAPABILITY_CHANGE		0x08000000
262607ca46eSDavid Howells #define I2O_EVT_IND_DEVICE_RESET		0x04000000
263607ca46eSDavid Howells #define I2O_EVT_IND_EVT_MASK_MODIFIED		0x02000000
264607ca46eSDavid Howells #define I2O_EVT_IND_FIELD_MODIFIED		0x01000000
265607ca46eSDavid Howells #define I2O_EVT_IND_VENDOR_EVT			0x00800000
266607ca46eSDavid Howells #define I2O_EVT_IND_DEVICE_STATE		0x00400000
267607ca46eSDavid Howells 
268607ca46eSDavid Howells /* Executive event indicitors */
269607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_RESOURCE_LIMITS	0x00000001
270607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_CONNECTION_FAIL	0x00000002
271607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_ADAPTER_FAULT		0x00000004
272607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_POWER_FAIL		0x00000008
273607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_RESET_PENDING		0x00000010
274607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_RESET_IMMINENT 	0x00000020
275607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_HW_FAIL		0x00000040
276607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_XCT_CHANGE		0x00000080
277607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_NEW_LCT_ENTRY		0x00000100
278607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_MODIFIED_LCT		0x00000200
279607ca46eSDavid Howells #define I2O_EVT_IND_EXEC_DDM_AVAILABILITY	0x00000400
280607ca46eSDavid Howells 
281607ca46eSDavid Howells /* Random Block Storage Event Indicators */
282607ca46eSDavid Howells #define I2O_EVT_IND_BSA_VOLUME_LOAD		0x00000001
283607ca46eSDavid Howells #define I2O_EVT_IND_BSA_VOLUME_UNLOAD		0x00000002
284607ca46eSDavid Howells #define I2O_EVT_IND_BSA_VOLUME_UNLOAD_REQ	0x00000004
285607ca46eSDavid Howells #define I2O_EVT_IND_BSA_CAPACITY_CHANGE 	0x00000008
286607ca46eSDavid Howells #define I2O_EVT_IND_BSA_SCSI_SMART		0x00000010
287607ca46eSDavid Howells 
288607ca46eSDavid Howells /* Event data for generic events */
289607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_NORMAL		0x00
290607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_SUSPENDED		0x01
291607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_RESTART		0x02
292607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_NA_RECOVER 	0x03
293607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_NA_NO_RECOVER	0x04
294607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_QUIESCE_REQUEST	0x05
295607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_FAILED		0x10
296607ca46eSDavid Howells #define I2O_EVT_STATE_CHANGE_FAULTED		0x11
297607ca46eSDavid Howells 
298607ca46eSDavid Howells #define I2O_EVT_GEN_WARNING_NORMAL		0x00
299607ca46eSDavid Howells #define I2O_EVT_GEN_WARNING_ERROR_THRESHOLD	0x01
300607ca46eSDavid Howells #define I2O_EVT_GEN_WARNING_MEDIA_FAULT 	0x02
301607ca46eSDavid Howells 
302607ca46eSDavid Howells #define I2O_EVT_CAPABILITY_OTHER		0x01
303607ca46eSDavid Howells #define I2O_EVT_CAPABILITY_CHANGED		0x02
304607ca46eSDavid Howells 
305607ca46eSDavid Howells #define I2O_EVT_SENSOR_STATE_CHANGED		0x01
306607ca46eSDavid Howells 
307607ca46eSDavid Howells /*
308607ca46eSDavid Howells  *	I2O classes / subclasses
309607ca46eSDavid Howells  */
310607ca46eSDavid Howells 
311607ca46eSDavid Howells /*  Class ID and Code Assignments
312607ca46eSDavid Howells  *  (LCT.ClassID.Version field)
313607ca46eSDavid Howells  */
314607ca46eSDavid Howells #define I2O_CLASS_VERSION_10			0x00
315607ca46eSDavid Howells #define I2O_CLASS_VERSION_11			0x01
316607ca46eSDavid Howells 
317607ca46eSDavid Howells /*  Class code names
318607ca46eSDavid Howells  *  (from v1.5 Table 6-1 Class Code Assignments.)
319607ca46eSDavid Howells  */
320607ca46eSDavid Howells 
321607ca46eSDavid Howells #define I2O_CLASS_EXECUTIVE			0x000
322607ca46eSDavid Howells #define I2O_CLASS_DDM				0x001
323607ca46eSDavid Howells #define I2O_CLASS_RANDOM_BLOCK_STORAGE		0x010
324607ca46eSDavid Howells #define I2O_CLASS_SEQUENTIAL_STORAGE		0x011
325607ca46eSDavid Howells #define I2O_CLASS_LAN				0x020
326607ca46eSDavid Howells #define I2O_CLASS_WAN				0x030
327607ca46eSDavid Howells #define I2O_CLASS_FIBRE_CHANNEL_PORT		0x040
328607ca46eSDavid Howells #define I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL	0x041
329607ca46eSDavid Howells #define I2O_CLASS_SCSI_PERIPHERAL		0x051
330607ca46eSDavid Howells #define I2O_CLASS_ATE_PORT			0x060
331607ca46eSDavid Howells #define I2O_CLASS_ATE_PERIPHERAL		0x061
332607ca46eSDavid Howells #define I2O_CLASS_FLOPPY_CONTROLLER		0x070
333607ca46eSDavid Howells #define I2O_CLASS_FLOPPY_DEVICE 		0x071
334607ca46eSDavid Howells #define I2O_CLASS_BUS_ADAPTER			0x080
335607ca46eSDavid Howells #define I2O_CLASS_PEER_TRANSPORT_AGENT		0x090
336607ca46eSDavid Howells #define I2O_CLASS_PEER_TRANSPORT		0x091
337607ca46eSDavid Howells #define	I2O_CLASS_END				0xfff
338607ca46eSDavid Howells 
339607ca46eSDavid Howells /*
340607ca46eSDavid Howells  *  Rest of 0x092 - 0x09f reserved for peer-to-peer classes
341607ca46eSDavid Howells  */
342607ca46eSDavid Howells 
343607ca46eSDavid Howells #define I2O_CLASS_MATCH_ANYCLASS		0xffffffff
344607ca46eSDavid Howells 
345607ca46eSDavid Howells /*
346607ca46eSDavid Howells  *  Subclasses
347607ca46eSDavid Howells  */
348607ca46eSDavid Howells 
349607ca46eSDavid Howells #define I2O_SUBCLASS_i960			0x001
350607ca46eSDavid Howells #define I2O_SUBCLASS_HDM			0x020
351607ca46eSDavid Howells #define I2O_SUBCLASS_ISM			0x021
352607ca46eSDavid Howells 
353607ca46eSDavid Howells /* Operation functions */
354607ca46eSDavid Howells 
355607ca46eSDavid Howells #define I2O_PARAMS_FIELD_GET			0x0001
356607ca46eSDavid Howells #define I2O_PARAMS_LIST_GET			0x0002
357607ca46eSDavid Howells #define I2O_PARAMS_MORE_GET			0x0003
358607ca46eSDavid Howells #define I2O_PARAMS_SIZE_GET			0x0004
359607ca46eSDavid Howells #define I2O_PARAMS_TABLE_GET			0x0005
360607ca46eSDavid Howells #define I2O_PARAMS_FIELD_SET			0x0006
361607ca46eSDavid Howells #define I2O_PARAMS_LIST_SET			0x0007
362607ca46eSDavid Howells #define I2O_PARAMS_ROW_ADD			0x0008
363607ca46eSDavid Howells #define I2O_PARAMS_ROW_DELETE			0x0009
364607ca46eSDavid Howells #define I2O_PARAMS_TABLE_CLEAR			0x000A
365607ca46eSDavid Howells 
366607ca46eSDavid Howells /*
367607ca46eSDavid Howells  * I2O serial number conventions / formats
368607ca46eSDavid Howells  * (circa v1.5)
369607ca46eSDavid Howells  */
370607ca46eSDavid Howells 
371607ca46eSDavid Howells #define I2O_SNFORMAT_UNKNOWN			0
372607ca46eSDavid Howells #define I2O_SNFORMAT_BINARY			1
373607ca46eSDavid Howells #define I2O_SNFORMAT_ASCII			2
374607ca46eSDavid Howells #define I2O_SNFORMAT_UNICODE			3
375607ca46eSDavid Howells #define I2O_SNFORMAT_LAN48_MAC			4
376607ca46eSDavid Howells #define I2O_SNFORMAT_WAN			5
377607ca46eSDavid Howells 
378607ca46eSDavid Howells /*
379607ca46eSDavid Howells  * Plus new in v2.0 (Yellowstone pdf doc)
380607ca46eSDavid Howells  */
381607ca46eSDavid Howells 
382607ca46eSDavid Howells #define I2O_SNFORMAT_LAN64_MAC			6
383607ca46eSDavid Howells #define I2O_SNFORMAT_DDM			7
384607ca46eSDavid Howells #define I2O_SNFORMAT_IEEE_REG64 		8
385607ca46eSDavid Howells #define I2O_SNFORMAT_IEEE_REG128		9
386607ca46eSDavid Howells #define I2O_SNFORMAT_UNKNOWN2			0xff
387607ca46eSDavid Howells 
388607ca46eSDavid Howells /*
389607ca46eSDavid Howells  *	I2O Get Status State values
390607ca46eSDavid Howells  */
391607ca46eSDavid Howells 
392607ca46eSDavid Howells #define ADAPTER_STATE_INITIALIZING		0x01
393607ca46eSDavid Howells #define ADAPTER_STATE_RESET			0x02
394607ca46eSDavid Howells #define ADAPTER_STATE_HOLD			0x04
395607ca46eSDavid Howells #define ADAPTER_STATE_READY			0x05
396607ca46eSDavid Howells #define ADAPTER_STATE_OPERATIONAL		0x08
397607ca46eSDavid Howells #define ADAPTER_STATE_FAILED			0x10
398607ca46eSDavid Howells #define ADAPTER_STATE_FAULTED			0x11
399607ca46eSDavid Howells 
400607ca46eSDavid Howells /*
401607ca46eSDavid Howells  *	Software module types
402607ca46eSDavid Howells  */
403607ca46eSDavid Howells #define I2O_SOFTWARE_MODULE_IRTOS		0x11
404607ca46eSDavid Howells #define I2O_SOFTWARE_MODULE_IOP_PRIVATE		0x22
405607ca46eSDavid Howells #define I2O_SOFTWARE_MODULE_IOP_CONFIG		0x23
406607ca46eSDavid Howells 
407607ca46eSDavid Howells /*
408607ca46eSDavid Howells  *	Vendors
409607ca46eSDavid Howells  */
410607ca46eSDavid Howells #define I2O_VENDOR_DPT				0x001b
411607ca46eSDavid Howells 
412607ca46eSDavid Howells /*
413607ca46eSDavid Howells  * DPT / Adaptec specific values for i2o_sg_io_hdr flags.
414607ca46eSDavid Howells  */
415607ca46eSDavid Howells #define I2O_DPT_SG_FLAG_INTERPRET		0x00010000
416607ca46eSDavid Howells #define I2O_DPT_SG_FLAG_PHYSICAL		0x00020000
417607ca46eSDavid Howells 
418607ca46eSDavid Howells #define I2O_DPT_FLASH_FRAG_SIZE			0x10000
419607ca46eSDavid Howells #define I2O_DPT_FLASH_READ			0x0101
420607ca46eSDavid Howells #define I2O_DPT_FLASH_WRITE			0x0102
421607ca46eSDavid Howells 
422607ca46eSDavid Howells #endif				/* _I2O_DEV_H */
423