mpi_cnfg.h
上传用户:lgb322
上传日期:2013-02-24
资源大小:30529k
文件大小:54k
源码类别:

嵌入式Linux

开发平台:

Unix_Linux

  1. /*
  2.  *  Copyright (c) 2000-2001 LSI Logic Corporation.
  3.  *
  4.  *
  5.  *           Name:  MPI_CNFG.H
  6.  *          Title:  MPI Config message, structures, and Pages
  7.  *  Creation Date:  July 27, 2000
  8.  *
  9.  *    MPI Version:  01.01.11
  10.  *
  11.  *  Version History
  12.  *  ---------------
  13.  *
  14.  *  Date      Version   Description
  15.  *  --------  --------  ------------------------------------------------------
  16.  *  05-08-00  00.10.01  Original release for 0.10 spec dated 4/26/2000.
  17.  *  06-06-00  01.00.01  Update version number for 1.0 release.
  18.  *  06-08-00  01.00.02  Added _PAGEVERSION definitions for all pages.
  19.  *                      Added FcPhLowestVersion, FcPhHighestVersion, Reserved2
  20.  *                      fields to FC_DEVICE_0 page, updated the page version.
  21.  *                      Changed _FREE_RUNNING_CLOCK to _PACING_TRANSFERS in
  22.  *                      SCSI_PORT_0, SCSI_DEVICE_0 and SCSI_DEVICE_1 pages
  23.  *                      and updated the page versions.
  24.  *                      Added _RESPONSE_ID_MASK definition to SCSI_PORT_1
  25.  *                      page and updated the page version.
  26.  *                      Added Information field and _INFO_PARAMS_NEGOTIATED
  27.  *                      definitionto SCSI_DEVICE_0 page.
  28.  *  06-22-00  01.00.03  Removed batch controls from LAN_0 page and updated the
  29.  *                      page version.
  30.  *                      Added BucketsRemaining to LAN_1 page, redefined the
  31.  *                      state values, and updated the page version.
  32.  *                      Revised bus width definitions in SCSI_PORT_0,
  33.  *                      SCSI_DEVICE_0 and SCSI_DEVICE_1 pages.
  34.  *  06-30-00  01.00.04  Added MaxReplySize to LAN_1 page and updated the page
  35.  *                      version.
  36.  *                      Moved FC_DEVICE_0 PageAddress description to spec.
  37.  *  07-27-00  01.00.05  Corrected the SubsystemVendorID and SubsystemID field
  38.  *                      widths in IOC_0 page and updated the page version.
  39.  *  11-02-00  01.01.01  Original release for post 1.0 work
  40.  *                      Added Manufacturing pages, IO Unit Page 2, SCSI SPI
  41.  *                      Port Page 2, FC Port Page 4, FC Port Page 5
  42.  *  11-15-00  01.01.02  Interim changes to match proposals
  43.  *  12-04-00  01.01.03  Config page changes to match MPI rev 1.00.01.
  44.  *  12-05-00  01.01.04  Modified config page actions.
  45.  *  01-09-01  01.01.05  Added defines for page address formats.
  46.  *                      Data size for Manufacturing pages 2 and 3 no longer
  47.  *                      defined here.
  48.  *                      Io Unit Page 2 size is fixed at 4 adapters and some
  49.  *                      flags were changed.
  50.  *                      SCSI Port Page 2 Device Settings modified.
  51.  *                      New fields added to FC Port Page 0 and some flags
  52.  *                      cleaned up.
  53.  *                      Removed impedance flash from FC Port Page 1.
  54.  *                      Added FC Port pages 6 and 7.
  55.  *  01-25-01  01.01.06  Added MaxInitiators field to FcPortPage0.
  56.  *  01-29-01  01.01.07  Changed some defines to make them 32 character unique.
  57.  *                      Added some LinkType defines for FcPortPage0.
  58.  *  02-20-01  01.01.08  Started using MPI_POINTER.
  59.  *  02-27-01  01.01.09  Replaced MPI_CONFIG_PAGETYPE_SCSI_LUN with
  60.  *                      MPI_CONFIG_PAGETYPE_RAID_VOLUME.
  61.  *                      Added definitions and structures for IOC Page 2 and
  62.  *                      RAID Volume Page 2.
  63.  *  03-27-01  01.01.10  Added CONFIG_PAGE_FC_PORT_8 and CONFIG_PAGE_FC_PORT_9.
  64.  *                      CONFIG_PAGE_FC_PORT_3 now supports persistent by DID.
  65.  *                      Added VendorId and ProductRevLevel fields to
  66.  *                      RAIDVOL2_IM_PHYS_ID struct.
  67.  *                      Modified values for MPI_FCPORTPAGE0_FLAGS_ATTACH_
  68.  *                      defines to make them compatible to MPI version 1.0.
  69.  *                      Added structure offset comments.
  70.  *  04-09-01  01.01.11  Added some new defines for the PageAddress field and
  71.  *                      removed some obsolete ones.
  72.  *                      Added IO Unit Page 3.
  73.  *                      Modified defines for Scsi Port Page 2.
  74.  *                      Modified RAID Volume Pages.
  75.  *  --------------------------------------------------------------------------
  76.  */
  77. #ifndef MPI_CNFG_H
  78. #define MPI_CNFG_H
  79. /*****************************************************************************
  80. *
  81. *       C o n f i g    M e s s a g e    a n d    S t r u c t u r e s
  82. *
  83. *****************************************************************************/
  84. typedef struct _CONFIG_PAGE_HEADER
  85. {
  86.     U8                      PageVersion;                /* 00h */
  87.     U8                      PageLength;                 /* 01h */
  88.     U8                      PageNumber;                 /* 02h */
  89.     U8                      PageType;                   /* 03h */
  90. } fCONFIG_PAGE_HEADER, MPI_POINTER PTR_CONFIG_PAGE_HEADER,
  91.   ConfigPageHeader_t, MPI_POINTER pConfigPageHeader_t;
  92. typedef union _CONFIG_PAGE_HEADER_UNION
  93. {
  94.    ConfigPageHeader_t  Struct;
  95.    U8                  Bytes[4];
  96.    U16                 Word16[2];
  97.    U32                 Word32;
  98. } ConfigPageHeaderUnion, MPI_POINTER pConfigPageHeaderUnion,
  99.   fCONFIG_PAGE_HEADER_UNION, MPI_POINTER PTR_CONFIG_PAGE_HEADER_UNION;
  100. /****************************************************************************/
  101. /*  PageType field values                                                   */
  102. /****************************************************************************/
  103. #define MPI_CONFIG_PAGEATTR_READ_ONLY               (0x00)
  104. #define MPI_CONFIG_PAGEATTR_CHANGEABLE              (0x10)
  105. #define MPI_CONFIG_PAGEATTR_PERSISTENT              (0x20)
  106. #define MPI_CONFIG_PAGEATTR_MASK                    (0xF0)
  107. #define MPI_CONFIG_PAGETYPE_IO_UNIT                 (0x00)
  108. #define MPI_CONFIG_PAGETYPE_IOC                     (0x01)
  109. #define MPI_CONFIG_PAGETYPE_BIOS                    (0x02)
  110. #define MPI_CONFIG_PAGETYPE_SCSI_PORT               (0x03)
  111. #define MPI_CONFIG_PAGETYPE_SCSI_DEVICE             (0x04)
  112. #define MPI_CONFIG_PAGETYPE_FC_PORT                 (0x05)
  113. #define MPI_CONFIG_PAGETYPE_FC_DEVICE               (0x06)
  114. #define MPI_CONFIG_PAGETYPE_LAN                     (0x07)
  115. #define MPI_CONFIG_PAGETYPE_RAID_VOLUME             (0x08)
  116. #define MPI_CONFIG_PAGETYPE_MANUFACTURING           (0x09)
  117. #define MPI_CONFIG_PAGETYPE_MASK                    (0x0F)
  118. #define MPI_CONFIG_TYPENUM_MASK                     (0x0FFF)
  119. /****************************************************************************
  120.  *  PageAddres field values
  121.  ****************************************************************************/
  122. #define MPI_SCSI_PORT_PGAD_PORT_MASK                (0x000000FF)
  123. #define MPI_SCSI_DEVICE_FORM_MASK                   (0xF0000000)
  124. #define MPI_SCSI_DEVICE_FORM_TARGETID               (0x00000000)
  125. #define MPI_SCSI_DEVICE_FORM_RAID_PHYS_DEV_NUM      (0x10000000)
  126. #define MPI_SCSI_DEVICE_TARGET_ID_MASK              (0x000000FF)
  127. #define MPI_SCSI_DEVICE_TARGET_ID_SHIFT             (0)
  128. #define MPI_SCSI_DEVICE_BUS_MASK                    (0x0000FF00)
  129. #define MPI_SCSI_DEVICE_BUS_SHIFT                   (8)
  130. #define MPI_SCSI_DEVICE_VOLUME_TARG_ID_MASK         (0x000000FF)
  131. #define MPI_SCSI_DEVICE_VOLUME_TARG_ID_SHIFT        (0)
  132. #define MPI_SCSI_DEVICE_VOLUME_BUS_MASK             (0x0000FF00)
  133. #define MPI_SCSI_DEVICE_VOLUME_BUS_SHIFT            (8)
  134. #define MPI_SCSI_DEVICE_PHYS_DISK_NUM_MASK          (0x00FF0000)
  135. #define MPI_SCSI_DEVICE_PHYS_DISK_NUM_SHIFT         (16)
  136. #define MPI_FC_PORT_PGAD_PORT_MASK                  (0xF0000000)
  137. #define MPI_FC_PORT_PGAD_PORT_SHIFT                 (28)
  138. #define MPI_FC_PORT_PGAD_FORM_MASK                  (0x0F000000)
  139. #define MPI_FC_PORT_PGAD_FORM_INDEX                 (0x01000000)
  140. #define MPI_FC_PORT_PGAD_INDEX_MASK                 (0x0000FFFF)
  141. #define MPI_FC_PORT_PGAD_INDEX_SHIFT                (0)
  142. #define MPI_FC_DEVICE_PGAD_PORT_MASK                (0xF0000000)
  143. #define MPI_FC_DEVICE_PGAD_PORT_SHIFT               (28)
  144. #define MPI_FC_DEVICE_PGAD_FORM_MASK                (0x0F000000)
  145. #define MPI_FC_DEVICE_PGAD_FORM_NEXT_DID            (0x00000000)
  146. #define MPI_FC_DEVICE_PGAD_ND_PORT_MASK             (0xF0000000)
  147. #define MPI_FC_DEVICE_PGAD_ND_PORT_SHIFT            (28)
  148. #define MPI_FC_DEVICE_PGAD_ND_DID_MASK              (0x00FFFFFF)
  149. #define MPI_FC_DEVICE_PGAD_ND_DID_SHIFT             (0)
  150. #define MPI_FC_DEVICE_PGAD_FORM_BUS_TID             (0x01000000)
  151. #define MPI_FC_DEVICE_PGAD_BT_BUS_MASK              (0x0000FF00)
  152. #define MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT             (8)
  153. #define MPI_FC_DEVICE_PGAD_BT_TID_MASK              (0x000000FF)
  154. #define MPI_FC_DEVICE_PGAD_BT_TID_SHIFT             (0)
  155. /****************************************************************************/
  156. /*  Config Request Message                                                          */
  157. /****************************************************************************/
  158. typedef struct _MSG_CONFIG
  159. {
  160.     U8                      Action;                     /* 00h */
  161.     U8                      Reserved;                   /* 01h */
  162.     U8                      ChainOffset;                /* 02h */
  163.     U8                      Function;                   /* 03h */
  164.     U8                      Reserved1[3];               /* 04h */
  165.     U8                      MsgFlags;                   /* 07h */
  166.     U32                     MsgContext;                 /* 08h */
  167.     U8                      Reserved2[8];               /* 0Ch */
  168.    fCONFIG_PAGE_HEADER      Header;                     /* 14h */
  169.     U32                     PageAddress;                /* 18h */
  170.     SGE_IO_UNION            PageBufferSGE;              /* 1Ch */
  171. } MSG_CONFIG, MPI_POINTER PTR_MSG_CONFIG,
  172.   Config_t, MPI_POINTER pConfig_t;
  173. /****************************************************************************/
  174. /*  Action field values                                                     */
  175. /****************************************************************************/
  176. #define MPI_CONFIG_ACTION_PAGE_HEADER               (0x00)
  177. #define MPI_CONFIG_ACTION_PAGE_READ_CURRENT         (0x01)
  178. #define MPI_CONFIG_ACTION_PAGE_WRITE_CURRENT        (0x02)
  179. #define MPI_CONFIG_ACTION_PAGE_DEFAULT              (0x03)
  180. #define MPI_CONFIG_ACTION_PAGE_WRITE_NVRAM          (0x04)
  181. #define MPI_CONFIG_ACTION_PAGE_READ_DEFAULT         (0x05)
  182. #define MPI_CONFIG_ACTION_PAGE_READ_NVRAM           (0x06)
  183. /* Config Reply Message */
  184. typedef struct _MSG_CONFIG_REPLY
  185. {
  186.     U8                      Action;                     /* 00h */
  187.     U8                      Reserved;                   /* 01h */
  188.     U8                      MsgLength;                  /* 02h */
  189.     U8                      Function;                   /* 03h */
  190.     U8                      Reserved1[3];               /* 04h */
  191.     U8                      MsgFlags;                   /* 07h */
  192.     U32                     MsgContext;                 /* 08h */
  193.     U8                      Reserved2[2];               /* 0Ch */
  194.     U16                     IOCStatus;                  /* 0Eh */
  195.     U32                     IOCLogInfo;                 /* 10h */
  196.    fCONFIG_PAGE_HEADER      Header;                     /* 14h */
  197. } MSG_CONFIG_REPLY, MPI_POINTER PTR_MSG_CONFIG_REPLY,
  198.   ConfigReply_t, MPI_POINTER pConfigReply_t;
  199. /*****************************************************************************
  200. *
  201. *               C o n f i g u r a t i o n    P a g e s
  202. *
  203. *****************************************************************************/
  204. /****************************************************************************/
  205. /*  Manufacturing Config pages                                              */
  206. /****************************************************************************/
  207. #define MPI_MANUFACTPAGE_DEVICEID_FC909             (0x0621)
  208. #define MPI_MANUFACTPAGE_DEVICEID_FC919             (0x0624)
  209. #define MPI_MANUFACTPAGE_DEVICEID_FC929             (0x0622)
  210. #define MPI_MANUFACTPAGE_DEVID_53C1030              (0x0030)
  211. #define MPI_MANUFACTPAGE_DEVID_53C1030ZC            (0x0031)
  212. #define MPI_MANUFACTPAGE_DEVID_53C1035              (0x0035)
  213. typedef struct _CONFIG_PAGE_MANUFACTURING_0
  214. {
  215.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  216.     U8                      ChipName[16];               /* 04h */
  217.     U8                      ChipRevision[8];            /* 14h */
  218.     U8                      BoardName[16];              /* 1Ch */
  219.     U8                      BoardAssembly[16];          /* 2Ch */
  220.     U8                      BoardTracerNumber[16];      /* 3Ch */
  221. } fCONFIG_PAGE_MANUFACTURING_0, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_0,
  222.   ManufacturingPage0_t, MPI_POINTER pManufacturingPage0_t;
  223. #define MPI_MANUFACTURING0_PAGEVERSION                 (0x00)
  224. typedef struct _CONFIG_PAGE_MANUFACTURING_1
  225. {
  226.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  227.     U8                      VPD[256];                   /* 04h */
  228. } fCONFIG_PAGE_MANUFACTURING_1, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_1,
  229.   ManufacturingPage1_t, MPI_POINTER pManufacturingPage1_t;
  230. #define MPI_MANUFACTURING1_PAGEVERSION                 (0x00)
  231. typedef struct _MPI_CHIP_REVISION_ID
  232. {
  233.     U16 DeviceID;                                       /* 00h */
  234.     U8  PCIRevisionID;                                  /* 02h */
  235.     U8  Reserved;                                       /* 03h */
  236. } MPI_CHIP_REVISION_ID, MPI_POINTER PTR_MPI_CHIP_REVISION_ID,
  237.   MpiChipRevisionId_t, MPI_POINTER pMpiChipRevisionId_t;
  238. typedef struct _CONFIG_PAGE_MANUFACTURING_2
  239. {
  240.    fCONFIG_PAGE_HEADER                  Header;         /* 00h */
  241.     MPI_CHIP_REVISION_ID                ChipId;         /* 04h */
  242.     U32                                 HwSettings[1];  /* 08h */
  243. } fCONFIG_PAGE_MANUFACTURING_2, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_2,
  244.   ManufacturingPage2_t, MPI_POINTER pManufacturingPage2_t;
  245. #define MPI_MANUFACTURING2_PAGEVERSION                  (0x00)
  246. typedef struct _CONFIG_PAGE_MANUFACTURING_3
  247. {
  248.    fCONFIG_PAGE_HEADER                  Header;         /* 00h */
  249.     MPI_CHIP_REVISION_ID                ChipId;         /* 04h */
  250.     U32                                 Info[1];        /* 08h */
  251. } fCONFIG_PAGE_MANUFACTURING_3, MPI_POINTER PTR_CONFIG_PAGE_MANUFACTURING_3,
  252.   ManufacturingPage3_t, MPI_POINTER pManufacturingPage3_t;
  253. #define MPI_MANUFACTURING3_PAGEVERSION                  (0x00)
  254. /****************************************************************************/
  255. /*  IO Unit Config Pages                                                    */
  256. /****************************************************************************/
  257. typedef struct _CONFIG_PAGE_IO_UNIT_0
  258. {
  259.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  260.     U64                     UniqueValue;                /* 04h */
  261. } fCONFIG_PAGE_IO_UNIT_0, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_0,
  262.   IOUnitPage0_t, MPI_POINTER pIOUnitPage0_t;
  263. #define MPI_IOUNITPAGE0_PAGEVERSION                     (0x00)
  264. typedef struct _CONFIG_PAGE_IO_UNIT_1
  265. {
  266.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  267.     U32                     Flags;                      /* 04h */
  268. } fCONFIG_PAGE_IO_UNIT_1, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_1,
  269.   IOUnitPage1_t, MPI_POINTER pIOUnitPage1_t;
  270. #define MPI_IOUNITPAGE1_PAGEVERSION                     (0x00)
  271. #define MPI_IOUNITPAGE1_MULTI_FUNCTION                  (0x00000000)
  272. #define MPI_IOUNITPAGE1_SINGLE_FUNCTION                 (0x00000001)
  273. #define MPI_IOUNITPAGE1_MULTI_PATHING                   (0x00000002)
  274. #define MPI_IOUNITPAGE1_SINGLE_PATHING                  (0x00000000)
  275. #define MPI_IOUNITPAGE1_FORCE_32                        (0x00000080)
  276. typedef struct _MPI_ADAPTER_INFO
  277. {
  278.     U8      PciBusNumber;                               /* 00h */
  279.     U8      PciDeviceAndFunctionNumber;                 /* 01h */
  280.     U16     AdapterFlags;                               /* 02h */
  281. } MPI_ADAPTER_INFO, MPI_POINTER PTR_MPI_ADAPTER_INFO,
  282.   MpiAdapterInfo_t, MPI_POINTER pMpiAdapterInfo_t;
  283. #define MPI_ADAPTER_INFO_FLAGS_EMBEDDED                 (0x0001)
  284. #define MPI_ADAPTER_INFO_FLAGS_INIT_STATUS              (0x0002)
  285. typedef struct _CONFIG_PAGE_IO_UNIT_2
  286. {
  287.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  288.     U32                     Flags;                      /* 04h */
  289.     U32                     BiosVersion;                /* 08h */
  290.     MPI_ADAPTER_INFO        AdapterOrder[4];            /* 0Ch */
  291. } fCONFIG_PAGE_IO_UNIT_2, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_2,
  292.   IOUnitPage2_t, MPI_POINTER pIOUnitPage2_t;
  293. #define MPI_IOUNITPAGE2_PAGEVERSION                     (0x00)
  294. #define MPI_IOUNITPAGE2_FLAGS_RAID_DISABLE              (0x00000001)
  295. #define MPI_IOUNITPAGE2_FLAGS_PAUSE_ON_ERROR            (0x00000002)
  296. #define MPI_IOUNITPAGE2_FLAGS_VERBOSE_ENABLE            (0x00000004)
  297. #define MPI_IOUNITPAGE2_FLAGS_COLOR_VIDEO_DISABLE       (0x00000008)
  298. #define MPI_IOUNITPAGE2_FLAGS_DONT_HOOK_INT_40          (0x00000010)
  299. typedef struct _CONFIG_PAGE_IO_UNIT_3
  300. {
  301.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  302.     U32                     VolumeSettings;             /* 04h */
  303.     U8                      InfoOffset0;                /* 08h */
  304.     U8                      InfoSize0;                  /* 09h */
  305.     U8                      InfoOffset1;                /* 0Ah */
  306.     U8                      InfoSize1;                  /* 0Bh */
  307.     U8                      InquirySize;                /* 0Ch */
  308.     U8                      Reserved;                   /* 0Dh */
  309.     U16                     Reserved2;                  /* 0Eh */
  310.     U8                      InquiryData[56];            /* 10h */
  311. } fCONFIG_PAGE_IO_UNIT_3, MPI_POINTER PTR_CONFIG_PAGE_IO_UNIT_3,
  312.   IOUnitPage3_t, MPI_POINTER pIOUnitPage3_t;
  313. #define MPI_IOUNITPAGE3_PAGEVERSION                     (0x00)
  314. /****************************************************************************/
  315. /*  IOC Config Pages                                                        */
  316. /****************************************************************************/
  317. typedef struct _CONFIG_PAGE_IOC_0
  318. {
  319.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  320.     U32                     TotalNVStore;               /* 04h */
  321.     U32                     FreeNVStore;                /* 08h */
  322.     U16                     VendorID;                   /* 0Ch */
  323.     U16                     DeviceID;                   /* 0Eh */
  324.     U8                      RevisionID;                 /* 10h */
  325.     U8                      Reserved[3];                /* 11h */
  326.     U32                     ClassCode;                  /* 14h */
  327.     U16                     SubsystemVendorID;          /* 18h */
  328.     U16                     SubsystemID;                /* 1Ah */
  329. } fCONFIG_PAGE_IOC_0, MPI_POINTER PTR_CONFIG_PAGE_IOC_0,
  330.   IOCPage0_t, MPI_POINTER pIOCPage0_t;
  331. #define MPI_IOCPAGE0_PAGEVERSION                        (0x01)
  332. typedef struct _CONFIG_PAGE_IOC_1
  333. {
  334.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  335.     U32                     Flags;                      /* 04h */
  336.     U32                     CoalescingTimeout;          /* 08h */
  337.     U8                      CoalescingDepth;            /* 0Ch */
  338.     U8                      Reserved[3];                /* 0Dh */
  339. } fCONFIG_PAGE_IOC_1, MPI_POINTER PTR_CONFIG_PAGE_IOC_1,
  340.   IOCPage1_t, MPI_POINTER pIOCPage1_t;
  341. #define MPI_IOCPAGE1_PAGEVERSION                        (0x00)
  342. #define MPI_IOCPAGE1_REPLY_COALESCING                   (0x00000001)
  343. typedef struct _CONFIG_PAGE_IOC_2_RAID_VOL
  344. {
  345.     U8                      VolumeTargetID;             /* 00h */
  346.     U8                      VolumeBus;                  /* 01h */
  347.     U16                     Reserved;                   /* 02h */
  348.     U8                      VolumeVersionMinor;         /* 04h */
  349.     U8                      VolumeVersionMajor;         /* 05h */
  350.     U8                      VolumeRaidType;             /* 06h */
  351.     U8                      Reserved1;                  /* 07h */
  352. } fCONFIG_PAGE_IOC_2_RAID_VOL, MPI_POINTER PTR_CONFIG_PAGE_IOC_2_RAID_VOL,
  353.   ConfigPageIoc2RaidVol_t, MPI_POINTER pConfigPageIoc2RaidVol_t;
  354. typedef struct _CONFIG_PAGE_IOC_2
  355. {
  356.    fCONFIG_PAGE_HEADER          Header;                 /* 00h */
  357.     U32                         CapabilitiesFlags;      /* 04h */
  358.     U8                          NumActiveVolumes;       /* 08h */
  359.     U8                          MaxVolumes;             /* 09h */
  360.     U16                         Reserved;               /* 0Ah */
  361.    fCONFIG_PAGE_IOC_2_RAID_VOL  RaidVolume[1];          /* 0Ch */
  362. } fCONFIG_PAGE_IOC_2, MPI_POINTER PTR_CONFIG_PAGE_IOC_2,
  363.   IOCPage2_t, MPI_POINTER pIOCPage2_t;
  364. #define MPI_IOCPAGE2_PAGEVERSION                        (0x00)
  365. /* IOC Page 2 Capabilities flags */
  366. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_0_SUPPORT           (0x00000001)
  367. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_1_SUPPORT           (0x00000002)
  368. #define MPI_IOCPAGE2_CAP_FLAGS_LSI_MIRROR_SUPPORT       (0x00000004)
  369. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_5_SUPPORT           (0x00000008)
  370. #define MPI_IOCPAGE2_CAP_FLAGS_RAID_10_SUPPORT          (0x00000010)
  371. /* IOC Page 2 Volume RAID Type values */
  372. #define MPI_IOCPAGE2_VOL_TYPE_RAID_0                    (0x00)
  373. #define MPI_IOCPAGE2_VOL_TYPE_RAID_1                    (0x01)
  374. #define MPI_IOCPAGE2_VOL_TYPE_LSI_MIRROR                (0x02)
  375. #define MPI_IOCPAGE2_VOL_TYPE_RAID_5                    (0x05)
  376. #define MPI_IOCPAGE2_VOL_TYPE_RAID_10                   (0x0A)
  377. /****************************************************************************/
  378. /*  SCSI Port Config Pages                                                  */
  379. /****************************************************************************/
  380. typedef struct _CONFIG_PAGE_SCSI_PORT_0
  381. {
  382.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  383.     U32                     Capabilities;               /* 04h */
  384.     U32                     PhysicalInterface;          /* 08h */
  385. } fCONFIG_PAGE_SCSI_PORT_0, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_0,
  386.   SCSIPortPage0_t, MPI_POINTER pSCSIPortPage0_t;
  387. #define MPI_SCSIPORTPAGE0_PAGEVERSION                   (0x01)
  388. #define MPI_SCSIPORTPAGE0_CAP_IU                        (0x00000001)
  389. #define MPI_SCSIPORTPAGE0_CAP_DT                        (0x00000002)
  390. #define MPI_SCSIPORTPAGE0_CAP_QAS                       (0x00000004)
  391. #define MPI_SCSIPORTPAGE0_CAP_PACING_TRANSFERS          (0x00000008)
  392. #define MPI_SCSIPORTPAGE0_CAP_MIN_SYNC_PERIOD_MASK      (0x0000FF00)
  393. #define MPI_SCSIPORTPAGE0_CAP_MAX_SYNC_OFFSET_MASK      (0x00FF0000)
  394. #define MPI_SCSIPORTPAGE0_CAP_WIDE                      (0x20000000)
  395. #define MPI_SCSIPORTPAGE0_CAP_AIP                       (0x80000000)
  396. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_TYPE_MASK          (0x00000003)
  397. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_HVD                (0x01)
  398. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_SE                 (0x02)
  399. #define MPI_SCSIPORTPAGE0_PHY_SIGNAL_LVD                (0x03)
  400. typedef struct _CONFIG_PAGE_SCSI_PORT_1
  401. {
  402.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  403.     U32                     Configuration;              /* 04h */
  404. } fCONFIG_PAGE_SCSI_PORT_1, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_1,
  405.   SCSIPortPage1_t, MPI_POINTER pSCSIPortPage1_t;
  406. #define MPI_SCSIPORTPAGE1_PAGEVERSION                   (0x01)
  407. #define MPI_SCSIPORTPAGE1_CFG_PORT_SCSI_ID_MASK         (0x000000FF)
  408. #define MPI_SCSIPORTPAGE1_CFG_PORT_RESPONSE_ID_MASK     (0xFFFF0000)
  409. typedef struct _MPI_DEVICE_INFO
  410. {
  411.     U8      Timeout;                                    /* 00h */
  412.     U8      SyncFactor;                                 /* 01h */
  413.     U16     DeviceFlags;                                /* 02h */
  414. } MPI_DEVICE_INFO, MPI_POINTER PTR_MPI_DEVICE_INFO,
  415.   MpiDeviceInfo_t, MPI_POINTER pMpiDeviceInfo_t;
  416. typedef struct _CONFIG_PAGE_SCSI_PORT_2
  417. {
  418.    fCONFIG_PAGE_HEADER  Header;                         /* 00h */
  419.     U32                 PortFlags;                      /* 04h */
  420.     U32                 PortSettings;                   /* 08h */
  421.     MPI_DEVICE_INFO     DeviceSettings[16];             /* 0Ch */
  422. } fCONFIG_PAGE_SCSI_PORT_2, MPI_POINTER PTR_CONFIG_PAGE_SCSI_PORT_2,
  423.   SCSIPortPage2_t, MPI_POINTER pSCSIPortPage2_t;
  424. #define MPI_SCSIPORTPAGE2_PAGEVERSION                       (0x01)
  425. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_SCAN_HIGH_TO_LOW       (0x00000001)
  426. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_PARITY_ENABLE          (0x00000002)
  427. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_AVOID_SCSI_RESET       (0x00000004)
  428. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_ALTERNATE_CHS          (0x00000008)
  429. #define MPI_SCSIPORTPAGE2_PORT_FLAGS_TERMINATION_DISABLE    (0x00000010)
  430. #define MPI_SCSIPORTPAGE2_PORT_HOST_ID_MASK                 (0x0000000F)
  431. #define MPI_SCSIPORTPAGE2_PORT_MASK_INIT_HBA                (0x00000030)
  432. #define MPI_SCSIPORTPAGE2_PORT_DISABLE_INIT_HBA             (0x00000000)
  433. #define MPI_SCSIPORTPAGE2_PORT_BIOS_INIT_HBA                (0x00000010)
  434. #define MPI_SCSIPORTPAGE2_PORT_OS_INIT_HBA                  (0x00000020)
  435. #define MPI_SCSIPORTPAGE2_PORT_BIOS_OS_INIT_HBA             (0x00000030)
  436. #define MPI_SCSIPORTPAGE2_PORT_REMOVABLE_MEDIA              (0x000000C0)
  437. #define MPI_SCSIPORTPAGE2_PORT_SPINUP_DELAY_MASK            (0x00000F00)
  438. #define MPI_SCSIPORTPAGE2_PORT_MASK_NEGO_MASTER_SETTINGS    (0x00003000)
  439. #define MPI_SCSIPORTPAGE2_PORT_NEGO_MASTER_SETTINGS         (0x00000000)
  440. #define MPI_SCSIPORTPAGE2_PORT_NONE_MASTER_SETTINGS         (0x00001000)
  441. #define MPI_SCSIPORTPAGE2_PORT_ALL_MASTER_SETTINGS          (0x00003000)
  442. #define MPI_SCSIPORTPAGE2_DEVICE_DISCONNECT_ENABLE          (0x0001)
  443. #define MPI_SCSIPORTPAGE2_DEVICE_ID_SCAN_ENABLE             (0x0002)
  444. #define MPI_SCSIPORTPAGE2_DEVICE_LUN_SCAN_ENABLE            (0x0004)
  445. #define MPI_SCSIPORTPAGE2_DEVICE_TAG_QUEUE_ENABLE           (0x0008)
  446. #define MPI_SCSIPORTPAGE2_DEVICE_WIDE_DISABLE               (0x0010)
  447. #define MPI_SCSIPORTPAGE2_DEVICE_BOOT_CHOICE                (0x0020)
  448. /****************************************************************************/
  449. /*  SCSI Target Device Config Pages                                         */
  450. /****************************************************************************/
  451. typedef struct _CONFIG_PAGE_SCSI_DEVICE_0
  452. {
  453.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  454.     U32                     NegotiatedParameters;       /* 04h */
  455.     U32                     Information;                /* 08h */
  456. } fCONFIG_PAGE_SCSI_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_0,
  457.   SCSIDevicePage0_t, MPI_POINTER pSCSIDevicePage0_t;
  458. #define MPI_SCSIDEVPAGE0_PAGEVERSION                    (0x01)
  459. #define MPI_SCSIDEVPAGE0_NP_IU                          (0x00000001)
  460. #define MPI_SCSIDEVPAGE0_NP_DT                          (0x00000002)
  461. #define MPI_SCSIDEVPAGE0_NP_QAS                         (0x00000004)
  462. #define MPI_SCSIDEVPAGE0_NP_PACING_TRANSFERS            (0x00000008)
  463. #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_PERIOD_MASK        (0x0000FF00)
  464. #define MPI_SCSIDEVPAGE0_NP_NEG_SYNC_OFFSET_MASK        (0x00FF0000)
  465. #define MPI_SCSIDEVPAGE0_NP_WIDE                        (0x20000000)
  466. #define MPI_SCSIDEVPAGE0_NP_AIP                         (0x80000000)
  467. #define MPI_SCSIDEVPAGE0_INFO_PARAMS_NEGOTIATED         (0x00000001)
  468. typedef struct _CONFIG_PAGE_SCSI_DEVICE_1
  469. {
  470.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  471.     U32                     RequestedParameters;        /* 04h */
  472.     U32                     Reserved;                   /* 08h */
  473.     U32                     Configuration;              /* 0Ch */
  474. } fCONFIG_PAGE_SCSI_DEVICE_1, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_1,
  475.   SCSIDevicePage1_t, MPI_POINTER pSCSIDevicePage1_t;
  476. #define MPI_SCSIDEVPAGE1_PAGEVERSION                    (0x02)
  477. #define MPI_SCSIDEVPAGE1_RP_IU                          (0x00000001)
  478. #define MPI_SCSIDEVPAGE1_RP_DT                          (0x00000002)
  479. #define MPI_SCSIDEVPAGE1_RP_QAS                         (0x00000004)
  480. #define MPI_SCSIDEVPAGE1_RP_PACING_TRANSFERS            (0x00000008)
  481. #define MPI_SCSIDEVPAGE1_RP_MIN_SYNC_PERIOD_MASK        (0x0000FF00)
  482. #define MPI_SCSIDEVPAGE1_RP_MAX_SYNC_OFFSET_MASK        (0x00FF0000)
  483. #define MPI_SCSIDEVPAGE1_RP_WIDE                        (0x20000000)
  484. #define MPI_SCSIDEVPAGE1_RP_AIP                         (0x80000000)
  485. #define MPI_SCSIDEVPAGE1_DV_LVD_DRIVE_STRENGTH_MASK     (0x00000003)
  486. #define MPI_SCSIDEVPAGE1_DV_SE_SLEW_RATE_MASK           (0x00000300)
  487. #define MPI_SCSIDEVPAGE1_CONF_PPR_ALLOWED               (0x00000001)
  488. typedef struct _CONFIG_PAGE_SCSI_DEVICE_2
  489. {
  490.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  491.     U32                     DomainValidation;           /* 04h */
  492.     U32                     ParityPipeSelect;           /* 08h */
  493.     U32                     DataPipeSelect;             /* 0Ch */
  494. } fCONFIG_PAGE_SCSI_DEVICE_2, MPI_POINTER PTR_CONFIG_PAGE_SCSI_DEVICE_2,
  495.   SCSIDevicePage2_t, MPI_POINTER pSCSIDevicePage2_t;
  496. #define MPI_SCSIDEVPAGE2_PAGEVERSION                    (0x00)
  497. #define MPI_SCSIDEVPAGE2_DV_ISI_ENABLE                  (0x00000010)
  498. #define MPI_SCSIDEVPAGE2_DV_SECONDARY_DRIVER_ENABLE     (0x00000020)
  499. #define MPI_SCSIDEVPAGE2_DV_SLEW_RATE_CTRL              (0x00000380)
  500. #define MPI_SCSIDEVPAGE2_DV_PRIM_DRIVE_STR_CTRL         (0x00001C00)
  501. #define MPI_SCSIDEVPAGE2_DV_SECOND_DRIVE_STR_CTRL       (0x0000E000)
  502. #define MPI_SCSIDEVPAGE2_DV_XCLKH_ST                    (0x10000000)
  503. #define MPI_SCSIDEVPAGE2_DV_XCLKS_ST                    (0x20000000)
  504. #define MPI_SCSIDEVPAGE2_DV_XCLKH_DT                    (0x40000000)
  505. #define MPI_SCSIDEVPAGE2_DV_XCLKS_DT                    (0x80000000)
  506. #define MPI_SCSIDEVPAGE2_PPS_PPS_MASK                   (0x00000003)
  507. #define MPI_SCSIDEVPAGE2_DPS_BIT_0_PL_SELECT_MASK       (0x00000003)
  508. #define MPI_SCSIDEVPAGE2_DPS_BIT_1_PL_SELECT_MASK       (0x0000000C)
  509. #define MPI_SCSIDEVPAGE2_DPS_BIT_2_PL_SELECT_MASK       (0x00000030)
  510. #define MPI_SCSIDEVPAGE2_DPS_BIT_3_PL_SELECT_MASK       (0x000000C0)
  511. #define MPI_SCSIDEVPAGE2_DPS_BIT_4_PL_SELECT_MASK       (0x00000300)
  512. #define MPI_SCSIDEVPAGE2_DPS_BIT_5_PL_SELECT_MASK       (0x00000C00)
  513. #define MPI_SCSIDEVPAGE2_DPS_BIT_6_PL_SELECT_MASK       (0x00003000)
  514. #define MPI_SCSIDEVPAGE2_DPS_BIT_7_PL_SELECT_MASK       (0x0000C000)
  515. #define MPI_SCSIDEVPAGE2_DPS_BIT_8_PL_SELECT_MASK       (0x00030000)
  516. #define MPI_SCSIDEVPAGE2_DPS_BIT_9_PL_SELECT_MASK       (0x000C0000)
  517. #define MPI_SCSIDEVPAGE2_DPS_BIT_10_PL_SELECT_MASK      (0x00300000)
  518. #define MPI_SCSIDEVPAGE2_DPS_BIT_11_PL_SELECT_MASK      (0x00C00000)
  519. #define MPI_SCSIDEVPAGE2_DPS_BIT_12_PL_SELECT_MASK      (0x03000000)
  520. #define MPI_SCSIDEVPAGE2_DPS_BIT_13_PL_SELECT_MASK      (0x0C000000)
  521. #define MPI_SCSIDEVPAGE2_DPS_BIT_14_PL_SELECT_MASK      (0x30000000)
  522. #define MPI_SCSIDEVPAGE2_DPS_BIT_15_PL_SELECT_MASK      (0xC0000000)
  523. /****************************************************************************/
  524. /*  FC Port Config Pages                                                    */
  525. /****************************************************************************/
  526. typedef struct _CONFIG_PAGE_FC_PORT_0
  527. {
  528.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  529.     U32                     Flags;                      /* 04h */
  530.     U8                      MPIPortNumber;              /* 08h */
  531.     U8                      LinkType;                   /* 09h */
  532.     U8                      PortState;                  /* 0Ah */
  533.     U8                      Reserved;                   /* 0Bh */
  534.     U32                     PortIdentifier;             /* 0Ch */
  535.     U64                     WWNN;                       /* 10h */
  536.     U64                     WWPN;                       /* 18h */
  537.     U32                     SupportedServiceClass;      /* 20h */
  538.     U32                     SupportedSpeeds;            /* 24h */
  539.     U32                     CurrentSpeed;               /* 28h */
  540.     U32                     MaxFrameSize;               /* 2Ch */
  541.     U64                     FabricWWNN;                 /* 30h */
  542.     U64                     FabricWWPN;                 /* 38h */
  543.     U32                     DiscoveredPortsCount;       /* 40h */
  544.     U32                     MaxInitiators;              /* 44h */
  545. } fCONFIG_PAGE_FC_PORT_0, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_0,
  546.   FCPortPage0_t, MPI_POINTER pFCPortPage0_t;
  547. #define MPI_FCPORTPAGE0_PAGEVERSION                     (0x01)
  548. #define MPI_FCPORTPAGE0_FLAGS_PROT_MASK                 (0x0000000F)
  549. #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_INIT             (MPI_PORTFACTS_PROTOCOL_INITIATOR)
  550. #define MPI_FCPORTPAGE0_FLAGS_PROT_FCP_TARG             (MPI_PORTFACTS_PROTOCOL_TARGET)
  551. #define MPI_FCPORTPAGE0_FLAGS_PROT_LAN                  (MPI_PORTFACTS_PROTOCOL_LAN)
  552. #define MPI_FCPORTPAGE0_FLAGS_PROT_LOGBUSADDR           (MPI_PORTFACTS_PROTOCOL_LOGBUSADDR)
  553. #define MPI_FCPORTPAGE0_FLAGS_ALIAS_ALPA_SUPPORTED      (0x00000010)
  554. #define MPI_FCPORTPAGE0_FLAGS_ALIAS_WWN_SUPPORTED       (0x00000020)
  555. #define MPI_FCPORTPAGE0_FLAGS_FABRIC_WWN_VALID          (0x00000030)
  556. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_TYPE_MASK          (0x00000F00)
  557. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_NO_INIT            (0x00000000)
  558. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_POINT_TO_POINT     (0x00000100)
  559. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PRIVATE_LOOP       (0x00000200)
  560. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_FABRIC_DIRECT      (0x00000400)
  561. #define MPI_FCPORTPAGE0_FLAGS_ATTACH_PUBLIC_LOOP        (0x00000800)
  562. #define MPI_FCPORTPAGE0_LTYPE_RESERVED                  (0x00)
  563. #define MPI_FCPORTPAGE0_LTYPE_OTHER                     (0x01)
  564. #define MPI_FCPORTPAGE0_LTYPE_UNKNOWN                   (0x02)
  565. #define MPI_FCPORTPAGE0_LTYPE_COPPER                    (0x03)
  566. #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1300               (0x04)
  567. #define MPI_FCPORTPAGE0_LTYPE_SINGLE_1500               (0x05)
  568. #define MPI_FCPORTPAGE0_LTYPE_50_LASER_MULTI            (0x06)
  569. #define MPI_FCPORTPAGE0_LTYPE_50_LED_MULTI              (0x07)
  570. #define MPI_FCPORTPAGE0_LTYPE_62_LASER_MULTI            (0x08)
  571. #define MPI_FCPORTPAGE0_LTYPE_62_LED_MULTI              (0x09)
  572. #define MPI_FCPORTPAGE0_LTYPE_MULTI_LONG_WAVE           (0x0A)
  573. #define MPI_FCPORTPAGE0_LTYPE_MULTI_SHORT_WAVE          (0x0B)
  574. #define MPI_FCPORTPAGE0_LTYPE_LASER_SHORT_WAVE          (0x0C)
  575. #define MPI_FCPORTPAGE0_LTYPE_LED_SHORT_WAVE            (0x0D)
  576. #define MPI_FCPORTPAGE0_LTYPE_1300_LONG_WAVE            (0x0E)
  577. #define MPI_FCPORTPAGE0_LTYPE_1500_LONG_WAVE            (0x0F)
  578. #define MPI_FCPORTPAGE0_PORTSTATE_UNKNOWN               (0x01)      /*(SNIA)HBA_PORTSTATE_UNKNOWN       1 Unknown */
  579. #define MPI_FCPORTPAGE0_PORTSTATE_ONLINE                (0x02)      /*(SNIA)HBA_PORTSTATE_ONLINE        2 Operational */
  580. #define MPI_FCPORTPAGE0_PORTSTATE_OFFLINE               (0x03)      /*(SNIA)HBA_PORTSTATE_OFFLINE       3 User Offline */
  581. #define MPI_FCPORTPAGE0_PORTSTATE_BYPASSED              (0x04)      /*(SNIA)HBA_PORTSTATE_BYPASSED      4 Bypassed */
  582. #define MPI_FCPORTPAGE0_PORTSTATE_DIAGNOST              (0x05)      /*(SNIA)HBA_PORTSTATE_DIAGNOSTICS   5 In diagnostics mode */
  583. #define MPI_FCPORTPAGE0_PORTSTATE_LINKDOWN              (0x06)      /*(SNIA)HBA_PORTSTATE_LINKDOWN      6 Link Down */
  584. #define MPI_FCPORTPAGE0_PORTSTATE_ERROR                 (0x07)      /*(SNIA)HBA_PORTSTATE_ERROR         7 Port Error */
  585. #define MPI_FCPORTPAGE0_PORTSTATE_LOOPBACK              (0x08)      /*(SNIA)HBA_PORTSTATE_LOOPBACK      8 Loopback */
  586. #define MPI_FCPORTPAGE0_SUPPORT_CLASS_1                 (0x00000001)
  587. #define MPI_FCPORTPAGE0_SUPPORT_CLASS_2                 (0x00000002)
  588. #define MPI_FCPORTPAGE0_SUPPORT_CLASS_3                 (0x00000004)
  589. #define MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED             (0x00000001) /* (SNIA)HBA_PORTSPEED_1GBIT 1  1 GBit/sec  */
  590. #define MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED             (0x00000002) /* (SNIA)HBA_PORTSPEED_2GBIT 2  2 GBit/sec  */
  591. #define MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED            (0x00000004) /* (SNIA)HBA_PORTSPEED_10GBIT 4 10 GBit/sec */
  592. #define MPI_FCPORTPAGE0_CURRENT_SPEED_1GBIT             MPI_FCPORTPAGE0_SUPPORT_1GBIT_SPEED
  593. #define MPI_FCPORTPAGE0_CURRENT_SPEED_2GBIT             MPI_FCPORTPAGE0_SUPPORT_2GBIT_SPEED
  594. #define MPI_FCPORTPAGE0_CURRENT_SPEED_10GBIT            MPI_FCPORTPAGE0_SUPPORT_10GBIT_SPEED
  595. typedef struct _CONFIG_PAGE_FC_PORT_1
  596. {
  597.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  598.     U32                     Flags;                      /* 04h */
  599.     U64                     NoSEEPROMWWNN;              /* 08h */
  600.     U64                     NoSEEPROMWWPN;              /* 10h */
  601.     U8                      HardALPA;                   /* 18h */
  602.     U8                      LinkConfig;                 /* 19h */
  603.     U8                      TopologyConfig;             /* 1Ah */
  604.     U8                      Reserved;                   /* 1Bh */
  605. } fCONFIG_PAGE_FC_PORT_1, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_1,
  606.   FCPortPage1_t, MPI_POINTER pFCPortPage1_t;
  607. #define MPI_FCPORTPAGE1_PAGEVERSION                     (0x01)
  608. #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_DID               (0x00000001)
  609. #define MPI_FCPORTPAGE1_FLAGS_SORT_BY_WWN               (0x00000000)
  610. #define MPI_FCPORTPAGE1_FLAGS_PROT_MASK                 (0xF0000000)
  611. #define MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT                (28)
  612. #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_INIT             ((U32)MPI_PORTFACTS_PROTOCOL_INITIATOR << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  613. #define MPI_FCPORTPAGE1_FLAGS_PROT_FCP_TARG             ((U32)MPI_PORTFACTS_PROTOCOL_TARGET << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  614. #define MPI_FCPORTPAGE1_FLAGS_PROT_LAN                  ((U32)MPI_PORTFACTS_PROTOCOL_LAN << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  615. #define MPI_FCPORTPAGE1_FLAGS_PROT_LOGBUSADDR           ((U32)MPI_PORTFACTS_PROTOCOL_LOGBUSADDR << MPI_FCPORTPAGE1_FLAGS_PROT_SHIFT)
  616. #define MPI_FCPORTPAGE1_HARD_ALPA_NOT_USED              (0xFF)
  617. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_MASK              (0x0F)
  618. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_1GIG              (0x00)
  619. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_2GIG              (0x01)
  620. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_4GIG              (0x02)
  621. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_10GIG             (0x03)
  622. #define MPI_FCPORTPAGE1_LCONFIG_SPEED_AUTO              (0x0F)
  623. #define MPI_FCPORTPAGE1_TOPOLGY_MASK                    (0x0F)
  624. #define MPI_FCPORTPAGE1_TOPOLGY_NLPORT                  (0x01)
  625. #define MPI_FCPORTPAGE1_TOPOLGY_NPORT                   (0x02)
  626. #define MPI_FCPORTPAGE1_TOPOLGY_AUTO                    (0x0F)
  627. typedef struct _CONFIG_PAGE_FC_PORT_2
  628. {
  629.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  630.     U8                      NumberActive;               /* 04h */
  631.     U8                      ALPA[126];                  /* 05h */
  632.     U8                      Reserved;                   /* 83h */
  633. } fCONFIG_PAGE_FC_PORT_2, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_2,
  634.   FCPortPage2_t, MPI_POINTER pFCPortPage2_t;
  635. #define MPI_FCPORTPAGE2_PAGEVERSION                     (0x00)
  636. typedef struct _WWN_FORMAT
  637. {
  638.     U64                     WWNN;                       /* 00h */
  639.     U64                     WWPN;                       /* 08h */
  640. } WWN_FORMAT, MPI_POINTER PTR_WWN_FORMAT,
  641.   WWNFormat, MPI_POINTER pWWNFormat;
  642. typedef union _FC_PORT_PERSISTENT_PHYSICAL_ID
  643. {
  644.     WWN_FORMAT              WWN;
  645.     U32                     Did;
  646. } FC_PORT_PERSISTENT_PHYSICAL_ID, MPI_POINTER PTR_FC_PORT_PERSISTENT_PHYSICAL_ID,
  647.   PersistentPhysicalId_t, MPI_POINTER pPersistentPhysicalId_t;
  648. typedef struct _FC_PORT_PERSISTENT
  649. {
  650.     FC_PORT_PERSISTENT_PHYSICAL_ID  PhysicalIdentifier; /* 00h */
  651.     U8                              TargetID;           /* 10h */
  652.     U8                              Bus;                /* 11h */
  653.     U16                             Flags;              /* 12h */
  654. } FC_PORT_PERSISTENT, MPI_POINTER PTR_FC_PORT_PERSISTENT,
  655.   PersistentData_t, MPI_POINTER pPersistentData_t;
  656. #define MPI_PERSISTENT_FLAGS_SHIFT                      (16)
  657. #define MPI_PERSISTENT_FLAGS_ENTRY_VALID                (0x0001)
  658. #define MPI_PERSISTENT_FLAGS_SCAN_ID                    (0x0002)
  659. #define MPI_PERSISTENT_FLAGS_SCAN_LUNS                  (0x0004)
  660. #define MPI_PERSISTENT_FLAGS_BOOT_DEVICE                (0x0008)
  661. #define MPI_PERSISTENT_FLAGS_BY_DID                     (0x0080)
  662. typedef struct _CONFIG_PAGE_FC_PORT_3
  663. {
  664.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  665.     FC_PORT_PERSISTENT      Entry[1];                   /* 04h */
  666. } fCONFIG_PAGE_FC_PORT_3, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_3,
  667.   FCPortPage3_t, MPI_POINTER pFCPortPage3_t;
  668. #define MPI_FCPORTPAGE3_PAGEVERSION                     (0x01)
  669. typedef struct _CONFIG_PAGE_FC_PORT_4
  670. {
  671.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  672.     U32                     PortFlags;                  /* 04h */
  673.     U32                     PortSettings;               /* 08h */
  674. } fCONFIG_PAGE_FC_PORT_4, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_4,
  675.   FCPortPage4_t, MPI_POINTER pFCPortPage4_t;
  676. #define MPI_FCPORTPAGE4_PAGEVERSION                     (0x00)
  677. #define MPI_FCPORTPAGE4_PORT_FLAGS_ALTERNATE_CHS        (0x00000008)
  678. #define MPI_FCPORTPAGE4_PORT_MASK_INIT_HBA              (0x00000030)
  679. #define MPI_FCPORTPAGE4_PORT_DISABLE_INIT_HBA           (0x00000000)
  680. #define MPI_FCPORTPAGE4_PORT_BIOS_INIT_HBA              (0x00000010)
  681. #define MPI_FCPORTPAGE4_PORT_OS_INIT_HBA                (0x00000020)
  682. #define MPI_FCPORTPAGE4_PORT_BIOS_OS_INIT_HBA           (0x00000030)
  683. #define MPI_FCPORTPAGE4_PORT_REMOVABLE_MEDIA            (0x000000C0)
  684. #define MPI_FCPORTPAGE4_PORT_SPINUP_DELAY_MASK          (0x00000F00)
  685. typedef struct _CONFIG_PAGE_FC_PORT_5_ALIAS_INFO
  686. {
  687.     U8      Flags;                                      /* 00h */
  688.     U8      AliasAlpa;                                  /* 01h */
  689.     U16     Reserved;                                   /* 02h */
  690.     U64     AliasWWNN;                                  /* 04h */
  691.     U64     AliasWWPN;                                  /* 0Ch */
  692. } fCONFIG_PAGE_FC_PORT_5_ALIAS_INFO, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_5_ALIAS_INFO,
  693.   FcPortPage5AliasInfo_t, MPI_POINTER pFcPortPage5AliasInfo_t;
  694. typedef struct _CONFIG_PAGE_FC_PORT_5
  695. {
  696.    fCONFIG_PAGE_HEADER                  Header;         /* 00h */
  697.    fCONFIG_PAGE_FC_PORT_5_ALIAS_INFO    AliasInfo[1];   /* 04h */
  698. } fCONFIG_PAGE_FC_PORT_5, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_5,
  699.   FCPortPage5_t, MPI_POINTER pFCPortPage5_t;
  700. #define MPI_FCPORTPAGE5_PAGEVERSION                     (0x00)
  701. #define MPI_FCPORTPAGE5_FLAGS_ALIAS_ALPA_VALID          (0x01)
  702. #define MPI_FCPORTPAGE5_FLAGS_ALIAS_WWN_VALID           (0x02)
  703. typedef struct _CONFIG_PAGE_FC_PORT_6
  704. {
  705.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  706.     U32                     Reserved;                   /* 04h */
  707.     U64                     TimeSinceReset;             /* 08h */
  708.     U64                     TxFrames;                   /* 10h */
  709.     U64                     RxFrames;                   /* 18h */
  710.     U64                     TxWords;                    /* 20h */
  711.     U64                     RxWords;                    /* 28h */
  712.     U64                     LipCount;                   /* 30h */
  713.     U64                     NosCount;                   /* 38h */
  714.     U64                     ErrorFrames;                /* 40h */
  715.     U64                     DumpedFrames;               /* 48h */
  716.     U64                     LinkFailureCount;           /* 50h */
  717.     U64                     LossOfSyncCount;            /* 58h */
  718.     U64                     LossOfSignalCount;          /* 60h */
  719.     U64                     PrimativeSeqErrCount;       /* 68h */
  720.     U64                     InvalidTxWordCount;         /* 70h */
  721.     U64                     InvalidCrcCount;            /* 78h */
  722.     U64                     FcpInitiatorIoCount;        /* 80h */
  723. } fCONFIG_PAGE_FC_PORT_6, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_6,
  724.   FCPortPage6_t, MPI_POINTER pFCPortPage6_t;
  725. #define MPI_FCPORTPAGE6_PAGEVERSION                     (0x00)
  726. typedef struct _CONFIG_PAGE_FC_PORT_7
  727. {
  728.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  729.     U32                     Reserved;                   /* 04h */
  730.     U8                      PortSymbolicName[256];      /* 08h */
  731. } fCONFIG_PAGE_FC_PORT_7, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_7,
  732.   FCPortPage7_t, MPI_POINTER pFCPortPage7_t;
  733. #define MPI_FCPORTPAGE7_PAGEVERSION                     (0x00)
  734. typedef struct _CONFIG_PAGE_FC_PORT_8
  735. {
  736.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  737.     U32                     BitVector[8];               /* 04h */
  738. } fCONFIG_PAGE_FC_PORT_8, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_8,
  739.   FCPortPage8_t, MPI_POINTER pFCPortPage8_t;
  740. #define MPI_FCPORTPAGE8_PAGEVERSION                     (0x00)
  741. typedef struct _CONFIG_PAGE_FC_PORT_9
  742. {
  743.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  744.     U32                     Reserved;                   /* 04h */
  745.     U64                     GlobalWWPN;                 /* 08h */
  746.     U64                     GlobalWWNN;                 /* 10h */
  747.     U32                     UnitType;                   /* 18h */
  748.     U32                     PhysicalPortNumber;         /* 1Ch */
  749.     U32                     NumAttachedNodes;           /* 20h */
  750.     U16                     IPVersion;                  /* 24h */
  751.     U16                     UDPPortNumber;              /* 26h */
  752.     U8                      IPAddress[16];              /* 28h */
  753.     U16                     Reserved1;                  /* 38h */
  754.     U16                     TopologyDiscoveryFlags;     /* 3Ah */
  755. } fCONFIG_PAGE_FC_PORT_9, MPI_POINTER PTR_CONFIG_PAGE_FC_PORT_9,
  756.   FCPortPage9_t, MPI_POINTER pFCPortPage9_t;
  757. #define MPI_FCPORTPAGE9_PAGEVERSION                     (0x00)
  758. /****************************************************************************/
  759. /*  FC Device Config Pages                                                  */
  760. /****************************************************************************/
  761. typedef struct _CONFIG_PAGE_FC_DEVICE_0
  762. {
  763.    fCONFIG_PAGE_HEADER      Header;                     /* 00h */
  764.     U64                     WWNN;                       /* 04h */
  765.     U64                     WWPN;                       /* 0Ch */
  766.     U32                     PortIdentifier;             /* 14h */
  767.     U8                      Protocol;                   /* 18h */
  768.     U8                      Flags;                      /* 19h */
  769.     U16                     BBCredit;                   /* 1Ah */
  770.     U16                     MaxRxFrameSize;             /* 1Ch */
  771.     U8                      Reserved1;                  /* 1Eh */
  772.     U8                      PortNumber;                 /* 1Fh */
  773.     U8                      FcPhLowestVersion;          /* 20h */
  774.     U8                      FcPhHighestVersion;         /* 21h */
  775.     U8                      CurrentTargetID;            /* 22h */
  776.     U8                      CurrentBus;                 /* 23h */
  777. } fCONFIG_PAGE_FC_DEVICE_0, MPI_POINTER PTR_CONFIG_PAGE_FC_DEVICE_0,
  778.   FCDevicePage0_t, MPI_POINTER pFCDevicePage0_t;
  779. #define MPI_FC_DEVICE_PAGE0_PAGEVERSION                 (0x02)
  780. #define MPI_FC_DEVICE_PAGE0_FLAGS_TARGETID_BUS_VALID    (0x01)
  781. #define MPI_FC_DEVICE_PAGE0_PROT_IP                     (0x01)
  782. #define MPI_FC_DEVICE_PAGE0_PROT_FCP_TARGET             (0x02)
  783. #define MPI_FC_DEVICE_PAGE0_PROT_FCP_INITIATOR          (0x04)
  784. #define MPI_FC_DEVICE_PAGE0_PGAD_PORT_MASK              (MPI_FC_DEVICE_PGAD_PORT_MASK)
  785. #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_MASK              (MPI_FC_DEVICE_PGAD_FORM_MASK)
  786. #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_NEXT_DID          (MPI_FC_DEVICE_PGAD_FORM_NEXT_DID)
  787. #define MPI_FC_DEVICE_PAGE0_PGAD_FORM_BUS_TID           (MPI_FC_DEVICE_PGAD_FORM_BUS_TID)
  788. #define MPI_FC_DEVICE_PAGE0_PGAD_DID_MASK               (MPI_FC_DEVICE_PGAD_ND_DID_MASK)
  789. #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_MASK               (MPI_FC_DEVICE_PGAD_BT_BUS_MASK)
  790. #define MPI_FC_DEVICE_PAGE0_PGAD_BUS_SHIFT              (MPI_FC_DEVICE_PGAD_BT_BUS_SHIFT)
  791. #define MPI_FC_DEVICE_PAGE0_PGAD_TID_MASK               (MPI_FC_DEVICE_PGAD_BT_TID_MASK)
  792. /****************************************************************************/
  793. /*  RAID Volume Config Pages                                                  */
  794. /****************************************************************************/
  795. typedef struct _RAIDVOL2_IM_PHYS_ID
  796. {
  797.     U8                      TargetID;                   /* 00h */
  798.     U8                      Bus;                        /* 01h */
  799.     U8                      IocNumber;                  /* 02h */
  800.     U8                      PhysDiskNumber;             /* 03h */
  801.     U8                      Reserved[8];                /* 04h */
  802.     U8                      PhysicalDiskIdentifier[16]; /* 0Ch */
  803.     U8                      VendorId[8];                /* 1Ch */
  804.     U8                      ProductId[16];              /* 24h */
  805.     U8                      ProductRevLevel[4];         /* 34h */
  806.     U32                     Reserved1;                  /* 38h */
  807.     U8                      Info[32];                   /* 3Ch */
  808. } RAIDVOL2_IM_PHYS_ID, MPI_POINTER PTR_RAIDVOL2_IM_PHYS_ID,
  809.   RaidVol2ImPhysicalID_t, MPI_POINTER pRaidVol2ImPhysicalID_t;
  810. typedef struct _RAIDVOL2_IM_DISK_INFO
  811. {
  812.     U32                     DiskStatus;                 /* 00h */
  813.     U32                     DeviceSettings;             /* 04h */
  814.     U16                     ErrorCount;                 /* 08h */
  815.     U16                     Reserved;                   /* 0Ah */
  816.     U8                      ErrorCdbByte;               /* 0Ch */
  817.     U8                      ErrorSenseKey;              /* 0Dh */
  818.     U8                      ErrorASC;                   /* 0Eh */
  819.     U8                      ErrorASCQ;                  /* 0Fh */
  820.     U16                     SmartCount;                 /* 10h */
  821.     U8                      SmartASC;                   /* 12h */
  822.     U8                      SmartASCQ;                  /* 13h */
  823. } RAIDVOL2_IM_DISK_INFO, MPI_POINTER PTR_RAIDVOL2_IM_DISK_INFO,
  824.   RaidVol2ImDiskInfo_t, MPI_POINTER pRaidVol2ImDiskInfo_t;
  825. /* RAID Volume 2 IM Physical Disk DiskStatus flags */
  826. #define MPI_RVP2_PHYS_DISK_PRIMARY                      (0x00000001)
  827. #define MPI_RVP2_PHYS_DISK_SECONDARY                    (0x00000002)
  828. #define MPI_RVP2_PHYS_DISK_HOT_SPARE                    (0x00000004)
  829. #define MPI_RVP2_PHYS_DISK_OUT_OF_SYNC                  (0x00000008)
  830. #define MPI_RVP2_PHYS_DISK_STATUS_MASK                  (0x00000F00)
  831. #define MPI_RVP2_PHYS_DISK_STATUS_ONLINE                (0x00000000)
  832. #define MPI_RVP2_PHYS_DISK_STATUS_MISSING               (0x00000100)
  833. #define MPI_RVP2_PHYS_DISK_STATUS_NOT_COMPATIBLE        (0x00000200)
  834. #define MPI_RVP2_PHYS_DISK_STATUS_FAILED                (0x00000300)
  835. #define MPI_RVP2_PHYS_DISK_STATUS_INITIALIZING          (0x00000400)
  836. #define MPI_RVP2_PHYS_DISK_STATUS_OFFLINE_REQUESTED     (0x00000500)
  837. #define MPI_RVP2_PHYS_DISK_STATUS_OTHER_OFFLINE         (0x00000F00)
  838. typedef struct _RAIDVOL2_IM_PHYSICAL_DISK
  839. {
  840.     RAIDVOL2_IM_PHYS_ID     Id;                         /* 00h */
  841.     RAIDVOL2_IM_DISK_INFO   Info;                       /* 5Ch */
  842. } RAIDVOL2_IM_PHYSICAL_DISK, MPI_POINTER PTR_RAIDVOL2_IM_PHYSICAL_DISK,
  843.   RaidVol2ImPhysicalDisk_t, MPI_POINTER pRaidVol2ImPhysicalDisk_t;
  844. #define MPI_RAIDVOLPAGE2_MAX_DISKS                      (3)
  845. typedef struct _CONFIG_PAGE_RAID_VOL_2
  846. {
  847.    fCONFIG_PAGE_HEADER          Header;                 /* 00h */
  848.     U32                         VolumeStatus;           /* 04h */
  849.     U32                         VolumeSettings;         /* 08h */
  850.     U32                         Reserved;               /* 0Ch */
  851.     U64                         MaxLba;                 /* 10h */
  852.     U32                         BlockSize;              /* 18h */
  853.     U8                          Reserved1;              /* 1Ch */
  854.     U8                          NumPhysicalDisks;       /* 1Dh */
  855.     U16                         Reserved2;              /* 1Eh */
  856.     RAIDVOL2_IM_PHYSICAL_DISK   IMPhysicalDisk[MPI_RAIDVOLPAGE2_MAX_DISKS];
  857. } fCONFIG_PAGE_RAID_VOL_2, MPI_POINTER PTR_CONFIG_PAGE_RAID_VOL_2,
  858.   RaidVolumePage2_t, MPI_POINTER pRaidVolumePage2_t;
  859. #define MPI_RAIDVOLPAGE2_PAGEVERSION                    (0x00)
  860. /* RAID Volume Page 2 VolumeStatus defines */
  861. #define MPI_RAIDVOLPAGE2_STATUS_ENABLED                 (0x00000001)
  862. #define MPI_RAIDVOLPAGE2_STATUS_QUIESCED                (0x00000002)
  863. #define MPI_RAIDVOLPAGE2_STATUS_RESYNC_IN_PROGRESS      (0x00000004)
  864. #define MPI_RAIDVOLPAGE2_STATUS_DEGRADED                (0x00000008)
  865. /* RAID Volume Page 2 VolumeSettings defines */
  866. #define MPI_RAIDVOLPAGE2_SETTING_WRITE_CACHING_ENABLE   (0x00000001)
  867. #define MPI_RAIDVOLPAGE2_SETTING_OFFLINE_ON_SMART       (0x00000002)
  868. #define MPI_RAIDVOLPAGE2_SETTING_AUTO_CONFIGURE         (0x00000004)
  869. #define MPI_RAIDVOLPAGE2_SETTING_USE_DEFAULTS           (0x80000000)
  870. /****************************************************************************/
  871. /* LAN Config Pages                                                         */
  872. /****************************************************************************/
  873. typedef struct _CONFIG_PAGE_LAN_0
  874. {
  875.     ConfigPageHeader_t      Header;                     /* 00h */
  876.     U16                     TxRxModes;                  /* 04h */
  877.     U16                     Reserved;                   /* 06h */
  878.     U32                     PacketPrePad;               /* 08h */
  879. } fCONFIG_PAGE_LAN_0, MPI_POINTER PTR_CONFIG_PAGE_LAN_0,
  880.   LANPage0_t, MPI_POINTER pLANPage0_t;
  881. #define MPI_LAN_PAGE0_PAGEVERSION                       (0x01)
  882. #define MPI_LAN_PAGE0_RETURN_LOOPBACK                   (0x0000)
  883. #define MPI_LAN_PAGE0_SUPPRESS_LOOPBACK                 (0x0001)
  884. #define MPI_LAN_PAGE0_LOOPBACK_MASK                     (0x0001)
  885. typedef struct _CONFIG_PAGE_LAN_1
  886. {
  887.     ConfigPageHeader_t      Header;                     /* 00h */
  888.     U16                     Reserved;                   /* 04h */
  889.     U8                      CurrentDeviceState;         /* 06h */
  890.     U8                      Reserved1;                  /* 07h */
  891.     U32                     MinPacketSize;              /* 08h */
  892.     U32                     MaxPacketSize;              /* 0Ch */
  893.     U32                     HardwareAddressLow;         /* 10h */
  894.     U32                     HardwareAddressHigh;        /* 14h */
  895.     U32                     MaxWireSpeedLow;            /* 18h */
  896.     U32                     MaxWireSpeedHigh;           /* 1Ch */
  897.     U32                     BucketsRemaining;           /* 20h */
  898.     U32                     MaxReplySize;               /* 24h */
  899.     U32                     NegWireSpeedHigh;           /* 28h */
  900.     U32                     NegWireSpeedLow;            /* 2Ch */
  901. } fCONFIG_PAGE_LAN_1, MPI_POINTER PTR_CONFIG_PAGE_LAN_1,
  902.   LANPage1_t, MPI_POINTER pLANPage1_t;
  903. #define MPI_LAN_PAGE1_PAGEVERSION                       (0x03)
  904. #define MPI_LAN_PAGE1_DEV_STATE_RESET                   (0x00)
  905. #define MPI_LAN_PAGE1_DEV_STATE_OPERATIONAL             (0x01)
  906. #endif