The Design and Implementation of the FreeBSD Operating System, Second Edition
Now available: The Design and Implementation of the FreeBSD Operating System (Second Edition)


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]

FreeBSD/Linux Kernel Cross Reference
sys/dev/raid/asr/i2odep.h

Version: -  FREEBSD  -  FREEBSD-13-STABLE  -  FREEBSD-13-0  -  FREEBSD-12-STABLE  -  FREEBSD-12-0  -  FREEBSD-11-STABLE  -  FREEBSD-11-0  -  FREEBSD-10-STABLE  -  FREEBSD-10-0  -  FREEBSD-9-STABLE  -  FREEBSD-9-0  -  FREEBSD-8-STABLE  -  FREEBSD-8-0  -  FREEBSD-7-STABLE  -  FREEBSD-7-0  -  FREEBSD-6-STABLE  -  FREEBSD-6-0  -  FREEBSD-5-STABLE  -  FREEBSD-5-0  -  FREEBSD-4-STABLE  -  FREEBSD-3-STABLE  -  FREEBSD22  -  l41  -  OPENBSD  -  linux-2.6  -  MK84  -  PLAN9  -  xnu-8792 
SearchContext: -  none  -  3  -  10 

    1 /*-
    2  ****************************************************************************
    3  *
    4  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
    5  * Copyright (c) 2000 Adaptec Corporation.
    6  * All rights reserved.
    7  *
    8  * Copyright (c) 1998 I2O Special Interest Group (I2O SIG)
    9  * All rights reserved
   10  *
   11  * Redistribution and use in source form, with or without modification, are
   12  * permitted provided that redistributions of source code must retain the
   13  * above copyright notice, this list of conditions and the following disclaimer.
   14  *
   15  * This software is provided `as is' by Distributed Processing Technology and
   16  * any express or implied warranties, including, but not limited to, the
   17  * implied warranties of merchantability and fitness for a particular purpose,
   18  * are disclaimed. In no event shall Distributed Processing Technology be
   19  * liable for any direct, indirect, incidental, special, exemplary or
   20  * consequential damages (including, but not limited to, procurement of
   21  * substitute goods or services; loss of use, data, or profits; or business
   22  * interruptions) however caused and on any theory of liability, whether in
   23  * contract, strict liability, or tort (including negligence or otherwise)
   24  * arising in any way out of the use of this driver software, even if advised
   25  * of the possibility of such damage.
   26  *
   27  * This information is provided on an as-is basis without warranty of any
   28  * kind, either express or implied, including but not limited to, implied
   29  * warranties or merchantability and fitness for a particular purpose. I2O SIG
   30  * does not warrant that this program will meet the user's requirements or
   31  * that the operation of these programs will be uninterrupted or error-free.
   32  * The I2O SIG disclaims all liability, including liability for infringement
   33  * of any proprietary rights, relating to implementation of information in
   34  * this specification. The I2O SIG does not warrant or represent that such
   35  * implementations(s) will not infringe such rights. Acceptance and use of
   36  * this program constitutes the user's understanding that he will have no
   37  * recourse to I2O SIG for any actual or consequential damages including, but
   38  * not limited to, loss profits arising out of use or inability to use this
   39  * program.
   40  *
   41  * This information is provided for the purpose of recompilation of the
   42  * driver code provided by Distributed Processing Technology only. It is
   43  * NOT to be used for any other purpose.
   44  *
   45  * To develop other products based upon I2O definitions, it is necessary to
   46  * become a "Registered Developer" of the I2O SIG. This can be done by calling
   47  * 415-750-8352 in the US, or via http://www.i2osig.org.
   48  *
   49  * $FreeBSD: src/sys/dev/asr/i2odep.h,v 1.9 2006/02/04 08:01:49 scottl Exp $
   50  *
   51  **************************************************************************/
   52 
   53 /*
   54  * This template provides place holders for architecture and compiler
   55  * dependencies. It should be filled in and renamed as i2odep.h.
   56  * i2odep.h is included by i2otypes.h. <xxx> marks the places to fill.
   57  */
   58 
   59 #ifndef __INCi2odeph
   60 #define __INCi2odeph
   61 
   62 #define I2ODEP_REV 1_5_4
   63 
   64 /*
   65  * Pragma macros. These are to assure appropriate alignment between
   66  * host/IOP as defined by the I2O Specification. Each one of the shared
   67  * header files includes these macros.
   68  */
   69 
   70 #define PRAGMA_ALIGN_PUSH
   71 #define PRAGMA_ALIGN_POP
   72 #define PRAGMA_PACK_PUSH
   73 #define PRAGMA_PACK_POP
   74 
   75 /* Setup the basics */
   76 
   77 typedef    signed char    S8;
   78 typedef    signed short   S16;
   79 
   80 typedef    unsigned char  U8;
   81 typedef    unsigned short U16;
   82 
   83 typedef    u_int32_t U32;
   84 typedef    int32_t  S32;
   85 
   86 
   87 /* Bitfields */
   88 
   89 #if (defined(__BORLANDC__))
   90 typedef    U16 BF;
   91 #else
   92 typedef    U32 BF;
   93 #endif
   94 
   95 
   96 /* VOID */
   97 
   98 #ifndef __VOID
   99 #if (defined(_DPT_ARC))
  100 # define VOID void
  101 #else
  102  typedef    void  VOID;
  103 #endif
  104 #define __VOID
  105 #endif
  106 
  107 
  108 /* Boolean */
  109 
  110 #ifndef __BOOL
  111 #define __BOOL
  112 
  113 typedef unsigned char BOOL;
  114 #endif
  115 
  116 #if !defined(__FAR__)
  117 # if defined(__BORLANDC__)
  118 #  define __FAR__ far
  119 # else
  120 #  define __FAR__
  121 # endif
  122 #endif
  123 
  124 /* NULL */
  125 
  126 #if !defined(NULL)
  127 # define NULL  ((VOID __FAR__ *)0L)
  128 #endif
  129 
  130 
  131 #if defined(__SPARC__) || defined(__linux__)
  132 typedef char                   CHAR;
  133 typedef char                   *pCHAR;
  134 typedef char                   INT8;
  135 typedef char                   *pINT8;
  136 typedef unsigned char          UINT8;
  137 typedef unsigned char          *pUINT8;
  138 typedef short                  INT16;
  139 typedef short                  *pINT16;
  140 typedef unsigned short         UINT16;
  141 typedef unsigned short         *pUINT16;
  142 typedef long                   INT32;
  143 typedef long                   *pINT32;
  144 typedef unsigned long          UINT32;
  145 typedef unsigned long          *pUINT32;
  146 /* typedef SCSI_REQUEST_BLOCK     OS_REQUEST_T; */
  147 /* typedef PSCSI_REQUEST_BLOCK    pOS_REQUEST_T; */
  148 #define STATIC                 static
  149 #ifndef __NEAR__
  150 # if (defined(__BORLANDC__))
  151 #  define __NEAR__ near
  152 # else
  153 #  define __NEAR__
  154 # endif
  155 #endif
  156 #define pVOID                  void *
  157 #define pBOOLEAN               BOOLEAN *
  158 #endif
  159 
  160 
  161 /*
  162  * Copyright (c) 1996-2000 Distributed Processing Technology Corporation
  163  * Copyright (c) 2000 Adaptec Corporation.
  164  * All rights reserved.
  165  */
  166 /*
  167  *      Define some generalized portability macros
  168  *      These macros follow the following parameterization:
  169  *          _F_getXXX(pointer,primaryElement<,offset>,referredElement)
  170  *          _F_setXXX(pointer,primaryElement<,offset>,referredElement,newValue)
  171  *      These parameters are shortened to u, w, x, y and z to reduce clutter.
  172  */
  173 #if (defined(__BORLANDC__))
  174 # define I2O_TID_MASK         ((U16)((1L<<I2O_TID_SZ)-1))
  175 /* First 12 bits */
  176 # define _F_getTID(w,x,y)     (*((U16 __FAR__ *)(&((w)->x))) & I2O_TID_MASK)
  177 # define _F_setTID(w,x,y,z)   (*((U16 __FAR__ *)(&((w)->x)))\
  178                                &= 0xFFFF - I2O_TID_MASK);\
  179                               (*((U16 __FAR__ *)(&((w)->x)))\
  180                                |=(U16)(z)&I2O_TID_MASK)
  181 /* Seconds 12 bits (optimized with the assumption of 12 & 12) */
  182 # define _F_getTID1(w,x,y)    ((*(U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\
  183                                + (I2O_TID_SZ/8)))\
  184                                 >> (I2O_TID_SZ-((I2O_TID_SZ/8)*8)))
  185 # define _F_setTID1(w,x,y,z)  ((*((U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\
  186                                + (I2O_TID_SZ/8)))) &= (0xFFFF >> I2O_TID_SZ));\
  187                               ((*((U16 __FAR__ *)(((U8 __FAR__ *)(&((w)->x)))\
  188                                + (I2O_TID_SZ/8)))) |= (z)\
  189                                 << (I2O_TID_SZ-((I2O_TID_SZ/8)*8)))
  190 /* Last 8 bits */
  191 # define _F_getFunc(w,x,y)    (*(((U8 __FAR__ *)(&((w)->x)))\
  192                                + ((I2O_TID_SZ+I2O_TID_SZ)/8)))
  193 # define _F_setFunc(w,x,y,z)  (_F_getFunc(w,x,y) = (z))
  194 # define I2O_SG_COUNT_MASK    ((U32)((1L<<I2O_SG_COUNT_SZ)-1))
  195 /* First 24 bits */
  196 # define _F_getCount(w,x,y)   (*((U32 __FAR__ *)(&((w)->x)))&I2O_SG_COUNT_MASK)
  197 /*
  198  * The following is less efficient because of compiler inefficiencies:
  199  *
  200  * # define _F_setCount(w,x,y,z)  *((U16 __FAR__ *)(&((w)->x))) = (U16)(z);\
  201  *                              ((U8 __FAR__ *)(&((w)->x)))[2]= (U8)((z)>>16L)
  202  *
  203  * so we will use the apparently more code intensive:
  204  */
  205 # define _F_setCount(w,x,y,z) (*((U32 __FAR__ *)(&((w)->x)))\
  206                                &= 0xFFFFFFFFL - I2O_SG_COUNT_MASK);\
  207                               (*((U32 __FAR__ *)(&((w)->x)))\
  208                                |= (z) & I2O_SG_COUNT_MASK)
  209 /* Last 8 bits */
  210 # define _F_getFlags(w,x,y)   (*(((U8 __FAR__ *)(&((w)->x)))\
  211                                + (I2O_SG_COUNT_SZ/8)))
  212 # define _F_setFlags(w,x,y,z) (_F_getFlags(w,x,y) = (z))
  213 /* Other accesses that are simpler */
  214 # define _F_get1bit(w,x,y,z)     ((U8)((w)->z))
  215 # define _F_set1bit(w,x,y,z,u)   ((w)->z = (u))
  216 # define _F_get1bit1(w,x,y,z)    ((U8)((w)->z))
  217 # define _F_set1bit1(w,x,y,z,u)  ((w)->z = (u))
  218 # define _F_get4bit4(w,x,y,z)    ((U8)((w)->z))
  219 # define _F_set4bit4(w,x,y,z,u)  ((w)->z = (u))
  220 # define _F_get8bit(w,x,y,z)     ((U8)((w)->z))
  221 # define _F_set8bit(w,x,y,z,u)   ((w)->z = (u))
  222 # define _F_get12bit(w,x,y,z)    ((U16)((w)->z))
  223 # define _F_set12bit(w,x,y,z,u)  ((w)->z = (u))
  224 # define _F_get12bit4(w,x,y,z)   ((U16)((w)->z))
  225 # define _F_set12bit4(w,x,y,z,u) ((w)->z = (u))
  226 # define _F_get16bit(w,x,y,z)    ((U16)((w)->z))
  227 # define _F_set16bit(w,x,y,z,u)  ((w)->z = (u))
  228 #elif (defined(_DPT_BIG_ENDIAN))
  229 /* First 12 bits */
  230 # define _F_getTID(w,x,y)     getL12bit(w,x,0)
  231 # define _F_setTID(w,x,y,z)   setL12bit(w,x,0,z)
  232 # define _F_getTID1(w,x,y)    getL12bit1(w,x,0)
  233 # define _F_setTID1(w,x,y,z)  setL12bit1(w,x,0,z)
  234 # define _F_getFunc(w,x,y)    getL8bit(w,x,3)
  235 # define _F_setFunc(w,x,y,z)  setL8bit(w,x,3,z)
  236 # define _F_getCount(w,x,y)   getL24bit1(w,x,0)
  237 # define _F_setCount(w,x,y,z) setL24bit1(w,x,0,z)
  238 # define _F_getFlags(w,x,y)   getL8bit(w,x,3)
  239 # define _F_setFlags(w,x,y,z) setL8bit(w,x,3,z)
  240 /* Other accesses that are simpler */
  241 # define _F_get1bit(w,x,y,z)     getL1bit(w,x,y)
  242 # define _F_set1bit(w,x,y,z,u)   setL1bit(w,x,y,u)
  243 # define _F_get1bit1(w,x,y,z)    getL1bit1(w,x,y)
  244 # define _F_set1bit1(w,x,y,z,u)  setL1bit1(w,x,y,u)
  245 # define _F_get4bit4(w,x,y,z)    getL4bit(w,x,y)
  246 # define _F_set4bit4(w,x,y,z,u)  setL4bit(w,x,y,u)
  247 # define _F_get8bit(w,x,y,z)     getL8bit(w,x,y)
  248 # define _F_set8bit(w,x,y,z,u)   setL8bit(w,x,y,u)
  249 # define _F_get12bit(w,x,y,z)    getL12bit(w,x,y)
  250 # define _F_set12bit(w,x,y,z,u)  setL12bit(w,x,y,z)
  251 # define _F_get12bit4(w,x,y,z)   getL12bit1(w,x,(y)-1)
  252 # define _F_set12bit4(w,x,y,z,u) setL12bit1(w,x,(y)-1,u)
  253 # define _F_get16bit(w,x,y,z)    getL16bit(w,x,y)
  254 # define _F_set16bit(w,x,y,z,u)  setL16bit(w,x,y,u)
  255 #else
  256 # define _F_getTID(w,x,y)     ((U16)((w)->y))
  257 # define _F_setTID(w,x,y,z)   ((w)->y = (z))
  258 # define _F_getTID1(w,x,y)    ((U16)((w)->y))
  259 # define _F_setTID1(w,x,y,z)  ((w)->y = (z))
  260 # define _F_getFunc(w,x,y)    ((U8)((w)->y))
  261 # define _F_setFunc(w,x,y,z)  ((w)->y = (z))
  262 # define _F_getCount(w,x,y)   ((U32)((w)->y))
  263 # define _F_setCount(w,x,y,z) ((w)->y = (z))
  264 # define _F_getFlags(w,x,y)   ((U8)((w)->y))
  265 # define _F_setFlags(w,x,y,z) ((w)->y = (z))
  266 # define _F_get1bit(w,x,y,z)     ((U8)((w)->z))
  267 # define _F_set1bit(w,x,y,z,u)   ((w)->z = (u))
  268 # define _F_get1bit1(w,x,y,z)    ((U8)((w)->z))
  269 # define _F_set1bit1(w,x,y,z,u)  ((w)->z = (u))
  270 # define _F_get4bit4(w,x,y,z)    ((U8)((w)->z))
  271 # define _F_set4bit4(w,x,y,z,u)  ((w)->z = (u))
  272 # define _F_get8bit(w,x,y,z)     ((U8)((w)->z))
  273 # define _F_set8bit(w,x,y,z,u)   ((w)->z = (u))
  274 # define _F_get12bit(w,x,y,z)    ((U16)((w)->z))
  275 # define _F_set12bit(w,x,y,z,u)  ((w)->z = (u))
  276 # define _F_get12bit4(w,x,y,z)   ((U16)((w)->z))
  277 # define _F_set12bit4(w,x,y,z,u) ((w)->z = (u))
  278 # define _F_get16bit(w,x,y,z)    ((U16)((w)->z))
  279 # define _F_set16bit(w,x,y,z,u)  ((w)->z = (u))
  280 #endif
  281 
  282 /*
  283  *      Define some specific portability macros
  284  *      These macros follow the following parameterization:
  285  *              XXX_getYYY (pointer)
  286  *              XXX_setYYY (pointer, newValue)
  287  *      These parameters are shortened to x and y to reduce clutter.
  288  */
  289 
  290 /*
  291  * General SGE
  292  */
  293 #define I2O_FLAGS_COUNT_getCount(x)   _F_getCount(x,Count,Count)
  294 #define I2O_FLAGS_COUNT_setCount(x,y) _F_setCount(x,Count,Count,y)
  295 #define I2O_FLAGS_COUNT_getFlags(x)   _F_getFlags(x,Count,Flags)
  296 #define I2O_FLAGS_COUNT_setFlags(x,y) _F_setFlags(x,Count,Flags,y)
  297 
  298 /*
  299  * I2O_SGE_SIMPLE_ELEMENT
  300  */
  301 #define I2O_SGE_SIMPLE_ELEMENT_getPhysicalAddress(x) \
  302         getLU4((&(x)->PhysicalAddress),0)
  303 #define I2O_SGE_SIMPLE_ELEMENT_setPhysicalAddress(x,y) \
  304         setLU4((&(x)->PhysicalAddress),0,y)
  305 /*
  306  * I2O_SGE_LONG_TRANSACTION_ELEMENT
  307  */
  308 #define I2O_SGE_LONG_TRANSACTION_ELEMENT_getLongElementLength(x)\
  309         _F_getCount(x,LongElementLength,LongElementLength)
  310 #define I2O_SGE_LONG_TRANSACTION_ELEMENT_setLongElementLength(x,y)\
  311         _F_setCount(x,LongElementLength,LongElementLength,y)
  312 #define I2O_SGE_LONG_TRANSACTION_ELEMENT_getFlags(x)\
  313         _F_getFlags(x,LongElementLength,Flags)
  314 #define I2O_SGE_LONG_TRANSACTION_ELEMENT_setFlags(x,y)\
  315         _F_setFlags(x,LongElementLength,Flags,y)
  316 
  317 /*
  318  * I2O_SGE_LONG_TRANSPORT_ELEMENT
  319  */
  320 #define I2O_SGE_LONG_TRANSPORT_ELEMENT_getLongElementLength(x)\
  321         _F_getCount(x,LongElementLength,LongElementLength)
  322 #define I2O_SGE_LONG_TRANSPORT_ELEMENT_setLongElementLength(x,y)\
  323         _F_setCount(x,LongElementLength,LongElementLength,y)
  324 #define I2O_SGE_LONG_TRANSPORT_ELEMENT_getFlags(x)\
  325         _F_getFlags(x,LongElementLength,Flags)
  326 #define I2O_SGE_LONG_TRANSPORT_ELEMENT_setFlags(x,y)\
  327         _F_setFlags(x,LongElementLength,Flags,y)
  328 
  329 /*
  330  * I2O_EXEC_ADAPTER_ASSIGN_MESSAGE
  331  */
  332 #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_getDdmTID(x)\
  333         _F_getTID(x,DdmTID,DdmTID)
  334 #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_setDdmTID(x,y)\
  335         _F_setTID(x,DDdmTID,DdmTID,y)
  336 #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_getOperationFlags(x)\
  337         _F_getFunc(x,DdmTID,OperationFlags)
  338 #define I2O_EXEC_ADAPTER_ASSIGN_MESSAGE_setOperationFlags(x,y)\
  339         _F_setFunc(x,DdmTID,OperationFlags,y)
  340 
  341 /*
  342  * I2O_EXEC_BIOS_INFO_SET_MESSAGE
  343  */
  344 #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_getDeviceTID(x)\
  345         _F_getTID(x,DeviceTID,DeviceTID)
  346 #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_setDeviceTID(x,y)\
  347         _F_setTID(x,DeviceTID,DeviceTID,y)
  348 #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_getBiosInfo(x)\
  349         _F_getFunc(x,DeviceTID,BiosInfo)
  350 #define I2O_EXEC_BIOS_INFO_SET_MESSAGE_setBiosInfo(x,y)  \
  351         _F_setFunc(x,DeviceTID,BiosInfo,y)
  352 
  353 /*
  354  * I2O_ALIAS_CONNECT_SETUP
  355  */
  356 #define I2O_ALIAS_CONNECT_SETUP_getIOP1AliasForTargetDevice(x)\
  357         _F_getTID(x,IOP1AliasForTargetDevice,IOP1AliasForTargetDevice)
  358 #define I2O_ALIAS_CONNECT_SETUP_setIOP1AliasForTargetDevice(x,y)\
  359         _F_setTID(x,IOP1AliasForTargetDevice,IOP1AliasForTargetDevice,y)
  360 #define I2O_ALIAS_CONNECT_SETUP_getIOP2AliasForInitiatorDevice(x)\
  361         _F_getTID1(x,IOP1AliasForTargetDevice,IOP2AliasForInitiatorDevice)
  362 #define I2O_ALIAS_CONNECT_SETUP_setIOP2AliasForInitiatorDevice(x,y)\
  363         _F_setTID1(x,IOP1AliasForTargetDevice,IOP2AliasForInitiatorDevice,y)
  364 
  365 /*
  366  * I2O_OBJECT_CONNECT_SETUP
  367  */
  368 #define I2O_OBJECT_CONNECT_SETUP_getTargetDevice(x)\
  369         _F_getTID(x,TargetDevice,TargetDevice)
  370 #define I2O_OBJECT_CONNECT_SETUP_setTargetDevice(x,y)\
  371         _F_setTID(x,TargetDevice,TargetDevice,y)
  372 #define I2O_OBJECT_CONNECT_SETUP_getInitiatorDevice(x)\
  373         _F_getTID1(x,TargetDevice,InitiatorDevice)
  374 #define I2O_OBJECT_CONNECT_SETUP_setInitiatorDevice(x,y)\
  375         _F_setTID1(x,TargetDevice,InitiatorDevice,y)
  376 #define I2O_OBJECT_CONNECT_SETUP_getOperationFlags(x)\
  377         _F_getFunc(x,TargetDevice,OperationFlags)
  378 #define I2O_OBJECT_CONNECT_SETUP_setOperationFlags(x,y)\
  379         _F_setFunc(x,TargetDevice,OperationFlags,y)
  380 
  381 /*
  382  * I2O_OBJECT_CONNECT_REPLY
  383  */
  384 #define I2O_OBJECT_CONNECT_REPLY_getTargetDevice(x)\
  385         _F_getTID(x,TargetDevice,TargetDevice)
  386 #define I2O_OBJECT_CONNECT_REPLY_setTargetDevice(x,y)\
  387         _F_setTID(x,TargetDevice,TargetDevice,y)
  388 #define I2O_OBJECT_CONNECT_REPLY_getInitiatorDevice(x)\
  389         _F_getTID1(x,TargetDevice,InitiatorDevice)
  390 #define I2O_OBJECT_CONNECT_REPLY_setInitiatorDevice(x,y)\
  391         _F_setTID1(x,TargetDevice,InitiatorDevice,y)
  392 #define I2O_OBJECT_CONNECT_REPLY_getReplyStatusCode(x)\
  393         _F_getFunc(x,TargetDevice,ReplyStatusCode)
  394 #define I2O_OBJECT_CONNECT_REPLY_setReplyStatusCode(x,y)\
  395         _F_setFunc(x,TargetDevice,ReplyStatusCode,y)
  396 
  397 /*
  398  * I2O_EXEC_DEVICE_ASSIGN_MESSAGE
  399  */
  400 #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_getDeviceTID(x)\
  401         _F_getTID(x,Object.DeviceTID,Object.DeviceTID)
  402 #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_setDeviceTID(x,y)\
  403         _F_setTID(x,Object.DeviceTID,Object.DeviceTID,y)
  404 #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_getIOP_ID(x)\
  405         _F_getTID1(x,Object.DeviceTID,Object.IOP_ID)
  406 #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_setIOP_ID(x,y)\
  407         _F_setTID1(x,Object.DeviceTID,Object.IOP_ID,y)
  408 #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_getOperationFlags(x)\
  409         _F_getFunc(x,Object.DeviceTID,Object.OperationFlags)
  410 #define I2O_EXEC_DEVICE_ASSIGN_MESSAGE_setOperationFlags(x,y)\
  411         _F_setFunc(x,Object.DeviceTID,Object.OperationFlags,y)
  412 
  413 /*
  414  * I2O_EXEC_DEVICE_RELEASE_MESSAGE
  415  */
  416 #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_getDeviceTID(x)\
  417         _F_getTID(x,Object.DeviceTID,Object.DeviceTID)
  418 #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_setDeviceTID(x,y)\
  419         _F_setTID(x,Object.DeviceTID,Object.DeviceTID,y)
  420 #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_getIOP_ID(x)\
  421         _F_getTID1(x,Object.DeviceTID,Object.IOP_ID)
  422 #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_setIOP_ID(x,y)\
  423         _F_setTID1(x,Object.DeviceTID,Object.IOP_ID,y)
  424 #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_getOperationFlags(x)\
  425         _F_getFunc(x,Object.DeviceTID,Object.OperationFlags)
  426 #define I2O_EXEC_DEVICE_RELEASE_MESSAGE_setOperationFlags(x,y)\
  427         _F_setFunc(x,Object.DeviceTID,Object.OperationFlags,y)
  428 
  429 /*
  430  * I2O_EXEC_IOP_RESET_MESSAGE
  431  */
  432 #define I2O_EXEC_IOP_RESET_MESSAGE_getTargetAddress(x)\
  433         _F_getTID(x,TargetAddress,TargetAddress)
  434 #define I2O_EXEC_IOP_RESET_MESSAGE_setTargetAddress(x,y)\
  435         _F_setTID(x,TargetAddress,TargetAddress,y)
  436 #define I2O_EXEC_IOP_RESET_MESSAGE_getInitiatorAddress(x)\
  437         _F_getTID1(x,TargetAddress,InitiatorAddress)
  438 #define I2O_EXEC_IOP_RESET_MESSAGE_setInitiatorAddress(x,y)\
  439         _F_setTID1(x,TargetAddress,InitiatorAddress,y)
  440 #define I2O_EXEC_IOP_RESET_MESSAGE_getFunction(x)\
  441         _F_getFunc(x,TargetAddress,Function)
  442 #define I2O_EXEC_IOP_RESET_MESSAGE_setFunction(x,y)\
  443         _F_setFunc(x,TargetAddress,Function,y)
  444 #define I2O_EXEC_IOP_RESET_MESSAGE_getVersionOffset(x)\
  445                 getU1((&(x)->VersionOffset),0)
  446 #define I2O_EXEC_IOP_RESET_MESSAGE_setVersionOffset(x,y)\
  447                 setU1((&(x)->VersionOffset),0,y)
  448 #define I2O_EXEC_IOP_RESET_MESSAGE_getMsgFlags(x)\
  449                 getU1((&(x)->VersionOffset),1)
  450 #define I2O_EXEC_IOP_RESET_MESSAGE_setMsgFlags(x,y)\
  451                 setU1((&(x)->VersionOffset),1,y)
  452 #define I2O_EXEC_IOP_RESET_MESSAGE_getMessageSize(x)\
  453                 getLU2((&(x)->VersionOffset),2)
  454 #define I2O_EXEC_IOP_RESET_MESSAGE_setMessageSize(x,y)\
  455                 setLU2((&(x)->VersionOffset),2,y)
  456 #define I2O_EXEC_IOP_RESET_MESSAGE_getStatusWordLowAddress(x)\
  457                 getLU4((&(x)->StatusWordLowAddress),0)
  458 #define I2O_EXEC_IOP_RESET_MESSAGE_setStatusWordLowAddress(x,y)\
  459                 setLU4((&(x)->StatusWordLowAddress),0,y)
  460 #define I2O_EXEC_IOP_RESET_MESSAGE_getStatusWordHighAddress(x)\
  461                 getLU4((&(x)->StatusWordHighAddress),0)
  462 #define I2O_EXEC_IOP_RESET_MESSAGE_setStatusWordHighAddress(x,y)\
  463                 setLU4((&(x)->StatusWordHighAddress),0,y)
  464 
  465 
  466 /*
  467  * I2O_EXEC_STATUS_GET_MESSAGE
  468  */
  469 #define I2O_EXEC_STATUS_GET_MESSAGE_getVersionOffset(x)\
  470                 getU1((&(x)->VersionOffset),0)
  471 #define I2O_EXEC_STATUS_GET_MESSAGE_setVersionOffset(x,y)\
  472                 setU1((&(x)->VersionOffset),0,y)
  473 #define I2O_EXEC_STATUS_GET_MESSAGE_getMsgFlags(x)\
  474                 getU1((&(x)->VersionOffset),1)
  475 #define I2O_EXEC_STATUS_GET_MESSAGE_setMsgFlags(x,y)\
  476                 setU1((&(x)->VersionOffset),1,y)
  477 #define I2O_EXEC_STATUS_GET_MESSAGE_getMessageSize(x)\
  478                 getLU2((&(x)->VersionOffset),2)
  479 #define I2O_EXEC_STATUS_GET_MESSAGE_setMessageSize(x,y)\
  480                 setLU2((&(x)->VersionOffset),2,y)
  481 #define I2O_EXEC_STATUS_GET_MESSAGE_getReplyBufferAddressLow(x)\
  482                 getLU4((&(x)->ReplyBufferAddressLow),0)
  483 #define I2O_EXEC_STATUS_GET_MESSAGE_setReplyBufferAddressLow(x,y)\
  484                 setLU4((&(x)->ReplyBufferAddressLow),0,y)
  485 #define I2O_EXEC_STATUS_GET_MESSAGE_getReplyBufferAddressHigh(x)\
  486                 getLU4((&(x)->ReplyBufferAddressHigh),0)
  487 #define I2O_EXEC_STATUS_GET_MESSAGE_setReplyBufferAddressHigh(x,y)\
  488                 setLU4((&(x)->ReplyBufferAddressHigh),0,y)
  489 #define I2O_EXEC_STATUS_GET_MESSAGE_getReplyBufferLength(x)\
  490                 getLU4((&(x)->ReplyBufferLength),0)
  491 #define I2O_EXEC_STATUS_GET_MESSAGE_setReplyBufferLength(x,y)\
  492                 setLU4((&(x)->ReplyBufferLength),0,y)
  493 #define I2O_EXEC_STATUS_GET_MESSAGE_getTargetAddress(x)\
  494                 _F_getTID(x,TargetAddress,TargetAddress)
  495 #define I2O_EXEC_STATUS_GET_MESSAGE_setTargetAddress(x,y)\
  496                 _F_setTID(x,TargetAddress,TargetAddress,y)
  497 #define I2O_EXEC_STATUS_GET_MESSAGE_getInitiatorAddress(x)\
  498                 _F_getTID1(x,TargetAddress,InitiatorAddress)
  499 #define I2O_EXEC_STATUS_GET_MESSAGE_setInitiatorAddress(x,y)\
  500                 _F_setTID1(x,TargetAddress,InitiatorAddress,y)
  501 #define I2O_EXEC_STATUS_GET_MESSAGE_getFunction(x)\
  502                 _F_getFunc(x,TargetAddress,Function)
  503 #define I2O_EXEC_STATUS_GET_MESSAGE_setFunction(x,y)\
  504                 _F_setFunc(x,TargetAddress,Function,y)
  505 
  506 /*
  507  * I2O_MESSAGE_FRAME
  508  */
  509 #define I2O_MESSAGE_FRAME_getVersionOffset(x)\
  510                 getU1((&((x)->VersionOffset)),0)
  511 #define I2O_MESSAGE_FRAME_setVersionOffset(x,y)\
  512                 setU1(((&(x)->VersionOffset)),0,y)
  513 #define I2O_MESSAGE_FRAME_getMsgFlags(x)\
  514                 getU1((&((x)->VersionOffset)),1)
  515 #define I2O_MESSAGE_FRAME_setMsgFlags(x,y)\
  516                 setU1((&((x)->VersionOffset)),1,y)
  517 #define I2O_MESSAGE_FRAME_getMessageSize(x)\
  518                 getLU2((&((x)->VersionOffset)),2)
  519 #define I2O_MESSAGE_FRAME_setMessageSize(x,y)\
  520                 setLU2((&((x)->VersionOffset)),2,y)
  521 #define I2O_MESSAGE_FRAME_getTargetAddress(x)\
  522                 _F_getTID(x,TargetAddress,TargetAddress)
  523 #define I2O_MESSAGE_FRAME_setTargetAddress(x,y)\
  524                 _F_setTID(x,TargetAddress,TargetAddress,y)
  525 #define I2O_MESSAGE_FRAME_getInitiatorAddress(x)\
  526                 _F_getTID1(x,TargetAddress,InitiatorAddress)
  527 #define I2O_MESSAGE_FRAME_setInitiatorAddress(x,y)\
  528                 _F_setTID1(x,TargetAddress,InitiatorAddress,y)
  529 #define I2O_MESSAGE_FRAME_getFunction(x)\
  530                 _F_getFunc(x,TargetAddress,Function)
  531 #define I2O_MESSAGE_FRAME_setFunction(x,y)\
  532                 _F_setFunc(x,TargetAddress,Function,y)
  533 /* 32 bit only for now */
  534 #define I2O_MESSAGE_FRAME_getInitiatorContext(x)\
  535                 (x)->InitiatorContext
  536 #define I2O_MESSAGE_FRAME_setInitiatorContext(x,y)\
  537                 ((x)->InitiatorContext = (y))
  538 /*
  539  *      We are spilling the 64 bit Context field into the Transaction
  540  *      context of the specific frames. Synchronous commands (resetIop
  541  *      et al) do not have this field, so beware. Also, Failed Reply frames
  542  *      can not contain the 64 bit context, the software must reference
  543  *      the PreservedMFA and pick up the 64 bit context from the incoming
  544  *      message frame. The software must make no reference to the
  545  *      TransactionContext field at all.
  546  */
  547 #if defined(_MSC_VER) && _MSC_VER >= 800
  548 #ifndef u_int64_t
  549 #define u_int64_t unsigned __int64
  550 #endif
  551 #endif
  552 #define I2O_MESSAGE_FRAME_getInitiatorContext64(x)\
  553                 (*((u_int64_t *)(&((x)->InitiatorContext))))
  554 #define I2O_MESSAGE_FRAME_setInitiatorContext64(x,y)\
  555                 ((*((u_int64_t *)(&((x)->InitiatorContext))))=(y))
  556 
  557 /*
  558  * I2O_EXEC_OUTBOUND_INIT_MESSAGE
  559  */
  560 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getHostPageFrameSize(x)\
  561                 getLU4((&(x)->HostPageFrameSize),0)
  562 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setHostPageFrameSize(x,y)\
  563                 setLU4((&(x)->HostPageFrameSize),0,y)
  564 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getInitCode(x)\
  565                 getU1((&(x)->InitCode),0)
  566 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setInitCode(x,y)\
  567                 setU1((&(x)->InitCode),0,y)
  568 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getreserved(x)\
  569                 getU1((&(x)->reserved),0)
  570 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setreserved(x,y)\
  571                 setU1((&(x)->reserved),0,y)
  572 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_getOutboundMFrameSize(x)\
  573                 getLU2((&(x)->OutboundMFrameSize),0)
  574 #define I2O_EXEC_OUTBOUND_INIT_MESSAGE_setOutboundMFrameSize(x,y)\
  575                 setLU2((&(x)->OutboundMFrameSize),0,y)
  576 
  577 /*
  578  * I2O_EXEC_SYS_TAB_SET_MESSAGE
  579  */
  580 #define I2O_EXEC_SYS_TAB_SET_MESSAGE_getIOP_ID(x)\
  581                 _F_get12bit(x,IOP_ID,IOP_ID)
  582 #define I2O_EXEC_SYS_TAB_SET_MESSAGE_setIOP_ID(x,y)\
  583                 _F_set12bit(x,IOP_ID,IOP_ID,y)
  584 /* #define      I2O_EXEC_SYS_TAB_SET_MESSAGE_getreserved1(x) */
  585 #define I2O_EXEC_SYS_TAB_SET_MESSAGE_getHostUnitID(x)\
  586                 _F_get16bit(x,IOP_ID,2,HostUnitID)
  587 #define I2O_EXEC_SYS_TAB_SET_MESSAGE_setHostUnitID(x,y)\
  588                 _F_set16bit(x,IOP_ID,2,HostUnitID,y)
  589 #define I2O_EXEC_SYS_TAB_SET_MESSAGE_getSegmentNumber(x)\
  590                 _F_get12bit(x,SegmentNumber,SegmentNumber)
  591 #define I2O_EXEC_SYS_TAB_SET_MESSAGE_setSegmentNumber(x,y)\
  592                 _F_get12bit(x,SegmentNumber,SegmentNumber,y)
  593 
  594 /*      later
  595  * I2O_EXEC_SYS_ENABLE_MESSAGE
  596  */
  597 
  598 /*
  599  * I2O_CLASS_ID
  600  */
  601 #define I2O_CLASS_ID_getClass(x)\
  602                 _F_get12bit(x,Class,0,Class)
  603 #define I2O_CLASS_ID_setClass(x,y)\
  604                 _F_set12bit(x,Class,0,Class,y)
  605 #define I2O_CLASS_ID_getVersion(x)\
  606                 _F_get4bit4(x,Class,1,Version)
  607 #define I2O_CLASS_ID_setVersion(x,y)\
  608                 _F_set4bit4(x,Class,1,Version,y)
  609 #define I2O_CLASS_ID_getOrganizationID(x)\
  610                 _F_get16bit(x,Class,2,OrganizationID)
  611 #define I2O_CLASS_ID_setOrganizationID(x,y)\
  612                 _F_set16bit(x,Class,2,OrganizationID,y)
  613 
  614 /*
  615  * I2O_SET_SYSTAB_HEADER
  616  */
  617 #define I2O_SET_SYSTAB_HEADER_getNumberEntries(x)\
  618                 getU1((&((x)->NumberEntries)),0)
  619 #define I2O_SET_SYSTAB_HEADER_setNumberEntries(x,y)\
  620                 setU1((&(x)->NumberEntries),0,y)
  621 #define I2O_SET_SYSTAB_HEADER_getSysTabVersion(x)\
  622                 getU1((&((x)->SysTabVersion)),0)
  623 #define I2O_SET_SYSTAB_HEADER_setSysTabVersion(x,y)\
  624                 setU1((&(x)->SysTabVersion),0,y)
  625 /*  U16 reserved                */
  626 /*  U32 CurrentChangeIndicator  */
  627 
  628 
  629 
  630 
  631 /*
  632  * I2O_IOP_ENTRY
  633  */
  634 #define I2O_IOP_ENTRY_getOrganizationID(x)\
  635                 getLU2((&((x)->OrganizationID)),0)
  636 #define I2O_IOP_ENTRY_setOrganizationID(x,y)\
  637                 setLU2((&((x)->OrganizationID)),0,y)
  638 /* #define      I2O_IOP_ENTRY_getreserved U16; */
  639 #define I2O_IOP_ENTRY_getIOP_ID(x)\
  640                 _F_get12bit(x,IOP_ID,0,IOP_ID)
  641 #define I2O_IOP_ENTRY_setIOP_ID(x,y)\
  642                 _F_set12bit(x,IOP_ID,0,IOP_ID,y)
  643 /*   BF                          reserved3:I2O_RESERVED_4BITS;  */
  644 /*   BF                          reserved1:I2O_RESERVED_16BITS; */
  645 #define I2O_IOP_ENTRY_getSegmentNumber(x)\
  646                 _F_get12bit(x,SegmentNumber,0,SegmentNumber)
  647 #define I2O_IOP_ENTRY_setSegmentNumber(x,y)\
  648                 _F_set12bit(x,SegmentNumber,0,SegmentNumber,y)
  649 #define I2O_IOP_ENTRY_getI2oVersion(x)\
  650                 _F_get4bit4(x,SegmentNumber,1,I2oVersion)
  651 #define I2O_IOP_ENTRY_setI2oVersion(x,y)\
  652                 _F_set4bit4(x,SegmentNumber,1,I2oVersion,y)
  653 #define I2O_IOP_ENTRY_getIopState(x)\
  654                 _F_get8bit(x,SegmentNumber,2,IopState)
  655 #define I2O_IOP_ENTRY_setIopState(x,y)\
  656                 _F_set8bit(x,SegmentNumber,2,IopState,y)
  657 #define I2O_IOP_ENTRY_getMessengerType(x)\
  658                 _F_get8bit(x,SegmentNumber,3,MessengerType)
  659 #define I2O_IOP_ENTRY_setMessengerType(x,y)\
  660                 _F_set8bit(x,SegmentNumber,3,MessengerType,y)
  661 #define I2O_IOP_ENTRY_getInboundMessageFrameSize(x)\
  662                 getLU2((&((x)->InboundMessageFrameSize)),0)
  663 #define I2O_IOP_ENTRY_setInboundMessageFrameSize(x,y)\
  664                 setLU2((&((x)->InboundMessageFrameSize)),0,y)
  665 #define I2O_IOP_ENTRY_getreserved2(x)\
  666                 getLU2((&((x)->reserved2)),0)
  667 #define I2O_IOP_ENTRY_setreserved2(x,y)\
  668                 setLU2((&((x)->reserved2)),0,y)
  669 #define I2O_IOP_ENTRY_getLastChanged(x)\
  670                 getLU4((&((x)->LastChanged)),0)
  671 #define I2O_IOP_ENTRY_setLastChanged(x,y)\
  672                 setLU4((&((x)->LastChanged)),0,y)
  673 #define I2O_IOP_ENTRY_getIopCapabilities(x)\
  674                 getLU4((&((x)->IopCapabilities)),0)
  675 #define I2O_IOP_ENTRY_setIopCapabilities(x,y)\
  676                 setLU4((&((x)->IopCapabilities)),0,y)
  677 
  678 /* might want to declare I2O_MESSENGER_INFO struct */
  679 
  680 #define I2O_IOP_ENTRY_getInboundMessagePortAddressLow(x)\
  681                 getLU4((&((x)->MessengerInfo.InboundMessagePortAddressLow)),0)
  682 #define I2O_IOP_ENTRY_setInboundMessagePortAddressLow(x,y)\
  683                 setLU4((&((x)->MessengerInfo.InboundMessagePortAddressLow)),0,y)
  684 
  685 #define I2O_IOP_ENTRY_getInboundMessagePortAddressHigh(x)\
  686                 getLU4((&((x)->MessengerInfo.InboundMessagePortAddressHigh)),0)
  687 #define I2O_IOP_ENTRY_setInboundMessagePortAddressHigh(x,y)\
  688                 setLU4((&((x)->MessengerInfo.InboundMessagePortAddressHigh)),0,y)
  689 
  690 /*
  691  *  I2O_HRT
  692  */
  693 #define I2O_HRT_getNumberEntries(x)\
  694                 getLU2((&((x)->NumberEntries)),0)
  695 #define I2O_HRT_setNumberEntries(x,y)\
  696                 setLU2((&(x)->NumberEntries),0,y)
  697 #define I2O_HRT_getEntryLength(x)\
  698                 getU1((&(x)->EntryLength),0)
  699 #define I2O_HRT_setEntryLength(x,y)\
  700                 setU1((&(x)->EntryLength),0,y)
  701 #define I2O_HRT_getHRTVersion(x)\
  702                 getU1((&(x)->HRTVersion),0)
  703 #define I2O_HRT_setHRTVersion(x,y)\
  704                 setU1((&(x)->HRTVersion),0,y)
  705 #define I2O_HRT_getCurrentChangeIndicator(x)\
  706                 getLU4((&(x)->CurrentChangeIndicator),0)
  707 #define I2O_HRT_setCurrentChangeIndicator(x,y)\
  708                 setLU4((&(x)->CurrentChangeIndicator),0,y)
  709 #define I2O_HRT_getHRTEntryPtr(x,y)\
  710                 ((&((x)->HRTEntry[0+y])))
  711 
  712 /*
  713  *  I2O_HRT_ENTRY
  714  */
  715 #define I2O_HRT_ENTRY_getAdapterID(x)\
  716                 getLU4((&((x)->AdapterID)),0)
  717 #define I2O_HRT_ENTRY_setAdapterID(x,y)\
  718                 setLU4((&(x)->AdapterID),0,y)
  719 #define I2O_HRT_ENTRY_getControllingTID(x)\
  720                 _F_get12bit(x,ControllingTID,ControllingTID)
  721 #define I2O_HRT_ENTRY_setControllingTID(x,y)\
  722                 _F_set12bit(x,ControllingTID,ControllingTID,y)
  723 #define I2O_HRT_ENTRY_getAdapterState(x)\
  724                 _F_get4bit4(x,ControllingTID,1,AdapterState)
  725 #define I2O_HRT_ENTRY_setIAdapterState(x,y)\
  726                 _F_set4bit4(x,ControllingTID,1,AdapterState,y)
  727 #define I2O_HRT_ENTRY_getBusNumber(x)\
  728                 _F_get8bit(x,ControllingTID,2,BusNumber)
  729 #define I2O_HRT_ENTRY_setBusNumber(x,y)\
  730                 _F_set8bit(x,ControllingTID,2,BusNumber,y)
  731 #define I2O_HRT_ENTRY_getBusType(x)\
  732                 _F_get8bit(x,ControllingTID,3,BusType)
  733 #define I2O_HRT_ENTRY_setBusType(x,y)\
  734                 _F_set8bit(x,ControllingTID,3,BusType,y)
  735 #define I2O_HRT_ENTRY_getPCIBusPtr(x,y)\
  736                 (&((x)->uBus.PCIBus))
  737 
  738 /*
  739  *  I2O_LCT
  740  */
  741 #define I2O_LCT_getTableSize(x)\
  742                 _F_get16bit(x,TableSize,0,TableSize)
  743 #define I2O_LCT_setTableSize(x,y)\
  744                 _F_set16bit(x,TableSize,0,TableSize,y)
  745 #define I2O_LCT_getBootDeviceTID(x)\
  746                 _F_get12bit(x,TableSize,2,BootDeviceTID)
  747 #define I2O_LCT_setBootDeviceTID(x,y)\
  748                 _F_set12bit(x,TableSize,2,BootDeviceTID,y)
  749 #define I2O_LCT_getLctVer(x)\
  750                 _F_get4bit4(x,TableSize,3,LctVer)
  751 #define I2O_LCT_setLctVer(x,y)\
  752                 _F_set4bit4(x,TableSize,3,LctVer,y)
  753 #define I2O_LCT_getIopFlags(x)\
  754                 getLU4((&(x)->IopFlags),0)
  755 #define I2O_LCT_setIopFlags(x,y)\
  756                 setLU4((&(x)->IopFlags),0,y)
  757 #define I2O_LCT_getCurrentChangeIndicator(x)\
  758                 getLU4((&(x)->CurrentChangeIndicator),0)
  759 #define I2O_LCT_setCurrentChangeIndicator(x,y)\
  760                 setLU4((&(x)->CurrentChangeIndicator),0,y)
  761 #define I2O_LCT_getLCTEntryPtr(x,y)\
  762                 (&((x)->LCTEntry[0+y]))
  763 
  764 /*
  765  *  I2O_LCT_ENTRY
  766  */
  767 #define I2O_LCT_ENTRY_getTableEntrySize(x)\
  768                 _F_get16bit(x,TableEntrySize,0,TableEntrySize)
  769 #define I2O_LCT_ENTRY_setTableEntrySize(x,y)\
  770                 _F_set16bit(x,TableEntrySize,0,TableEntrySize,y)
  771 #define I2O_LCT_ENTRY_getLocalTID(x)\
  772                 _F_get12bit(x,TableEntrySize,2,LocalTID)
  773 #define I2O_LCT_ENTRY_setLocalTID(x,y)\
  774                 _F_set12bit(x,TableEntrySize,2,LocalTID,y)
  775 /*    BF                  4        reserved:I2O_4BIT_VERSION_SZ; */
  776 #define I2O_LCT_ENTRY_getChangeIndicator(x)\
  777                 getLU4((&(x)->ChangeIndicator),0)
  778 #define I2O_LCT_ENTRY_setChangeIndicator(x,y)\
  779                 setLU4((&(x)->ChangeIndicator),0,y)
  780 #define I2O_LCT_ENTRY_getDeviceFlags(x)\
  781                 getLU4((&(x)->DeviceFlags),0)
  782 #define I2O_LCT_ENTRY_setDeviceFlags(x,y)\
  783                 setLU4((&(x)->DeviceFlags),0,y)
  784 #define I2O_LCT_ENTRY_getClassIDPtr(x)\
  785                 (&((x)->ClassID))
  786 #define I2O_LCT_ENTRY_getSubClassInfo(x)\
  787                 getLU4((&(x)->SubClassInfo),0)
  788 #define I2O_LCT_ENTRY_setSubClassInfo(x,y)\
  789                 setLU4((&(x)->SubClassInfo),0,y)
  790 #define I2O_LCT_ENTRY_getUserTID(x)\
  791                 _F_getTID(x,UserTID,UserTID)
  792 #define I2O_LCT_ENTRY_setUserTID(x,y)\
  793                 _F_setTID(x,UserTID,UserTID,y)
  794 #define I2O_LCT_ENTRY_getParentTID(x)\
  795                 _F_getTID1(x,UserTID,ParentTID)
  796 #define I2O_LCT_ENTRY_setParentTID(x,y)\
  797                 _F_getTID1(x,UserTID,ParentTID,y)
  798 #define I2O_LCT_ENTRY_getBiosInfo(x)\
  799                 _F_getFunc(x,UserTID,BiosInfo)
  800 #define I2O_LCT_ENTRY_setBiosInfo(x,y)\
  801                 _F_setFunc(x,UserTID,BiosInfo,y)
  802 /*  2 ulong   U8                    8      IdentityTag[I2O_IDENTITY_TAG_SZ]; */
  803 #define I2O_LCT_ENTRY_getEventCapabilities(x)\
  804                 getLU4((&(x)->EventCapabilities),0)
  805 #define I2O_LCT_ENTRY_setEventCapabilities(x,y)\
  806                 setLU4((&(x)->EventCapabilities),0,y)
  807 
  808 /*
  809  *  I2O_PARAM_OPERATIONS_LIST_HEADER
  810  */
  811 #define I2O_PARAM_OPERATIONS_LIST_HEADER_getOperationCount(x)\
  812                 getLU2((&(x)->OperationCount),0)
  813 #define I2O_PARAM_OPERATIONS_LIST_HEADER_setOperationCount(x,y)\
  814                 setLU2((&(x)->OperationCount),0,y)
  815 #define I2O_PARAM_OPERATIONS_LIST_HEADER_getReserved(x)\
  816                 getLU2((&(x)->Reserved),0)
  817 #define I2O_PARAM_OPERATIONS_LIST_HEADER_setReserved(x,y)\
  818                 setLU2((&(x)->Reserved),0,y)
  819 
  820 /*
  821  *  I2O_PARAM_OPERATION_ALL_TEMPLATE
  822  */
  823 #define I2O_PARAM_OPERATION_ALL_TEMPLATE_getOperation(x)\
  824                 getLU2((&(x)->Operation),0)
  825 #define I2O_PARAM_OPERATION_ALL_TEMPLATE_setOperation(x,y)\
  826                 setLU2((&(x)->Operation),0,y)
  827 #define I2O_PARAM_OPERATION_ALL_TEMPLATE_getGroupNumber(x)\
  828                 getLU2((&(x)->GroupNumber),0)
  829 #define I2O_PARAM_OPERATION_ALL_TEMPLATE_setGroupNumber(x,y)\
  830                 setLU2((&(x)->GroupNumber),0,y)
  831 #define I2O_PARAM_OPERATION_ALL_TEMPLATE_getFieldCount(x)\
  832                 getLU2((&(x)->FieldCount),0)
  833 #define I2O_PARAM_OPERATION_ALL_TEMPLATE_setFieldCount(x,y)\
  834                 setLU2((&(x)->FieldCount),0,y)
  835 
  836 /*
  837  *  I2O_PARAM_RESULTS_LIST_HEADER
  838  */
  839 #define I2O_PARAM_RESULTS_LIST_HEADER_getResultCount(x)\
  840                 getLU2((&(x)->ResultCount),0)
  841 #define I2O_PARAM_RESULTS_LIST_HEADER_setResultCount(x,y)\
  842                 setLU2((&(x)->ResultCount),0,y)
  843 #define I2O_PARAM_RESULTS_LIST_HEADER_getReserved(x)\
  844                 getLU2((&(x)->Reserved),0)
  845 #define I2O_PARAM_RESULTS_LIST_HEADER_setReserved(x,y)\
  846                 setLU2((&(x)->Reserved),0,y)
  847 
  848 /*  later
  849  *  I2O_HBA_ADAPTER_RESET_MESSAGE
  850  */
  851 
  852 
  853 /*  LATER
  854  *  I2O_SCSI_DEVICE_RESET_MESSAGE
  855  */
  856 
  857 
  858 /*  LATER
  859  *  I2O_HBA_BUS_RESET_MESSAGE
  860  */
  861 
  862 
  863 /*
  864  *  I2O_EXEC_LCT_NOTIFY_MESSAGE
  865  */
  866 /*    I2O_MESSAGE_FRAME           StdMessageFrame; */
  867 /*    I2O_TRANSACTION_CONTEXT     TransactionContext; */
  868 #define I2O_EXEC_LCT_NOTIFY_MESSAGE_getClassIdentifier(x)\
  869                 getLU4((&(x)->ClassIdentifier),0)
  870 #define I2O_EXEC_LCT_NOTIFY_MESSAGE_setClassIdentifier(x,y)\
  871                 setLU4((&(x)->ClassIdentifier),0,y)
  872 #define I2O_EXEC_LCT_NOTIFY_MESSAGE_getLastReportedChangeIndicator(x)\
  873                 getLU4((&(x)->LastReportedChangeIndicator),0)
  874 #define I2O_EXEC_LCT_NOTIFY_MESSAGE_setLastReportedChangeIndicator(x,y)\
  875                 setLU4((&(x)->LastReportedChangeIndicator),0,y)
  876 /*    I2O_SG_ELEMENT              SGL; */
  877 
  878 
  879 
  880 /*
  881  *  I2O_UTIL_PARAMS_GET_MESSAGE
  882  */
  883 /*     I2O_MESSAGE_FRAME          StdMessageFrame;      */
  884 /*     I2O_TRANSACTION_CONTEXT    TransactionContext;   */
  885 #define I2O_UTIL_PARAMS_GET_MESSAGE_getOperationFlags(x)\
  886                 getLU4((&(x)->OperationFlags),0)
  887 #define I2O_UTIL_PARAMS_GET_MESSAGE_setOperationFlags(x,y)\
  888                 setLU4((&(x)->OperationFlags),0,y)
  889 /*     I2O_SG_ELEMENT             SGL;                  */
  890 
  891 
  892 /*
  893  *  I2O_SCSI_SCB_ABORT_MESSAGE
  894  */
  895 #define I2O_SCSI_SCB_ABORT_MESSAGE_getStdMessageFramePtr(x)\
  896                 (&((x)->StdMessageFrame))
  897 #define I2O_SCSI_SCB_ABORT_MESSAGE_getTransactionContext(x)\
  898                 (x)->TransactionContext
  899 #define I2O_SCSI_SCB_ABORT_MESSAGE_setTransactionContext(x,y)\
  900                 ((x)->TransactionContext = (y))
  901 #define I2O_SCSI_SCB_ABORT_MESSAGE_getTransactionContextToAbort(x)\
  902                 (x)->TransactionContextToAbort
  903 #define I2O_SCSI_SCB_ABORT_MESSAGE_setTransactionContextToAbort(x,y)\
  904                 ((x)->TransactionContextToAbort = (y))
  905 
  906 
  907 /*
  908  *  I2O_DPT_DEVICE_INFO_SCALAR
  909  */
  910 #define I2O_DPT_DEVICE_INFO_SCALAR_getDeviceType(x)\
  911                 getU1((&(x)->DeviceType),0)
  912 #define I2O_DPT_DEVICE_INFO_SCALAR_setDeviceType(x,y)\
  913                 setU1((&(x)->DeviceType),0,y)
  914 #define I2O_DPT_DEVICE_INFO_SCALAR_getFlags(x)\
  915                 getU1((&(x)->Flags),0)
  916 #define I2O_DPT_DEVICE_INFO_SCALAR_setFlags(x,y)\
  917                 setU1((&(x)->Flags),0,y)
  918 #define I2O_DPT_DEVICE_INFO_SCALAR_getBus(x)\
  919                 getLU2((&(x)->Bus),0)
  920 #define I2O_DPT_DEVICE_INFO_SCALAR_setBus(x,y)\
  921                 setLU2((&(x)->Bus),0,y)
  922 #define I2O_DPT_DEVICE_INFO_SCALAR_getIdentifier(x)\
  923                 getLU4((&(x)->Identifier),0)
  924 #define I2O_DPT_DEVICE_INFO_SCALAR_setIdentifier(x,y)\
  925                 setLU4((&(x)->Identifier),0,y)
  926 /*     U8         LunInfo[8]; *//* SCSI-2 8-bit scalar LUN goes into offset 1 */
  927 #define I2O_DPT_DEVICE_INFO_SCALAR_getLunInfo(x)\
  928                 getU1((&(x)->LunInfo[0]),1)
  929 #define I2O_DPT_DEVICE_INFO_SCALAR_setLunInfo(x,y)\
  930                 setU1((&(x)->LunInfo[0]),1,y)
  931 
  932 /*
  933  *       I2O_DPT_EXEC_IOP_BUFFERS_SCALAR
  934  */
  935 #define I2O_DPT_EXEC_IOP_BUFFERS_SCALAR_getSerialOutputOffset(x)\
  936                 getLU4((&(x)->SerialOutputOffset),0)
  937 #define I2O_DPT_EXEC_IOP_BUFFERS_SCALAR_getSerialOutputSizet(x)\
  938                 getLU4((&(x)->SerialOutputSize),0)
  939 #define I2O_DPT_EXEC_IOP_BUFFERS_SCALAR_getSerialHeaderSize(x)\
  940                 getLU4((&(x)->SerialHeaderSize),0)
  941 #define I2O_DPT_EXEC_IOP_BUFFERS_SCALAR_getSerialFlagsSupported(x)\
  942                 getLU4((&(x)->SerialFlagsSupported),0)
  943 
  944 /*
  945  *  I2O_PRIVATE_MESSAGE_FRAME
  946  */
  947 /* typedef struct _I2O_PRIVATE_MESSAGE_FRAME { */
  948 /*    I2O_MESSAGE_FRAME           StdMessageFrame; */
  949 /*    I2O_TRANSACTION_CONTEXT     TransactionContext; */
  950 /*    U16                         XFunctionCode; */
  951 /*    U16                         OrganizationID; */
  952 /*                                PrivatePayload[]; */
  953 /* } I2O_PRIVATE_MESSAGE_FRAME, *PI2O_PRIVATE_MESSAGE_FRAME; */
  954 #define I2O_PRIVATE_MESSAGE_FRAME_getTransactionContext(x) \
  955                 (x)->TransactionContext
  956 #define I2O_PRIVATE_MESSAGE_FRAME_setTransactionContext(x,y) \
  957                 ((x)->TransactionContext = (y))
  958 #define I2O_PRIVATE_MESSAGE_FRAME_getXFunctionCode(x) \
  959                 getLU2((&(x)->XFunctionCode),0)
  960 #define I2O_PRIVATE_MESSAGE_FRAME_setXFunctionCode(x,y) \
  961                 setLU2((&(x)->XFunctionCode),0,y)
  962 #define I2O_PRIVATE_MESSAGE_FRAME_getOrganizationID(x) \
  963                 getLU2((&(x)->OrganizationID),0)
  964 #define I2O_PRIVATE_MESSAGE_FRAME_setOrganizationID(x,y) \
  965                 setLU2((&(x)->OrganizationID),0,y)
  966 #if 0
  967 typedef struct _PRIVATE_SCSI_SCB_EXECUTE_MESSAGE {
  968         I2O_PRIVATE_MESSAGE_FRAME PRIVATE_SCSI_SCB_EXECUTE_MESSAGE;
  969         BF                        TID:16; /* Upper four bits currently are zero */
  970         /* Command is interpreted by the host */
  971         BF                        Interpret:1;
  972         /* if TRUE, deal with Physical Firmware Array information */
  973         BF                        Physical:1;
  974         BF                        Reserved1:14;
  975         U8                        CDBLength;
  976         U8                        Reserved;
  977         I2O_SCB_FLAGS             SCBFlags;
  978         U8                        CDB[  I2O_SCSI_CDB_LENGTH=16  ];
  979         U32                       ByteCount;
  980         I2O_SG_ELEMENT            SGL;
  981 } PRIVATE_SCSI_SCB_EXECUTE_MESSAGE, * PPRIVATE_SCSI_SCB_EXECUTE_MESSAGE;
  982 #endif
  983 /*
  984  *       PRIVATE_SCSI_SCB_EXECUTE_MESSAGE
  985  */
  986 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getPRIVATE_SCSI_SCB_EXECUTE_MESSAGEPtr(x)\
  987                 (&((x)->PRIVATE_SCSI_SCB_EXECUTE_MESSAGE))
  988 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getCDBLength(x)\
  989                 getU1((&(x)->CDBLength),0)
  990 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(x,y)\
  991                 setU1((&(x)->CDBLength),0,y)
  992 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getReserved(x)\
  993                 getU1((&(x)->Reserved),0)
  994 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setReserved(x,y)\
  995                 setU1((&(x)->Reserved),0,y)
  996 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(x)\
  997                 getLU2((&(x)->SCBFlags),0)
  998 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(x,y)\
  999                 setLU2((&(x)->SCBFlags),0,y)
 1000 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getByteCount(x)\
 1001                 getLU4((&((x)->ByteCount)),0)
 1002 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setByteCount(x,y)\
 1003                 setLU4((&((x)->ByteCount)),0,y)
 1004 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getTID(x)\
 1005                 _F_get16bit(x,TID,0,TID)
 1006 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setTID(x,y)\
 1007                 _F_set16bit(x,TID,0,TID,y)
 1008 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getInterpret(x)\
 1009                 _F_get1bit(x,TID,2,Interpret)
 1010 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setInterpret(x,y)\
 1011                 _F_set1bit(x,TID,2,Interpret,y)
 1012 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getPhysical(x)\
 1013                 _F_get1bit1(x,TID,2,Physical)
 1014 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_setPhysical(x,y)\
 1015                 _F_set1bit1(x,TID,2,Physical,y)
 1016 #define PRIVATE_SCSI_SCB_EXECUTE_MESSAGE_getCDBPtr(x)\
 1017                 (&((x)->CDB[0]))
 1018 
 1019 
 1020 /*
 1021  *  PRIVATE_FLASH_REGION_MESSAGE
 1022  */
 1023 #define PRIVATE_FLASH_REGION_MESSAGE_getFlashRegion(x) \
 1024                 getLU4((&((x)->FlashRegion)),0)
 1025 #define PRIVATE_FLASH_REGION_MESSAGE_setFlashRegion(x,y) \
 1026                 setLU4((&((x)->FlashRegion)),0,y)
 1027 #define PRIVATE_FLASH_REGION_MESSAGE_getRegionOffset(x) \
 1028                 getLU4((&((x)->RegionOffset)),0)
 1029 #define PRIVATE_FLASH_REGION_MESSAGE_setRegionOffset(x,y) \
 1030                 setLU4((&((x)->RegionOffset)),0,y)
 1031 #define PRIVATE_FLASH_REGION_MESSAGE_getByteCount(x) \
 1032                 getLU4((&((x)->ByteCount)),0)
 1033 #define PRIVATE_FLASH_REGION_MESSAGE_setByteCount(x,y) \
 1034                 setLU4((&((x)->ByteCount)),0,y)
 1035 
 1036 /*
 1037  *  I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR
 1038  */
 1039 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getSCSIType(x)\
 1040                 getU1((&(x)->SCSIType),0)
 1041 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setSCSIType(x,y)\
 1042                 setU1((&(x)->SCSIType),0,y)
 1043 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getProtectionManagement(x)\
 1044                 getU1((&(x)->ProtectionManagement),0)
 1045 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setProtectionManagement(x,y)\
 1046                 setU1((&(x)->ProtectionManagement),0,y)
 1047 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getSettings(x)\
 1048                 getU1((&(x)->Settings),0)
 1049 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setSettings(x,y)\
 1050                 setU1((&(x)->Settings),0,y)
 1051 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getReserved1(x)\
 1052                 getU1((&(x)->Reserved1),0)
 1053 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setReserved1(x,y)\
 1054                 setU1((&(x)->Reserved1),0,y)
 1055 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getInitiatorID(x)\
 1056                 getLU4((&(x)->InitiatorID),0)
 1057 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setInitiatorID(x,y)\
 1058                 setLU4((&(x)->InitiatorID),0,y)
 1059 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getScanLun0Only(x)\
 1060                 getLU4((&(x)->ScanLun0Only),0)
 1061 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setScanLun0Only(x,y)\
 1062                 setLU4((&(x)->ScanLun0Only),0,y)
 1063 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getDisableDevice(x)\
 1064                 getLU2((&(x)->DisableDevice),0)
 1065 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setDisableDevice(x,y)\
 1066                 setLU2((&(x)->DisableDevice),0,y)
 1067 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getMaxOffset(x)\
 1068                 getU1((&(x)->MaxOffset),0)
 1069 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setMaxOffset(x,y)\
 1070                 setU1((&(x)->MaxOffset),0,y)
 1071 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getMaxDataWidth(x)\
 1072                 getU1((&(x)->MaxDataWidth),0)
 1073 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setMaxDataWidth(x,y)\
 1074                 setU1((&(x)->MaxDataWidth),0,y)
 1075 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_getMaxSyncRate(x)\
 1076                 getLU4((&(x)->MaxSyncRate),0)
 1077 #define I2O_HBA_SCSI_CONTROLLER_INFO_SCALAR_setMaxSyncRate(x,y)\
 1078                 setLU4((&(x)->MaxSyncRate),0,y)
 1079 
 1080 /*
 1081  *  I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME
 1082  */
 1083 #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_getStdReplyFramePtr(x)\
 1084                 (&((x)->StdReplyFrame))
 1085 #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_getTransferCount(x)\
 1086                 getLU4((&(x)->TransferCount),0)
 1087 #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setTransferCount(x,y)\
 1088                 setLU4((&(x)->TransferCount),0,y)
 1089 #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_getAutoSenseTransferCount(x)\
 1090                 getLU4((&(x)->AutoSenseTransferCount),0)
 1091 #define I2O_SCSI_ERROR_REPLY_MESSAGE_FRAME_setAutoSenseTransferCount(x,y)\
 1092                 setLU4((&(x)->AutoSenseTransferCount),0,y)
 1093 
 1094 /*
 1095  *  I2O_SINGLE_REPLY_MESSAGE_FRAME
 1096  */
 1097 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getStdMessageFramePtr(x)\
 1098                 (&((x)->StdMessageFrame))
 1099 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getTransactionContext(x)\
 1100                 (x)->TransactionContext
 1101 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setTransactionContext(x,y)\
 1102                 ((x)->TransactionContext = (y))
 1103 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getDetailedStatusCode(x)\
 1104                 getLU2((&((x)->DetailedStatusCode)),0)
 1105 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setDetailedStatusCode(x,y)\
 1106                 setLU2((&((x)->DetailedStatusCode)),0,y)
 1107 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getreserved(x)\
 1108                 getU1((&((x)->reserved)),0)
 1109 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setreserved(x,y)\
 1110                 setU1((&((x)->reserved)),0,y)
 1111 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_getReqStatus(x)\
 1112                 getU1((&((x)->ReqStatus)),0)
 1113 #define I2O_SINGLE_REPLY_MESSAGE_FRAME_setReqStatus(x,y)\
 1114                 setU1((&((x)->ReqStatus)),0,y)
 1115 
 1116 
 1117 /*
 1118  *  I2O_SCSI_SCB_EXECUTE_MESSAGE
 1119  */
 1120 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getStdMessageFramePtr(x)\
 1121                 (&((x)->StdMessageFrame))
 1122 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getTransactionContext(x)\
 1123                 (x)->TransactionContext
 1124 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setTransactionContext(x,y)\
 1125                 ((x)->TransactionContext = (y))
 1126 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getCDBLength(x)\
 1127                 getU1((&((x)->CDBLength)),0)
 1128 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setCDBLength(x,y)\
 1129                 setU1((&((x)->CDBLength)),0,y)
 1130 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getReserved(x)\
 1131                 getU1((&((x)->Reserved)),0)
 1132 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setReserved(x,y)\
 1133                 setU1((&((x)->Reserved)),0,y)
 1134 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getSCBFlags(x)\
 1135                 getLU2((&((x)->SCBFlags)),0)
 1136 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setSCBFlags(x,y)\
 1137                 setLU2((&((x)->SCBFlags)),0,y)
 1138 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_getByteCount(x)\
 1139                 getLU2((&((x)->ByteCount)),0)
 1140 #define I2O_SCSI_SCB_EXECUTE_MESSAGE_setByteCount(x,y)\
 1141                 setLU2((&((x)->ByteCount)),0,y)
 1142 /*  define for these */
 1143 /*     U8                      CDB[16]; */
 1144 /*     I2O_SG_ELEMENT          SGL;     */
 1145 
 1146 
 1147 /*
 1148  *  I2O_FAILURE_REPLY_MESSAGE_FRAME
 1149  */
 1150 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getStdMessageFramePtr(x)\
 1151                 (&((x)->StdMessageFrame))
 1152 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getTransactionContext(x)\
 1153                 (x)->TransactionContext
 1154 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setTransactionContext(x,y)\
 1155                 ((x)->TransactionContext = (y))
 1156 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getLowestVersion(x)\
 1157                 getU1((&((x)->LowestVersion)),0)
 1158 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setLowestVersion(x,y)\
 1159                 setU1((&((x)->LowestVersion)),0,y)
 1160 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getHighestVersion(x)\
 1161                 getU1((&((x)->HighestVersion)),0)
 1162 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setHighestVersion(x,y)\
 1163                 setU1((&((x)->HighestVersion)),0,y)
 1164 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getAgeLimit(x)\
 1165                 getLU4((&((x)->AgeLimit)),0)
 1166 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setAgeLimit(x,y)\
 1167                 setLU4((&((x)->AgeLimit)),0,y)
 1168 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getSeverity(x)\
 1169                 _F_get8bit(x,Severity,0,Severity)
 1170 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setSeverity(x,y)\
 1171                 _F_set8bit(x,Severity,0,Severity,y)
 1172 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getFailureCode(x)\
 1173                 _F_get8bit(x,Severity,1,FailureCode)
 1174 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setFailureCode(x,y)\
 1175                 _F_get8bit(x,Severity,1,FailureCode,y)
 1176 /*
 1177  * #define      I2O_FAILURE_REPLY_MESSAGE_FRAME_getFailingHostUnitID(x)\
 1178  *               _F_get16bit(x,reserved,1,FailingHostUnitID)
 1179  * #define      I2O_FAILURE_REPLY_MESSAGE_FRAME_setFailingHostUnitID(x,y)\
 1180  *               _F_set16bit(x,reserved,1,FailingHostUnitID,y)
 1181  */
 1182 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_getPreservedMFA(x)\
 1183                 getLU4((&((x)->PreservedMFA)),0)
 1184 #define I2O_FAILURE_REPLY_MESSAGE_FRAME_setPreservedMFA(x,y)\
 1185                 setLU4((&((x)->PreservedMFA)),0,y)
 1186 
 1187 
 1188 
 1189 /*
 1190  *  I2O_EXEC_STATUS_GET_REPLY
 1191  */
 1192 #define I2O_EXEC_STATUS_GET_REPLY_getOrganizationID(x)\
 1193                 getLU2((&(x)->OrganizationID),0)
 1194 #define I2O_EXEC_STATUS_GET_REPLY_setOrganizationID(x,y)\
 1195                 setLU2((&(x)->OrganizationID),0,y)
 1196 /* #define      I2O_EXEC_STATUS_GET_REPLY_getreserved; */
 1197 #define I2O_EXEC_STATUS_GET_REPLY_getIOP_ID(x)\
 1198                 _F_get12bit(x,IOP_ID,0,IOP_ID)
 1199 #define I2O_EXEC_STATUS_GET_REPLY_setIOP_ID(x,y)\
 1200                 _F_set12bit(x,IOP_ID,0,IOP_ID,y)
 1201 /* #define      I2O_EXEC_STATUS_GET_REPLY_getreserved1(x) */
 1202 #define I2O_EXEC_STATUS_GET_REPLY_getHostUnitID(x)\
 1203                 _F_get16bit(x,IOP_ID,2,HostUnitID)
 1204 #define I2O_EXEC_STATUS_GET_REPLY_setHostUnitID(x,y)\
 1205                 _F_set16bit(x,IOP_ID,2,HostUnitID,y)
 1206 #define I2O_EXEC_STATUS_GET_REPLY_getSegmentNumber(x)\
 1207                 _F_get12bit(x,SegmentNumber,0,SegmentNumber)
 1208 #define I2O_EXEC_STATUS_GET_REPLY_setSegmentNumber(x,y)\
 1209                 _F_set12bit(x,SegmentNumber,0,SegmentNumber,y)
 1210 #define I2O_EXEC_STATUS_GET_REPLY_getI2oVersion(x)\
 1211                 _F_get4bit4(x,SegmentNumber,1,I2oVersion)
 1212 #define I2O_EXEC_STATUS_GET_REPLY_setI2oVersion(x,y)\
 1213                 _F_set4bit4(x,SegmentNumber,1,I2oVersion,y)
 1214 #define I2O_EXEC_STATUS_GET_REPLY_getIopState(x)\
 1215                 _F_get8bit(x,SegmentNumver,2,IopState)
 1216 #define I2O_EXEC_STATUS_GET_REPLY_setIopState(x,y)\
 1217                 _F_set8bit(x,SegmentNumver,2,IopState,y)
 1218 #define I2O_EXEC_STATUS_GET_REPLY_getMessengerType(x)\
 1219                 _F_get8bit(x,SegmentNumber,3,MessengerType)
 1220 #define I2O_EXEC_STATUS_GET_REPLY_setMessengerType(x,y)\
 1221                 _F_get8bit(x,SegmentNumber,3,MessengerType,y)
 1222 #define I2O_EXEC_STATUS_GET_REPLY_getInboundMFrameSize(x)\
 1223                 getLU2((&(x)->InboundMFrameSize),0)
 1224 #define I2O_EXEC_STATUS_GET_REPLY_setInboundMFrameSize(x,y)\
 1225                 setLU2((&(x)->InboundMFrameSize),0,y)
 1226 #define I2O_EXEC_STATUS_GET_REPLY_getInitCode(x)\
 1227                 getU1((&(x)->InitCode),0)
 1228 #define I2O_EXEC_STATUS_GET_REPLY_setInitCode(x,y)\
 1229                 setU1((&(x)->InitCode),0,y)
 1230 /* #define      I2O_EXEC_STATUS_GET_REPLY_getreserved2(x) */
 1231 #define I2O_EXEC_STATUS_GET_REPLY_getMaxInboundMFrames(x)\
 1232                 getLU4((&(x)->MaxInboundMFrames),0)
 1233 #define I2O_EXEC_STATUS_GET_REPLY_setMaxInboundMFrames(x,y)\
 1234                 setLU4((&(x)->MaxInboundMFrames),0,y)
 1235 #define I2O_EXEC_STATUS_GET_REPLY_getCurrentInboundMFrames(x)\
 1236                 getLU4((&(x)->CurrentInboundMFrames),0)
 1237 #define I2O_EXEC_STATUS_GET_REPLY_setCurrentInboundMFrames(x,y)\
 1238                 setLU4((&(x)->CurrentInboundMFrames),0,y)
 1239 #define I2O_EXEC_STATUS_GET_REPLY_getMaxOutboundMFrames(x)\
 1240                 getLU4((&(x)->MaxOutboundMFrames),0)
 1241 #define I2O_EXEC_STATUS_GET_REPLY_setMaxOutboundMFrames(x,y)\
 1242                 setLU4((&(x)->MaxOutboundMFrames),0,y)
 1243 /* #define      I2O_EXEC_STATUS_GET_REPLY_getProductIDString(x) */
 1244 #define I2O_EXEC_STATUS_GET_REPLY_getExpectedLCTSize(x)\
 1245                 getLU4((&(x)->ExpectedLCTSize),0)
 1246 #define I2O_EXEC_STATUS_GET_REPLY_setExpectedLCTSize(x,y)\
 1247                 setLU4((&(x)->ExpectedLCTSize),0,y)
 1248 #define I2O_EXEC_STATUS_GET_REPLY_getIopCapabilities(x)\
 1249                 getLU4((&(x)->IopCapabilities),0)
 1250 #define I2O_EXEC_STATUS_GET_REPLY_setIopCapabilities(x,y)\
 1251                 setLU4((&(x)->IopCapabilities),0,y)
 1252 #define I2O_EXEC_STATUS_GET_REPLY_getDesiredPrivateMemSize(x)\
 1253                 getLU4((&(x)->DesiredPrivateMemSize),0)
 1254 #define I2O_EXEC_STATUS_GET_REPLY_setDesiredPrivateMemSize(x,y)\
 1255                 setLU4((&(x)->DesiredPrivateMemSize),0,y)
 1256 #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateMemSize(x)\
 1257                 getLU4((&(x)->CurrentPrivateMemSize),0)
 1258 #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateMemSize(x,y)\
 1259                 setLU4((&(x)->CurrentPrivateMemSize),0,y)
 1260 #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateMemBase(x)\
 1261                 getLU4((&(x)->CurrentPrivateMemBase),0)
 1262 #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateMemBase(x,y)\
 1263                 setLU4((&(x)->CurrentPrivateMemBase),0,y)
 1264 #define I2O_EXEC_STATUS_GET_REPLY_getDesiredPrivateIOSize(x)\
 1265                 getLU4((&(x)->DesiredPrivateIOSize),0)
 1266 #define I2O_EXEC_STATUS_GET_REPLY_setDesiredPrivateIOSize(x,y)\
 1267                 setLU4((&(x)->DesiredPrivateIOSize),0,y)
 1268 #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateIOSize(x)\
 1269                 getLU4((&(x)->CurrentPrivateIOSize),0)
 1270 #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateIOSize(x,y)\
 1271                 setLU4((&(x)->CurrentPrivateIOSize),0,y)
 1272 #define I2O_EXEC_STATUS_GET_REPLY_getCurrentPrivateIOBase(x)\
 1273                 getLU4((&(x)->CurrentPrivateIOBase),0)
 1274 #define I2O_EXEC_STATUS_GET_REPLY_setCurrentPrivateIOBase(x,y)\
 1275                 setLU4((&(x)->CurrentPrivateIOBase),0,y)
 1276 /* #define      I2O_EXEC_STATUS_GET_REPLY_getreserved3(x) */
 1277 #define I2O_EXEC_STATUS_GET_REPLY_getSyncByte(x)\
 1278                 getU1((&(x)->SyncByte),0)
 1279 #define I2O_EXEC_STATUS_GET_REPLY_setSyncByte(x,y)\
 1280                 setU1((&(x)->SyncByte),0,y)
 1281 
 1282 
 1283 
 1284 /*
 1285  *  I2O_HBA_BUS_QUIESCE_MESSAGE
 1286  */
 1287 #define I2O_HBA_BUS_QUIESCE_MESSAGE_getStdMessageFramePtr(x)\
 1288                 (&((x)->StdMessageFrame))
 1289 #define I2O_HBA_BUS_QUIESCE_MESSAGE_getTransactionContext(x)\
 1290                 getBU4((&((x)->TransactionContext)),0)
 1291 #define I2O_HBA_BUS_QUIESCE_MESSAGE_setTransactionContext(x,y)\
 1292                 setBU4((&((x)->TransactionContext)),0,y)
 1293 #define I2O_HBA_BUS_QUIESCE_MESSAGE_getFlags(x)\
 1294                 getLU4((&(x)->Flags),0)
 1295 #define I2O_HBA_BUS_QUIESCE_MESSAGE_setFlags(x,y)\
 1296                 setLU4((&(x)->Flags),0,y)
 1297 
 1298 
 1299 #endif /* __INCi2odeph */

Cache object: 8cfada4bf4b65ee840e4f24eccbd588a


[ source navigation ] [ diff markup ] [ identifier search ] [ freetext search ] [ file search ] [ list types ] [ track identifier ]


This page is part of the FreeBSD/Linux Linux Kernel Cross-Reference, and was automatically generated using a modified version of the LXR engine.