Home | History | Annotate | Line # | Download | only in i2o
i2o.h revision 1.1
      1  1.1  ad /*	$NetBSD: i2o.h,v 1.1 2000/11/08 19:45:31 ad Exp $	*/
      2  1.1  ad 
      3  1.1  ad /*-
      4  1.1  ad  * Copyright (c) 2000 The NetBSD Foundation, Inc.
      5  1.1  ad  * All rights reserved.
      6  1.1  ad  *
      7  1.1  ad  * This code is derived from software contributed to The NetBSD Foundation
      8  1.1  ad  * by Andrew Doran.
      9  1.1  ad  *
     10  1.1  ad  * Redistribution and use in source and binary forms, with or without
     11  1.1  ad  * modification, are permitted provided that the following conditions
     12  1.1  ad  * are met:
     13  1.1  ad  * 1. Redistributions of source code must retain the above copyright
     14  1.1  ad  *    notice, this list of conditions and the following disclaimer.
     15  1.1  ad  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.1  ad  *    notice, this list of conditions and the following disclaimer in the
     17  1.1  ad  *    documentation and/or other materials provided with the distribution.
     18  1.1  ad  * 3. All advertising materials mentioning features or use of this software
     19  1.1  ad  *    must display the following acknowledgement:
     20  1.1  ad  *        This product includes software developed by the NetBSD
     21  1.1  ad  *        Foundation, Inc. and its contributors.
     22  1.1  ad  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.1  ad  *    contributors may be used to endorse or promote products derived
     24  1.1  ad  *    from this software without specific prior written permission.
     25  1.1  ad  *
     26  1.1  ad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.1  ad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.1  ad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.1  ad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.1  ad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.1  ad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.1  ad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.1  ad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.1  ad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.1  ad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.1  ad  * POSSIBILITY OF SUCH DAMAGE.
     37  1.1  ad  */
     38  1.1  ad 
     39  1.1  ad /*
     40  1.1  ad  * I2O structures and constants, as presented by the I2O specification
     41  1.1  ad  * revision 1.5 (obtainable from http://www.i2osig.org/).  Currently, only
     42  1.1  ad  * what's useful to us is defined in this file.
     43  1.1  ad  */
     44  1.1  ad 
     45  1.1  ad #ifndef	_I2O_I2O_H_
     46  1.1  ad #define	_I2O_I2O_H_
     47  1.1  ad 
     48  1.1  ad /*
     49  1.1  ad  * ================= Miscellenous definitions =================
     50  1.1  ad  */
     51  1.1  ad 
     52  1.1  ad /* Macros to assist in building message headers */
     53  1.1  ad #define	I2O_MSGFLAGS(s)		(I2O_VERSION_11 | (sizeof(struct s) << 14))
     54  1.1  ad #define	I2O_MSGFUNC(t, f)	((t) | (I2O_TID_HOST << 12) | ((f) << 24))
     55  1.1  ad 
     56  1.1  ad /* Common message function codes with no payload or an undefined payload */
     57  1.1  ad #define	I2O_UTIL_NOP			0x00
     58  1.1  ad #define	I2O_EXEC_IOP_CLEAR		0xbe
     59  1.1  ad #define	I2O_EXEC_SYS_QUIESCE		0xc3
     60  1.1  ad #define	I2O_EXEC_SYS_ENABLE		0xd1
     61  1.1  ad #define	I2O_PRIVATE_MESSAGE		0xff
     62  1.1  ad 
     63  1.1  ad /* Device class codes */
     64  1.1  ad #define	I2O_CLASS_EXECUTIVE			0x00
     65  1.1  ad #define	I2O_CLASS_DDM				0x01
     66  1.1  ad #define	I2O_CLASS_RANDOM_BLOCK_STORAGE		0x10
     67  1.1  ad #define	I2O_CLASS_SEQUENTIAL_STORAGE		0x11
     68  1.1  ad #define	I2O_CLASS_LAN				0x20
     69  1.1  ad #define	I2O_CLASS_WAN				0x30
     70  1.1  ad #define	I2O_CLASS_FIBRE_CHANNEL_PORT		0x40
     71  1.1  ad #define	I2O_CLASS_FIBRE_CHANNEL_PERIPHERAL	0x41
     72  1.1  ad #define	I2O_CLASS_SCSI_PERIPHERAL		0x51
     73  1.1  ad #define	I2O_CLASS_ATE_PORT			0x60
     74  1.1  ad #define	I2O_CLASS_ATE_PERIPHERAL		0x61
     75  1.1  ad #define	I2O_CLASS_FLOPPY_CONTROLLER		0x70
     76  1.1  ad #define	I2O_CLASS_FLOPPY_DEVICE			0x71
     77  1.1  ad #define	I2O_CLASS_BUS_ADAPTER_PORT		0x80
     78  1.1  ad 
     79  1.1  ad #define	I2O_CLASS_ANY				0xffffffff
     80  1.1  ad 
     81  1.1  ad /* Reply status codes */
     82  1.1  ad #define	I2O_STATUS_SUCCESS			0x00
     83  1.1  ad #define	I2O_STATUS_ABORT_DIRTY			0x01
     84  1.1  ad #define	I2O_STATUS_ABORT_NO_DATA_XFER		0x02
     85  1.1  ad #define	I2O_STATUS_ABORT_PARTIAL_XFER		0x03
     86  1.1  ad #define	I2O_STATUS_ERROR_DIRTY			0x04
     87  1.1  ad #define	I2O_STATUS_ERROR_NO_DATA_XFER		0x05
     88  1.1  ad #define	I2O_STATUS_ERROR_PARTIAL_XFER		0x06
     89  1.1  ad #define	I2O_STATUS_PROCESS_ABORT_DIRTY        	0x08
     90  1.1  ad #define	I2O_STATUS_PROCESS_ABORT_NO_DATA_XFER	0x09
     91  1.1  ad #define	I2O_STATUS_PROCESS_ABORT_PARTIAL_XFER	0x0a
     92  1.1  ad #define	I2O_STATUS_TRANSACTION_ERROR		0x0b
     93  1.1  ad #define	I2O_STATUS_PROGRESS_REPORT		0x80
     94  1.1  ad 
     95  1.1  ad /* Message versions */
     96  1.1  ad #define	I2O_VERSION_10			0x00
     97  1.1  ad #define	I2O_VERSION_11			0x01
     98  1.1  ad #define	I2O_VERSION_20			0x02
     99  1.1  ad 
    100  1.1  ad /* Commonly used TIDs */
    101  1.1  ad #define	I2O_TID_IOP			0
    102  1.1  ad #define	I2O_TID_HOST			1
    103  1.1  ad #define	I2O_TID_NONE			4095
    104  1.1  ad 
    105  1.1  ad /* SGL flags.  This list covers only a fraction of the possibilities. */
    106  1.1  ad #define	I2O_SGL_DATA_OUT		0x04000000
    107  1.1  ad #define	I2O_SGL_SIMPLE			0x10000000
    108  1.1  ad #define	I2O_SGL_END_BUFFER		0x40000000
    109  1.1  ad #define	I2O_SGL_END			0x80000000
    110  1.1  ad 
    111  1.1  ad /* Serial number formats */
    112  1.1  ad #define	I2O_SNFMT_UNKNOWN		0
    113  1.1  ad #define	I2O_SNFMT_BINARY		1
    114  1.1  ad #define	I2O_SNFMT_ASCII			2
    115  1.1  ad #define	I2O_SNFMT_UNICODE		3
    116  1.1  ad #define	I2O_SNFMT_LAN_MAC		4
    117  1.1  ad #define	I2O_SNFMT_WAN_MAC		5
    118  1.1  ad 
    119  1.1  ad /*
    120  1.1  ad  * ================= Common structures =================
    121  1.1  ad  */
    122  1.1  ad 
    123  1.1  ad /*
    124  1.1  ad  * Standard I2O message frame.  All message frames begin with this.
    125  1.1  ad  *
    126  1.1  ad  * Bits  Field          Meaning
    127  1.1  ad  * ----  -------------  ----------------------------------------------------
    128  1.1  ad  * 0-2   msgflags       Message header version. Must be 001 (little endian).
    129  1.1  ad  * 3     msgflags	Reserved.
    130  1.1  ad  * 4-7   msgflags       Offset to SGLs expressed as # of 32-bit words.
    131  1.1  ad  * 8-15  msgflags       Control flags.
    132  1.1  ad  * 16-31 msgflags       Message frame size expressed as # of 32-bit words.
    133  1.1  ad  * 0-11  msgfunc	TID of target.
    134  1.1  ad  * 12-23 msgfunc        TID of initiator.
    135  1.1  ad  * 24-31 msgfunc        Function (i.e., type of message).
    136  1.1  ad  */
    137  1.1  ad struct i2o_msg {
    138  1.1  ad 	u_int32_t	msgflags;
    139  1.1  ad 	u_int32_t	msgfunc;
    140  1.1  ad 	u_int32_t	msgictx;	/* Initiator context */
    141  1.1  ad 	u_int32_t	msgtctx;	/* Transaction context */
    142  1.1  ad 
    143  1.1  ad 	/* Message payload */
    144  1.1  ad 
    145  1.1  ad } __attribute__ ((__packed__));
    146  1.1  ad 
    147  1.1  ad #define	I2O_MSGFLAGS_STATICMF		0x0100
    148  1.1  ad #define	I2O_MSGFLAGS_64BIT		0x0200
    149  1.1  ad #define	I2O_MSGFLAGS_MULTI		0x1000
    150  1.1  ad #define	I2O_MSGFLAGS_CANT_PROCESS	0x2000
    151  1.1  ad #define	I2O_MSGFLAGS_LAST_REPLY		0x4000
    152  1.1  ad #define	I2O_MSGFLAGS_REPLY		0x8000
    153  1.1  ad 
    154  1.1  ad /*
    155  1.1  ad  * Standard reply frame.  msgflags, msgfunc, msgictx and msgtctx have the
    156  1.1  ad  * same meaning as in `struct i2o_msg'.
    157  1.1  ad  *
    158  1.1  ad  * Bits  Field          Meaning
    159  1.1  ad  * ----  -------------  ----------------------------------------------------
    160  1.1  ad  * 0-15  status         Detailed status code.  Specific to device class.
    161  1.1  ad  * 16-23 status         Reserved.
    162  1.1  ad  * 24-31 status         Request status code.
    163  1.1  ad  */
    164  1.1  ad struct i2o_reply {
    165  1.1  ad 	u_int32_t	msgflags;
    166  1.1  ad 	u_int32_t	msgfunc;
    167  1.1  ad 	u_int32_t	msgictx;
    168  1.1  ad 	u_int32_t	msgtctx;
    169  1.1  ad 	u_int16_t	detail;
    170  1.1  ad 	u_int8_t	reserved;
    171  1.1  ad 	u_int8_t	reqstatus;
    172  1.1  ad 
    173  1.1  ad 	/* Reply payload */
    174  1.1  ad 
    175  1.1  ad } __attribute__ ((__packed__));
    176  1.1  ad 
    177  1.1  ad /*
    178  1.1  ad  * Hardware resource table.  Not documented here.
    179  1.1  ad  */
    180  1.1  ad struct i2o_hrt_entry {
    181  1.1  ad 	u_int32_t	adapterid;
    182  1.1  ad 	u_int32_t	controllingtid;
    183  1.1  ad 	u_int8_t	businfo[8];
    184  1.1  ad } __attribute__ ((__packed__));
    185  1.1  ad 
    186  1.1  ad struct i2o_hrt {
    187  1.1  ad 	u_int16_t	nentries;
    188  1.1  ad 	u_int8_t	entrysize;
    189  1.1  ad 	u_int8_t	hrtversion;
    190  1.1  ad 	u_int32_t	changeindicator;
    191  1.1  ad 	struct i2o_hrt_entry	entry[1];
    192  1.1  ad } __attribute__ ((__packed__));
    193  1.1  ad 
    194  1.1  ad /*
    195  1.1  ad  * Logical configuration table entry.  Bitfields are broken down as follows:
    196  1.1  ad  *
    197  1.1  ad  * Bits   Field           Meaning
    198  1.1  ad  * -----  --------------  ---------------------------------------------------
    199  1.1  ad  *  0-11  classid         Class ID.
    200  1.1  ad  * 12-15  classid         Class version.
    201  1.1  ad  *  0-11  usertid         User TID
    202  1.1  ad  * 12-23  usertid         Parent TID.
    203  1.1  ad  * 24-31  usertid         BIOS info.
    204  1.1  ad  */
    205  1.1  ad struct i2o_lct_entry {
    206  1.1  ad 	u_int16_t	entrysize;
    207  1.1  ad 	u_int16_t	localtid;		/* Bits 0-12 only */
    208  1.1  ad 	u_int32_t	changeindicator;
    209  1.1  ad 	u_int32_t	deviceflags;
    210  1.1  ad 	u_int16_t	classid;
    211  1.1  ad 	u_int16_t	orgid;
    212  1.1  ad 	u_int32_t	subclassinfo;
    213  1.1  ad 	u_int32_t	usertid;
    214  1.1  ad 	u_int8_t	identitytag[8];
    215  1.1  ad 	u_int32_t	eventcaps;
    216  1.1  ad } __attribute__ ((__packed__));
    217  1.1  ad 
    218  1.1  ad /*
    219  1.1  ad  * Logical configuration table header.
    220  1.1  ad  */
    221  1.1  ad struct i2o_lct {
    222  1.1  ad 	u_int16_t	tablesize;
    223  1.1  ad 	u_int8_t	boottid;
    224  1.1  ad 	u_int8_t	lctversion;
    225  1.1  ad 	u_int32_t	iopflags;
    226  1.1  ad 	u_int32_t	changeindicator;
    227  1.1  ad 	struct i2o_lct_entry	entry[1];
    228  1.1  ad } __attribute__ ((__packed__));
    229  1.1  ad 
    230  1.1  ad /*
    231  1.1  ad  * IOP system table entry.  Bitfields are broken down as follows:
    232  1.1  ad  *
    233  1.1  ad  * Bits   Field           Meaning
    234  1.1  ad  * -----  --------------  ---------------------------------------------------
    235  1.1  ad  *  0-11  iopid           IOP ID.
    236  1.1  ad  * 12-31  iopid           Reserved.
    237  1.1  ad  *  0-11  segnumber       Segment number.
    238  1.1  ad  * 12-15  segnumber       I2O version.
    239  1.1  ad  * 16-23  segnumber       IOP state.
    240  1.1  ad  * 24-31  segnumber       Messenger type.
    241  1.1  ad  */
    242  1.1  ad struct i2o_iop_entry {
    243  1.1  ad 	u_int16_t	orgid;
    244  1.1  ad 	u_int16_t	reserved0;
    245  1.1  ad 	u_int32_t	iopid;
    246  1.1  ad 	u_int32_t	segnumber;			/* Bitfields */
    247  1.1  ad 	u_int16_t	inboundmsgframesize;
    248  1.1  ad 	u_int16_t	reserved1;
    249  1.1  ad 	u_int32_t	lastchanged;
    250  1.1  ad 	u_int32_t	iopcaps;
    251  1.1  ad 	u_int32_t	inboundmsgportaddresslow;
    252  1.1  ad 	u_int32_t	inboundmsgportaddresshigh;
    253  1.1  ad } __attribute__ ((__packed__));
    254  1.1  ad 
    255  1.1  ad /*
    256  1.1  ad  * IOP status record.  Bitfields are broken down as follows:
    257  1.1  ad  *
    258  1.1  ad  * Bits   Field           Meaning
    259  1.1  ad  * -----  --------------  ---------------------------------------------------
    260  1.1  ad  *  0-11  iopid           IOP ID.
    261  1.1  ad  * 12-15  iopid           Reserved.
    262  1.1  ad  * 16-31  iopid           Host unit ID.
    263  1.1  ad  *  0-11  segnumber       Segment number.
    264  1.1  ad  * 12-15  segnumber       I2O version.
    265  1.1  ad  * 16-23  segnumber       IOP state.
    266  1.1  ad  * 24-31  segnumber       Messenger type.
    267  1.1  ad  */
    268  1.1  ad struct i2o_status {
    269  1.1  ad 	u_int16_t	orgid;
    270  1.1  ad 	u_int16_t	reserved0;
    271  1.1  ad 	u_int32_t	iopid;			/* Bitfields */
    272  1.1  ad 	u_int32_t	segnumber;		/* Bitfields */
    273  1.1  ad 	u_int16_t	inboundmframesize;
    274  1.1  ad 	u_int8_t	initcode;
    275  1.1  ad 	u_int8_t	reserved1;
    276  1.1  ad 	u_int32_t	maxinboundmframes;
    277  1.1  ad 	u_int32_t	currentinboundmframes;
    278  1.1  ad 	u_int32_t	maxoutboundmframes;
    279  1.1  ad 	u_int8_t	productid[24];
    280  1.1  ad 	u_int32_t	expectedlctsize;
    281  1.1  ad 	u_int32_t	iopcaps;
    282  1.1  ad 	u_int32_t	desiredprivmemsize;
    283  1.1  ad 	u_int32_t	currentprivmemsize;
    284  1.1  ad 	u_int32_t	currentprivmembase;
    285  1.1  ad 	u_int32_t	desiredpriviosize;
    286  1.1  ad 	u_int32_t	currentpriviosize;
    287  1.1  ad 	u_int32_t	currentpriviobase;
    288  1.1  ad 	u_int8_t	reserved2[3];
    289  1.1  ad 	u_int8_t	syncbyte;
    290  1.1  ad } __attribute__ ((__packed__));
    291  1.1  ad 
    292  1.1  ad #define	I2O_IOP_STATE_INITIALIZING		0x01
    293  1.1  ad #define	I2O_IOP_STATE_RESET			0x02
    294  1.1  ad #define	I2O_IOP_STATE_HOLD			0x04
    295  1.1  ad #define	I2O_IOP_STATE_READY			0x05
    296  1.1  ad #define	I2O_IOP_STATE_OPERATIONAL		0x08
    297  1.1  ad #define	I2O_IOP_STATE_FAILED			0x10
    298  1.1  ad #define	I2O_IOP_STATE_FAULTED			0x11
    299  1.1  ad 
    300  1.1  ad /*
    301  1.1  ad  * ================= Executive class messages =================
    302  1.1  ad  */
    303  1.1  ad 
    304  1.1  ad /*
    305  1.1  ad  * Retrieve adapter status.
    306  1.1  ad  */
    307  1.1  ad #define	I2O_EXEC_STATUS_GET		0xa0
    308  1.1  ad struct i2o_exec_status_get {
    309  1.1  ad 	u_int32_t	msgflags;
    310  1.1  ad 	u_int32_t	msgfunc;
    311  1.1  ad 	u_int32_t	reserved[4];
    312  1.1  ad 	u_int32_t	addrlow;
    313  1.1  ad 	u_int32_t	addrhigh;
    314  1.1  ad 	u_int32_t	length;
    315  1.1  ad } __attribute__ ((__packed__));
    316  1.1  ad 
    317  1.1  ad /*
    318  1.1  ad  * Initalize outbound FIFO.
    319  1.1  ad  */
    320  1.1  ad #define	I2O_EXEC_OUTBOUND_INIT		0xa1
    321  1.1  ad struct i2o_exec_outbound_init {
    322  1.1  ad 	u_int32_t	msgflags;
    323  1.1  ad 	u_int32_t	msgfunc;
    324  1.1  ad 	u_int32_t	msgictx;
    325  1.1  ad 	u_int32_t	msgtctx;
    326  1.1  ad 	u_int32_t	pagesize;
    327  1.1  ad 	u_int32_t	flags;		/* init code, outbound msg size */
    328  1.1  ad } __attribute__ ((__packed__));
    329  1.1  ad 
    330  1.1  ad #define	I2O_EXEC_OUTBOUND_INIT_IN_PROGRESS	1
    331  1.1  ad #define	I2O_EXEC_OUTBOUND_INIT_REJECTED		2
    332  1.1  ad #define	I2O_EXEC_OUTBOUND_INIT_FAILED		3
    333  1.1  ad #define	I2O_EXEC_OUTBOUND_INIT_COMPLETE		4
    334  1.1  ad 
    335  1.1  ad /*
    336  1.1  ad  * Notify host of LCT change.
    337  1.1  ad  */
    338  1.1  ad #define	I2O_EXEC_LCT_NOTIFY		0xa2
    339  1.1  ad struct i2o_exec_lct_notify {
    340  1.1  ad 	u_int32_t	msgflags;
    341  1.1  ad 	u_int32_t	msgfunc;
    342  1.1  ad 	u_int32_t	msgictx;
    343  1.1  ad 	u_int32_t	msgtctx;
    344  1.1  ad 	u_int32_t	classid;
    345  1.1  ad 	u_int32_t	changeindicator;
    346  1.1  ad } __attribute__ ((__packed__));
    347  1.1  ad 
    348  1.1  ad /*
    349  1.1  ad  * Set system table.
    350  1.1  ad  */
    351  1.1  ad #define	I2O_EXEC_SYS_TAB_SET		0xa3
    352  1.1  ad struct i2o_exec_sys_tab_set {
    353  1.1  ad 	u_int32_t	msgflags;
    354  1.1  ad 	u_int32_t	msgfunc;
    355  1.1  ad 	u_int32_t	msgictx;
    356  1.1  ad 	u_int32_t	msgtctx;
    357  1.1  ad 	u_int32_t	iopid;
    358  1.1  ad 	u_int32_t	segnumber;
    359  1.1  ad } __attribute__ ((__packed__));
    360  1.1  ad 
    361  1.1  ad /*
    362  1.1  ad  * Retrieve hardware resource table.
    363  1.1  ad  */
    364  1.1  ad #define	I2O_EXEC_HRT_GET		0xa8
    365  1.1  ad struct i2o_exec_hrt_get {
    366  1.1  ad 	u_int32_t	msgflags;
    367  1.1  ad 	u_int32_t	msgfunc;
    368  1.1  ad 	u_int32_t	msgictx;
    369  1.1  ad 	u_int32_t	msgtctx;
    370  1.1  ad } __attribute__ ((__packed__));
    371  1.1  ad 
    372  1.1  ad /*
    373  1.1  ad  * Reset IOP.
    374  1.1  ad  */
    375  1.1  ad #define	I2O_EXEC_IOP_RESET		0xbd
    376  1.1  ad struct i2o_exec_iop_reset {
    377  1.1  ad 	u_int32_t	msgflags;
    378  1.1  ad 	u_int32_t	msgfunc;
    379  1.1  ad 	u_int32_t	reserved[4];
    380  1.1  ad 	u_int32_t	statuslow;
    381  1.1  ad 	u_int32_t	statushigh;
    382  1.1  ad } __attribute__ ((__packed__));
    383  1.1  ad 
    384  1.1  ad #define	I2O_RESET_IN_PROGRESS		0x01
    385  1.1  ad #define	I2O_RESET_REJECTED		0x02
    386  1.1  ad 
    387  1.1  ad /*
    388  1.1  ad  * ================= HBA class messages =================
    389  1.1  ad  */
    390  1.1  ad 
    391  1.1  ad #define	I2O_HBA_BUS_SCAN		0x89
    392  1.1  ad struct i2o_hba_bus_scan {
    393  1.1  ad 	u_int32_t	msgflags;
    394  1.1  ad 	u_int32_t	msgfunc;
    395  1.1  ad 	u_int32_t	msgictx;
    396  1.1  ad 	u_int32_t	msgtctx;
    397  1.1  ad };
    398  1.1  ad 
    399  1.1  ad /*
    400  1.1  ad  * ================= HBA class parameter groups =================
    401  1.1  ad  */
    402  1.1  ad 
    403  1.1  ad #define	I2O_PARAM_HBA_CTLR_INFO		0x0000
    404  1.1  ad struct i2o_param_hba_ctlr_info {
    405  1.1  ad 	u_int8_t	bustype;
    406  1.1  ad 	u_int8_t	busstate;
    407  1.1  ad 	u_int16_t	reserved;
    408  1.1  ad 	u_int8_t	busname[12];
    409  1.1  ad } __attribute__ ((__packed__));
    410  1.1  ad 
    411  1.1  ad #define	I2O_HBA_BUS_GENERIC		0x00
    412  1.1  ad #define	I2O_HBA_BUS_SCSI		0x01
    413  1.1  ad #define	I2O_HBA_BUS_FCA			0x10
    414  1.1  ad 
    415  1.1  ad #define	I2O_PARAM_HBA_SCSI_PORT_INFO	0x0001
    416  1.1  ad struct i2o_param_hba_scsi_port_info {
    417  1.1  ad 	u_int8_t	physicalif;
    418  1.1  ad 	u_int8_t	electricalif;
    419  1.1  ad 	u_int8_t	isosynchonrous;
    420  1.1  ad 	u_int8_t	connectortype;
    421  1.1  ad 	u_int8_t	connectorgender;
    422  1.1  ad 	u_int8_t	reserved1;
    423  1.1  ad 	u_int16_t	reserved2;
    424  1.1  ad 	u_int32_t	maxnumberofdevices;
    425  1.1  ad } __attribute__ ((__packed__));
    426  1.1  ad 
    427  1.1  ad #define	I2O_PARAM_HBA_SCSI_CTLR_INFO	0x0200
    428  1.1  ad struct i2o_param_hba_scsi_ctlr_info {
    429  1.1  ad 	u_int8_t	scsitype;
    430  1.1  ad 	u_int8_t	protection;
    431  1.1  ad 	u_int8_t	settings;
    432  1.1  ad 	u_int8_t	reserved;
    433  1.1  ad 	u_int32_t	initiatorid;
    434  1.1  ad 	u_int64_t	scanlun0only;
    435  1.1  ad 	u_int16_t	disabledevice;
    436  1.1  ad 	u_int8_t	maxoffset;
    437  1.1  ad 	u_int8_t	maxdatawidth;
    438  1.1  ad 	u_int64_t	maxsyncrate;
    439  1.1  ad } __attribute__ ((__packed__));
    440  1.1  ad 
    441  1.1  ad /*
    442  1.1  ad  * ================= Utility messages =================
    443  1.1  ad  */
    444  1.1  ad 
    445  1.1  ad /*
    446  1.1  ad  * Get parameter group operation.
    447  1.1  ad  */
    448  1.1  ad #define	I2O_UTIL_PARAMS_GET		0x06
    449  1.1  ad struct i2o_util_params_get {
    450  1.1  ad 	u_int32_t	msgflags;
    451  1.1  ad 	u_int32_t	msgfunc;
    452  1.1  ad 	u_int32_t	msgictx;
    453  1.1  ad 	u_int32_t	msgtctx;
    454  1.1  ad 	u_int32_t	flags;
    455  1.1  ad } __attribute__ ((__packed__));
    456  1.1  ad 
    457  1.1  ad #define	I2O_PARAMS_OP_FIELD_GET		1
    458  1.1  ad #define	I2O_PARAMS_OP_LIST_GET		2
    459  1.1  ad #define	I2O_PARAMS_OP_MORE_GET		3
    460  1.1  ad #define	I2O_PARAMS_OP_SIZE_GET		4
    461  1.1  ad #define	I2O_PARAMS_OP_TABLE_GET		5
    462  1.1  ad #define	I2O_PARAMS_OP_FIELD_SET		6
    463  1.1  ad #define	I2O_PARAMS_OP_LIST_SET		7
    464  1.1  ad #define	I2O_PARAMS_OP_ROW_ADD		8
    465  1.1  ad #define	I2O_PARAMS_OP_ROW_DELETE	9
    466  1.1  ad #define	I2O_PARAMS_OP_TABLE_CLEAR	10
    467  1.1  ad 
    468  1.1  ad struct i2o_param_op_list_header {
    469  1.1  ad 	u_int16_t	count;
    470  1.1  ad 	u_int16_t	reserved;
    471  1.1  ad } __attribute__ ((__packed__));
    472  1.1  ad 
    473  1.1  ad struct i2o_param_op_all_template {
    474  1.1  ad 	u_int16_t	operation;
    475  1.1  ad 	u_int16_t	group;
    476  1.1  ad 	u_int16_t	fieldcount;
    477  1.1  ad } __attribute__ ((__packed__));
    478  1.1  ad 
    479  1.1  ad struct i2o_param_op_results {
    480  1.1  ad 	u_int16_t	count;
    481  1.1  ad 	u_int16_t	reserved;
    482  1.1  ad } __attribute__ ((__packed__));
    483  1.1  ad 
    484  1.1  ad struct i2o_param_read_results {
    485  1.1  ad 	u_int16_t	blocksize;
    486  1.1  ad 	u_int8_t	blockstatus;
    487  1.1  ad 	u_int8_t	errorinfosize;
    488  1.1  ad } __attribute__ ((__packed__));
    489  1.1  ad 
    490  1.1  ad /*
    491  1.1  ad  * Device claim.
    492  1.1  ad  */
    493  1.1  ad #define	I2O_UTIL_CLAIM			0x09
    494  1.1  ad struct i2o_util_claim {
    495  1.1  ad 	u_int32_t	msgflags;
    496  1.1  ad 	u_int32_t	msgfunc;
    497  1.1  ad 	u_int32_t	msgictx;
    498  1.1  ad 	u_int32_t	msgtctx;
    499  1.1  ad 	u_int32_t	flags;
    500  1.1  ad } __attribute__ ((__packed__));
    501  1.1  ad 
    502  1.1  ad #define	I2O_UTIL_CLAIM_RESET_SENSITIVE		0x00000002
    503  1.1  ad #define	I2O_UTIL_CLAIM_STATE_SENSITIVE		0x00000004
    504  1.1  ad #define	I2O_UTIL_CLAIM_CAPACITY_SENSITIVE	0x00000008
    505  1.1  ad #define	I2O_UTIL_CLAIM_NO_PEER_SERVICE		0x00000010
    506  1.1  ad #define	I2O_UTIL_CLAIM_NO_MANAGEMENT_SERVICE	0x00000020
    507  1.1  ad #define	I2O_UTIL_CLAIM_PRIMARY_USER		0x01000000
    508  1.1  ad #define	I2O_UTIL_CLAIM_AUTHORIZED_USER		0x02000000
    509  1.1  ad #define	I2O_UTIL_CLAIM_SECONDARY_USER		0x03000000
    510  1.1  ad #define	I2O_UTIL_CLAIM_MANAGEMENT_USER		0x04000000
    511  1.1  ad 
    512  1.1  ad /*
    513  1.1  ad  * ================= Utility parameter groups =================
    514  1.1  ad  */
    515  1.1  ad 
    516  1.1  ad #define	I2O_PARAM_DEVICE_IDENTITY	0xf100
    517  1.1  ad struct i2o_param_device_identity {
    518  1.1  ad 	u_int32_t	classid;
    519  1.1  ad 	u_int16_t	ownertid;
    520  1.1  ad 	u_int16_t	parenttid;
    521  1.1  ad 	u_int8_t	vendorinfo[16];
    522  1.1  ad 	u_int8_t	productinfo[16];
    523  1.1  ad 	u_int8_t	description[16];
    524  1.1  ad 	u_int8_t	revlevel[8];
    525  1.1  ad 	u_int8_t	snformat;
    526  1.1  ad 	u_int8_t	serialnumber[1];
    527  1.1  ad } __attribute__ ((__packed__));
    528  1.1  ad 
    529  1.1  ad #define	I2O_PARAM_DDM_IDENTITY		0xf101
    530  1.1  ad struct i2o_param_ddm_identity {
    531  1.1  ad 	u_int16_t	ddmtid;
    532  1.1  ad 	u_int8_t	name[24];
    533  1.1  ad 	u_int8_t	revlevel[8];
    534  1.1  ad 	u_int8_t	snformat;
    535  1.1  ad 	u_int8_t	serialnumber[12];
    536  1.1  ad } __attribute__ ((__packed__));
    537  1.1  ad 
    538  1.1  ad /*
    539  1.1  ad  * ================= Block storage class messages =================
    540  1.1  ad  */
    541  1.1  ad 
    542  1.1  ad #define	I2O_RBS_BLOCK_READ		0x30
    543  1.1  ad struct i2o_rbs_block_read {
    544  1.1  ad 	u_int32_t	msgflags;
    545  1.1  ad 	u_int32_t	msgfunc;
    546  1.1  ad 	u_int32_t	msgictx;
    547  1.1  ad 	u_int32_t	msgtctx;
    548  1.1  ad 	u_int32_t	flags;		/* flags, time multipler, read ahead */
    549  1.1  ad 	u_int32_t	datasize;
    550  1.1  ad 	u_int32_t	lowoffset;
    551  1.1  ad 	u_int32_t	highoffset;
    552  1.1  ad } __attribute__ ((__packed__));
    553  1.1  ad 
    554  1.1  ad #define	I2O_RBS_BLOCK_READ_NO_RETRY	0x01
    555  1.1  ad #define	I2O_RBS_BLOCK_READ_SOLO		0x02
    556  1.1  ad #define	I2O_RBS_BLOCK_READ_CACHE_READ	0x04
    557  1.1  ad #define	I2O_RBS_BLOCK_READ_PREFETCH	0x08
    558  1.1  ad #define	I2O_RBS_BLOCK_READ_CACHE_ONLY	0x10
    559  1.1  ad 
    560  1.1  ad #define	I2O_RBS_BLOCK_WRITE             0x31
    561  1.1  ad struct i2o_rbs_block_write {
    562  1.1  ad 	u_int32_t	msgflags;
    563  1.1  ad 	u_int32_t	msgfunc;
    564  1.1  ad 	u_int32_t	msgictx;
    565  1.1  ad 	u_int32_t	msgtctx;
    566  1.1  ad 	u_int32_t	flags;		/* flags, time multipler */
    567  1.1  ad 	u_int32_t	datasize;
    568  1.1  ad 	u_int32_t	lowoffset;
    569  1.1  ad 	u_int32_t	highoffset;
    570  1.1  ad } __attribute__ ((__packed__));
    571  1.1  ad 
    572  1.1  ad #define	I2O_RBS_BLOCK_WRITE_NO_RETRY	0x01
    573  1.1  ad #define	I2O_RBS_BLOCK_WRITE_SOLO	0x02
    574  1.1  ad #define	I2O_RBS_BLOCK_WRITE_CACHE_NONE	0x04
    575  1.1  ad #define	I2O_RBS_BLOCK_WRITE_CACHE_WT	0x08
    576  1.1  ad #define	I2O_RBS_BLOCK_WRITE_CACHE_WB	0x10
    577  1.1  ad 
    578  1.1  ad #define	I2O_RBS_CACHE_FLUSH             0x37
    579  1.1  ad struct i2o_rbs_cache_flush {
    580  1.1  ad 	u_int32_t	msgflags;
    581  1.1  ad 	u_int32_t	msgfunc;
    582  1.1  ad 	u_int32_t	msgictx;
    583  1.1  ad 	u_int32_t	msgtctx;
    584  1.1  ad 	u_int32_t	flags;		/* flags, time multipler */
    585  1.1  ad } __attribute__ ((__packed__));
    586  1.1  ad 
    587  1.1  ad #define	I2O_RBS_MEDIA_MOUNT		0x41
    588  1.1  ad struct i2o_rbs_media_mount {
    589  1.1  ad 	u_int32_t	msgflags;
    590  1.1  ad 	u_int32_t	msgfunc;
    591  1.1  ad 	u_int32_t	msgictx;
    592  1.1  ad 	u_int32_t	msgtctx;
    593  1.1  ad 	u_int32_t	mediaid;
    594  1.1  ad 	u_int32_t	loadflags;
    595  1.1  ad } __attribute__ ((__packed__));
    596  1.1  ad 
    597  1.1  ad #define	I2O_RBS_MEDIA_EJECT             0x43
    598  1.1  ad struct i2o_rbs_media_eject {
    599  1.1  ad 	u_int32_t	msgflags;
    600  1.1  ad 	u_int32_t	msgfunc;
    601  1.1  ad 	u_int32_t	msgictx;
    602  1.1  ad 	u_int32_t	msgtctx;
    603  1.1  ad 	u_int32_t	mediaid;
    604  1.1  ad } __attribute__ ((__packed__));
    605  1.1  ad 
    606  1.1  ad #define	I2O_RBS_MEDIA_LOCK		0x49
    607  1.1  ad struct i2o_rbs_media_lock {
    608  1.1  ad 	u_int32_t	msgflags;
    609  1.1  ad 	u_int32_t	msgfunc;
    610  1.1  ad 	u_int32_t	msgictx;
    611  1.1  ad 	u_int32_t	msgtctx;
    612  1.1  ad 	u_int32_t	mediaid;
    613  1.1  ad } __attribute__ ((__packed__));
    614  1.1  ad 
    615  1.1  ad #define	I2O_RBS_MEDIA_UNLOCK		0x4b
    616  1.1  ad struct i2o_rbs_media_unlock {
    617  1.1  ad 	u_int32_t	msgflags;
    618  1.1  ad 	u_int32_t	msgfunc;
    619  1.1  ad 	u_int32_t	msgictx;
    620  1.1  ad 	u_int32_t	msgtctx;
    621  1.1  ad 	u_int32_t	mediaid;
    622  1.1  ad } __attribute__ ((__packed__));
    623  1.1  ad 
    624  1.1  ad /* Standard RBS reply frame. */
    625  1.1  ad struct i2o_rbs_reply {
    626  1.1  ad 	u_int32_t	msgflags;
    627  1.1  ad 	u_int32_t	msgfunc;
    628  1.1  ad 	u_int32_t	msgictx;
    629  1.1  ad 	u_int32_t	msgtctx;
    630  1.1  ad 	u_int16_t	detail;
    631  1.1  ad 	u_int8_t	reserved;
    632  1.1  ad 	u_int8_t	reqstatus;
    633  1.1  ad 	u_int32_t	transfercount;
    634  1.1  ad 	u_int64_t	offset;		/* Error replies only */
    635  1.1  ad } __attribute__ ((__packed__));
    636  1.1  ad 
    637  1.1  ad /*
    638  1.1  ad  * ================= Block storage class parameter groups =================
    639  1.1  ad  */
    640  1.1  ad 
    641  1.1  ad /*
    642  1.1  ad  * Device information.
    643  1.1  ad  */
    644  1.1  ad #define	I2O_PARAM_RBS_DEVICE_INFO	0x0000
    645  1.1  ad struct i2o_param_rbs_device_info {
    646  1.1  ad 	u_int8_t	type;
    647  1.1  ad 	u_int8_t	npaths;
    648  1.1  ad 	u_int16_t	powerstate;
    649  1.1  ad 	u_int32_t	blocksize;
    650  1.1  ad 	u_int64_t	capacity;
    651  1.1  ad 	u_int32_t	capabilities;
    652  1.1  ad 	u_int32_t	state;
    653  1.1  ad } __attribute__ ((__packed__));
    654  1.1  ad 
    655  1.1  ad #define	I2O_RBS_TYPE_DIRECT		0x00
    656  1.1  ad #define	I2O_RBS_TYPE_WORM		0x04
    657  1.1  ad #define	I2O_RBS_TYPE_CDROM		0x05
    658  1.1  ad #define	I2O_RBS_TYPE_OPTICAL		0x07
    659  1.1  ad 
    660  1.1  ad #define	I2O_RBS_CAP_CACHING		0x00000001
    661  1.1  ad #define	I2O_RBS_CAP_MULTI_PATH		0x00000002
    662  1.1  ad #define	I2O_RBS_CAP_DYNAMIC_CAPACITY	0x00000004
    663  1.1  ad #define	I2O_RBS_CAP_REMOVEABLE_MEDIA	0x00000008
    664  1.1  ad #define	I2O_RBS_CAP_REMOVEABLE_DEVICE	0x00000010
    665  1.1  ad #define	I2O_RBS_CAP_READ_ONLY		0x00000020
    666  1.1  ad #define	I2O_RBS_CAP_LOCKOUT		0x00000040
    667  1.1  ad #define	I2O_RBS_CAP_BOOT_BYPASS		0x00000080
    668  1.1  ad #define	I2O_RBS_CAP_COMPRESSION		0x00000100
    669  1.1  ad #define	I2O_RBS_CAP_DATA_SECURITY	0x00000200
    670  1.1  ad #define	I2O_RBS_CAP_RAID		0x00000400
    671  1.1  ad 
    672  1.1  ad #define	I2O_RBS_STATE_CACHING		0x00000001
    673  1.1  ad #define	I2O_RBS_STATE_POWERED_ON	0x00000002
    674  1.1  ad #define	I2O_RBS_STATE_READY		0x00000004
    675  1.1  ad #define	I2O_RBS_STATE_MEDIA_LOADED	0x00000008
    676  1.1  ad #define	I2O_RBS_STATE_DEVICE_LOADED	0x00000010
    677  1.1  ad #define	I2O_RBS_STATE_READ_ONLY		0x00000020
    678  1.1  ad #define	I2O_RBS_STATE_LOCKOUT		0x00000040
    679  1.1  ad #define	I2O_RBS_STATE_BOOT_BYPASS	0x00000080
    680  1.1  ad #define	I2O_RBS_STATE_COMPRESSION	0x00000100
    681  1.1  ad #define	I2O_RBS_STATE_DATA_SECURITY	0x00000200
    682  1.1  ad #define	I2O_RBS_STATE_RAID		0x00000400
    683  1.1  ad 
    684  1.1  ad /*
    685  1.1  ad  * Cache control.
    686  1.1  ad  */
    687  1.1  ad #define	I2O_PARAM_RBS_CACHE_CONTROL	0x0003
    688  1.1  ad struct i2o_param_rbs_cache_control {
    689  1.1  ad 	u_int32_t	totalcachesize;
    690  1.1  ad 	u_int32_t	readcachesize;
    691  1.1  ad 	u_int32_t	writecachesize;
    692  1.1  ad 	u_int8_t	writepolicy;
    693  1.1  ad 	u_int8_t	readpolicy;
    694  1.1  ad 	u_int8_t	errorcorrection;
    695  1.1  ad 	u_int8_t	reserved;
    696  1.1  ad } __attribute__ ((__packed__));
    697  1.1  ad 
    698  1.1  ad /*
    699  1.1  ad  * ================= SCSI peripheral class messages =================
    700  1.1  ad  */
    701  1.1  ad 
    702  1.1  ad /*
    703  1.1  ad  * Reset SCSI device.
    704  1.1  ad  */
    705  1.1  ad #define	I2O_SCSI_DEVICE_RESET		0x27
    706  1.1  ad struct i2o_scsi_device_reset {
    707  1.1  ad 	u_int32_t	msgflags;
    708  1.1  ad 	u_int32_t	msgfunc;
    709  1.1  ad 	u_int32_t	msgictx;
    710  1.1  ad 	u_int32_t	msgtctx;
    711  1.1  ad } __attribute__ ((__packed__));
    712  1.1  ad 
    713  1.1  ad /*
    714  1.1  ad  * Execute SCSI command.
    715  1.1  ad  */
    716  1.1  ad #define	I2O_SCSI_SCB_EXEC		0x81
    717  1.1  ad struct i2o_scsi_scb_exec {
    718  1.1  ad 	u_int32_t	msgflags;
    719  1.1  ad 	u_int32_t	msgfunc;
    720  1.1  ad 	u_int32_t	msgictx;
    721  1.1  ad 	u_int32_t	msgtctx;
    722  1.1  ad 	u_int32_t	flags;		/* CDB length and flags */
    723  1.1  ad 	u_int8_t	cdb[16];
    724  1.1  ad 	u_int32_t	datalen;
    725  1.1  ad } __attribute__ ((__packed__));
    726  1.1  ad 
    727  1.1  ad #define	I2O_SCB_FLAG_SENSE_DATA_IN_MESSAGE  0x00200000
    728  1.1  ad #define	I2O_SCB_FLAG_SENSE_DATA_IN_BUFFER   0x00600000
    729  1.1  ad #define	I2O_SCB_FLAG_SIMPLE_QUEUE_TAG       0x00800000
    730  1.1  ad #define	I2O_SCB_FLAG_HEAD_QUEUE_TAG         0x01000000
    731  1.1  ad #define	I2O_SCB_FLAG_ORDERED_QUEUE_TAG      0x01800000
    732  1.1  ad #define	I2O_SCB_FLAG_ACA_QUEUE_TAG          0x02000000
    733  1.1  ad #define	I2O_SCB_FLAG_ENABLE_DISCONNECT      0x20000000
    734  1.1  ad #define	I2O_SCB_FLAG_XFER_FROM_DEVICE       0x40000000
    735  1.1  ad #define	I2O_SCB_FLAG_XFER_TO_DEVICE         0x80000000
    736  1.1  ad 
    737  1.1  ad /*
    738  1.1  ad  * Abort SCSI command.
    739  1.1  ad  */
    740  1.1  ad #define	I2O_SCSI_SCB_ABORT		0x83
    741  1.1  ad struct i2o_scsi_scb_abort {
    742  1.1  ad 	u_int32_t	msgflags;
    743  1.1  ad 	u_int32_t	msgfunc;
    744  1.1  ad 	u_int32_t	msgictx;
    745  1.1  ad 	u_int32_t	msgtctx;
    746  1.1  ad 	u_int32_t	tctxabort;
    747  1.1  ad } __attribute__ ((__packed__));
    748  1.1  ad 
    749  1.1  ad 
    750  1.1  ad /*
    751  1.1  ad  * SCSI message reply frame.
    752  1.1  ad  */
    753  1.1  ad struct i2o_scsi_reply {
    754  1.1  ad 	u_int32_t	msgflags;
    755  1.1  ad 	u_int32_t	msgfunc;
    756  1.1  ad 	u_int32_t	msgictx;
    757  1.1  ad 	u_int32_t	msgtctx;
    758  1.1  ad 	u_int16_t	detail;
    759  1.1  ad 	u_int8_t	reserved;
    760  1.1  ad 	u_int8_t	reqstatus;
    761  1.1  ad 	u_int32_t	datalen;
    762  1.1  ad 	u_int32_t	senselen;
    763  1.1  ad 	u_int8_t	sense[40];
    764  1.1  ad } __attribute__ ((__packed__));
    765  1.1  ad 
    766  1.1  ad #define	I2O_SCSI_DSC_SUCCESS                0x00
    767  1.1  ad #define	I2O_SCSI_DSC_REQUEST_ABORTED        0x02
    768  1.1  ad #define	I2O_SCSI_DSC_UNABLE_TO_ABORT        0x03
    769  1.1  ad #define	I2O_SCSI_DSC_COMPLETE_WITH_ERROR    0x04
    770  1.1  ad #define	I2O_SCSI_DSC_ADAPTER_BUSY           0x05
    771  1.1  ad #define	I2O_SCSI_DSC_REQUEST_INVALID        0x06
    772  1.1  ad #define	I2O_SCSI_DSC_PATH_INVALID           0x07
    773  1.1  ad #define	I2O_SCSI_DSC_DEVICE_NOT_PRESENT     0x08
    774  1.1  ad #define	I2O_SCSI_DSC_UNABLE_TO_TERMINATE    0x09
    775  1.1  ad #define	I2O_SCSI_DSC_SELECTION_TIMEOUT      0x0a
    776  1.1  ad #define	I2O_SCSI_DSC_COMMAND_TIMEOUT        0x0b
    777  1.1  ad #define	I2O_SCSI_DSC_MR_MESSAGE_RECEIVED    0x0d
    778  1.1  ad #define	I2O_SCSI_DSC_SCSI_BUS_RESET         0x0e
    779  1.1  ad #define	I2O_SCSI_DSC_PARITY_ERROR_FAILURE   0x0f
    780  1.1  ad #define	I2O_SCSI_DSC_AUTOSENSE_FAILED       0x10
    781  1.1  ad #define	I2O_SCSI_DSC_NO_ADAPTER             0x11
    782  1.1  ad #define	I2O_SCSI_DSC_DATA_OVERRUN           0x12
    783  1.1  ad #define	I2O_SCSI_DSC_UNEXPECTED_BUS_FREE    0x13
    784  1.1  ad #define	I2O_SCSI_DSC_SEQUENCE_FAILURE       0x14
    785  1.1  ad #define	I2O_SCSI_DSC_REQUEST_LENGTH_ERROR   0x15
    786  1.1  ad #define	I2O_SCSI_DSC_PROVIDE_FAILURE        0x16
    787  1.1  ad #define	I2O_SCSI_DSC_BDR_MESSAGE_SENT       0x17
    788  1.1  ad #define	I2O_SCSI_DSC_REQUEST_TERMINATED     0x18
    789  1.1  ad #define	I2O_SCSI_DSC_IDE_MESSAGE_SENT       0x33
    790  1.1  ad #define	I2O_SCSI_DSC_RESOURCE_UNAVAILABLE   0x34
    791  1.1  ad #define	I2O_SCSI_DSC_UNACKNOWLEDGED_EVENT   0x35
    792  1.1  ad #define	I2O_SCSI_DSC_MESSAGE_RECEIVED       0x36
    793  1.1  ad #define	I2O_SCSI_DSC_INVALID_CDB            0x37
    794  1.1  ad #define	I2O_SCSI_DSC_LUN_INVALID            0x38
    795  1.1  ad #define	I2O_SCSI_DSC_SCSI_TID_INVALID       0x39
    796  1.1  ad #define	I2O_SCSI_DSC_FUNCTION_UNAVAILABLE   0x3a
    797  1.1  ad #define	I2O_SCSI_DSC_NO_NEXUS               0x3b
    798  1.1  ad #define	I2O_SCSI_DSC_SCSI_IID_INVALID       0x3c
    799  1.1  ad #define	I2O_SCSI_DSC_CDB_RECEIVED           0x3d
    800  1.1  ad #define	I2O_SCSI_DSC_LUN_ALREADY_ENABLED    0x3e
    801  1.1  ad #define	I2O_SCSI_DSC_BUS_BUSY               0x3f
    802  1.1  ad #define	I2O_SCSI_DSC_QUEUE_FROZEN           0x40
    803  1.1  ad 
    804  1.1  ad /*
    805  1.1  ad  * ================= SCSI peripheral class parameter groups =================
    806  1.1  ad  */
    807  1.1  ad 
    808  1.1  ad #define	I2O_PARAM_SCSI_DEVICE_INFO	0x0000
    809  1.1  ad struct i2o_param_scsi_device_info {
    810  1.1  ad 	u_int8_t	devicetype;
    811  1.1  ad 	u_int8_t	flags;
    812  1.1  ad 	u_int16_t	reserved0;
    813  1.1  ad 	u_int32_t	identifier;
    814  1.1  ad 	u_int8_t	luninfo[8];
    815  1.1  ad 	u_int32_t	queuedepth;
    816  1.1  ad 	u_int8_t	reserved1;
    817  1.1  ad 	u_int8_t	negoffset;
    818  1.1  ad 	u_int8_t	negdatawidth;
    819  1.1  ad 	u_int8_t	reserved2;
    820  1.1  ad 	u_int64_t	negsyncrate;
    821  1.1  ad } __attribute__ ((__packed__));
    822  1.1  ad 
    823  1.1  ad #endif	/* !defined _I2O_I2O_H_ */
    824