mpi2_ioc.h 76 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530
  1. /*
  2. * Copyright (c) 2000-2010 LSI Corporation.
  3. *
  4. *
  5. * Name: mpi2_ioc.h
  6. * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
  7. * Creation Date: October 11, 2006
  8. *
  9. * mpi2_ioc.h Version: 02.00.15
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
  17. * 06-04-07 02.00.01 In IOCFacts Reply structure, renamed MaxDevices to
  18. * MaxTargets.
  19. * Added TotalImageSize field to FWDownload Request.
  20. * Added reserved words to FWUpload Request.
  21. * 06-26-07 02.00.02 Added IR Configuration Change List Event.
  22. * 08-31-07 02.00.03 Removed SystemReplyQueueDepth field from the IOCInit
  23. * request and replaced it with
  24. * ReplyDescriptorPostQueueDepth and ReplyFreeQueueDepth.
  25. * Replaced the MinReplyQueueDepth field of the IOCFacts
  26. * reply with MaxReplyDescriptorPostQueueDepth.
  27. * Added MPI2_RDPQ_DEPTH_MIN define to specify the minimum
  28. * depth for the Reply Descriptor Post Queue.
  29. * Added SASAddress field to Initiator Device Table
  30. * Overflow Event data.
  31. * 10-31-07 02.00.04 Added ReasonCode MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING
  32. * for SAS Initiator Device Status Change Event data.
  33. * Modified Reason Code defines for SAS Topology Change
  34. * List Event data, including adding a bit for PHY Vacant
  35. * status, and adding a mask for the Reason Code.
  36. * Added define for
  37. * MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING.
  38. * Added define for MPI2_EXT_IMAGE_TYPE_MEGARAID.
  39. * 12-18-07 02.00.05 Added Boot Status defines for the IOCExceptions field of
  40. * the IOCFacts Reply.
  41. * Removed MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  42. * Moved MPI2_VERSION_UNION to mpi2.h.
  43. * Changed MPI2_EVENT_NOTIFICATION_REQUEST to use masks
  44. * instead of enables, and added SASBroadcastPrimitiveMasks
  45. * field.
  46. * Added Log Entry Added Event and related structure.
  47. * 02-29-08 02.00.06 Added define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID.
  48. * Removed define MPI2_IOCFACTS_PROTOCOL_SMP_TARGET.
  49. * Added MaxVolumes and MaxPersistentEntries fields to
  50. * IOCFacts reply.
  51. * Added ProtocalFlags and IOCCapabilities fields to
  52. * MPI2_FW_IMAGE_HEADER.
  53. * Removed MPI2_PORTENABLE_FLAGS_ENABLE_SINGLE_PORT.
  54. * 03-03-08 02.00.07 Fixed MPI2_FW_IMAGE_HEADER by changing Reserved26 to
  55. * a U16 (from a U32).
  56. * Removed extra 's' from EventMasks name.
  57. * 06-27-08 02.00.08 Fixed an offset in a comment.
  58. * 10-02-08 02.00.09 Removed SystemReplyFrameSize from MPI2_IOC_INIT_REQUEST.
  59. * Removed CurReplyFrameSize from MPI2_IOC_FACTS_REPLY and
  60. * renamed MinReplyFrameSize to ReplyFrameSize.
  61. * Added MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX.
  62. * Added two new RAIDOperation values for Integrated RAID
  63. * Operations Status Event data.
  64. * Added four new IR Configuration Change List Event data
  65. * ReasonCode values.
  66. * Added two new ReasonCode defines for SAS Device Status
  67. * Change Event data.
  68. * Added three new DiscoveryStatus bits for the SAS
  69. * Discovery event data.
  70. * Added Multiplexing Status Change bit to the PhyStatus
  71. * field of the SAS Topology Change List event data.
  72. * Removed define for MPI2_INIT_IMAGE_BOOTFLAGS_XMEMCOPY.
  73. * BootFlags are now product-specific.
  74. * Added defines for the indivdual signature bytes
  75. * for MPI2_INIT_IMAGE_FOOTER.
  76. * 01-19-09 02.00.10 Added MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY define.
  77. * Added MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR
  78. * define.
  79. * Added MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE
  80. * define.
  81. * Removed MPI2_EVENT_SAS_DISC_DS_SATA_INIT_FAILURE define.
  82. * 05-06-09 02.00.11 Added MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR define.
  83. * Added MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX define.
  84. * Added two new reason codes for SAS Device Status Change
  85. * Event.
  86. * Added new event: SAS PHY Counter.
  87. * 07-30-09 02.00.12 Added GPIO Interrupt event define and structure.
  88. * Added MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  89. * Added new product id family for 2208.
  90. * 10-28-09 02.00.13 Added HostMSIxVectors field to MPI2_IOC_INIT_REQUEST.
  91. * Added MaxMSIxVectors field to MPI2_IOC_FACTS_REPLY.
  92. * Added MinDevHandle field to MPI2_IOC_FACTS_REPLY.
  93. * Added MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY.
  94. * Added MPI2_EVENT_HOST_BASED_DISCOVERY_PHY define.
  95. * Added MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER define.
  96. * Added Host Based Discovery Phy Event data.
  97. * Added defines for ProductID Product field
  98. * (MPI2_FW_HEADER_PID_).
  99. * Modified values for SAS ProductID Family
  100. * (MPI2_FW_HEADER_PID_FAMILY_).
  101. * 02-10-10 02.00.14 Added SAS Quiesce Event structure and defines.
  102. * Added PowerManagementControl Request structures and
  103. * defines.
  104. * 05-12-10 02.00.15 Marked Task Set Full Event as obsolete.
  105. * Added MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY define.
  106. * --------------------------------------------------------------------------
  107. */
  108. #ifndef MPI2_IOC_H
  109. #define MPI2_IOC_H
  110. /*****************************************************************************
  111. *
  112. * IOC Messages
  113. *
  114. *****************************************************************************/
  115. /****************************************************************************
  116. * IOCInit message
  117. ****************************************************************************/
  118. /* IOCInit Request message */
  119. typedef struct _MPI2_IOC_INIT_REQUEST
  120. {
  121. U8 WhoInit; /* 0x00 */
  122. U8 Reserved1; /* 0x01 */
  123. U8 ChainOffset; /* 0x02 */
  124. U8 Function; /* 0x03 */
  125. U16 Reserved2; /* 0x04 */
  126. U8 Reserved3; /* 0x06 */
  127. U8 MsgFlags; /* 0x07 */
  128. U8 VP_ID; /* 0x08 */
  129. U8 VF_ID; /* 0x09 */
  130. U16 Reserved4; /* 0x0A */
  131. U16 MsgVersion; /* 0x0C */
  132. U16 HeaderVersion; /* 0x0E */
  133. U32 Reserved5; /* 0x10 */
  134. U16 Reserved6; /* 0x14 */
  135. U8 Reserved7; /* 0x16 */
  136. U8 HostMSIxVectors; /* 0x17 */
  137. U16 Reserved8; /* 0x18 */
  138. U16 SystemRequestFrameSize; /* 0x1A */
  139. U16 ReplyDescriptorPostQueueDepth; /* 0x1C */
  140. U16 ReplyFreeQueueDepth; /* 0x1E */
  141. U32 SenseBufferAddressHigh; /* 0x20 */
  142. U32 SystemReplyAddressHigh; /* 0x24 */
  143. U64 SystemRequestFrameBaseAddress; /* 0x28 */
  144. U64 ReplyDescriptorPostQueueAddress;/* 0x30 */
  145. U64 ReplyFreeQueueAddress; /* 0x38 */
  146. U64 TimeStamp; /* 0x40 */
  147. } MPI2_IOC_INIT_REQUEST, MPI2_POINTER PTR_MPI2_IOC_INIT_REQUEST,
  148. Mpi2IOCInitRequest_t, MPI2_POINTER pMpi2IOCInitRequest_t;
  149. /* WhoInit values */
  150. #define MPI2_WHOINIT_NOT_INITIALIZED (0x00)
  151. #define MPI2_WHOINIT_SYSTEM_BIOS (0x01)
  152. #define MPI2_WHOINIT_ROM_BIOS (0x02)
  153. #define MPI2_WHOINIT_PCI_PEER (0x03)
  154. #define MPI2_WHOINIT_HOST_DRIVER (0x04)
  155. #define MPI2_WHOINIT_MANUFACTURER (0x05)
  156. /* MsgVersion */
  157. #define MPI2_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00)
  158. #define MPI2_IOCINIT_MSGVERSION_MAJOR_SHIFT (8)
  159. #define MPI2_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF)
  160. #define MPI2_IOCINIT_MSGVERSION_MINOR_SHIFT (0)
  161. /* HeaderVersion */
  162. #define MPI2_IOCINIT_HDRVERSION_UNIT_MASK (0xFF00)
  163. #define MPI2_IOCINIT_HDRVERSION_UNIT_SHIFT (8)
  164. #define MPI2_IOCINIT_HDRVERSION_DEV_MASK (0x00FF)
  165. #define MPI2_IOCINIT_HDRVERSION_DEV_SHIFT (0)
  166. /* minimum depth for the Reply Descriptor Post Queue */
  167. #define MPI2_RDPQ_DEPTH_MIN (16)
  168. /* IOCInit Reply message */
  169. typedef struct _MPI2_IOC_INIT_REPLY
  170. {
  171. U8 WhoInit; /* 0x00 */
  172. U8 Reserved1; /* 0x01 */
  173. U8 MsgLength; /* 0x02 */
  174. U8 Function; /* 0x03 */
  175. U16 Reserved2; /* 0x04 */
  176. U8 Reserved3; /* 0x06 */
  177. U8 MsgFlags; /* 0x07 */
  178. U8 VP_ID; /* 0x08 */
  179. U8 VF_ID; /* 0x09 */
  180. U16 Reserved4; /* 0x0A */
  181. U16 Reserved5; /* 0x0C */
  182. U16 IOCStatus; /* 0x0E */
  183. U32 IOCLogInfo; /* 0x10 */
  184. } MPI2_IOC_INIT_REPLY, MPI2_POINTER PTR_MPI2_IOC_INIT_REPLY,
  185. Mpi2IOCInitReply_t, MPI2_POINTER pMpi2IOCInitReply_t;
  186. /****************************************************************************
  187. * IOCFacts message
  188. ****************************************************************************/
  189. /* IOCFacts Request message */
  190. typedef struct _MPI2_IOC_FACTS_REQUEST
  191. {
  192. U16 Reserved1; /* 0x00 */
  193. U8 ChainOffset; /* 0x02 */
  194. U8 Function; /* 0x03 */
  195. U16 Reserved2; /* 0x04 */
  196. U8 Reserved3; /* 0x06 */
  197. U8 MsgFlags; /* 0x07 */
  198. U8 VP_ID; /* 0x08 */
  199. U8 VF_ID; /* 0x09 */
  200. U16 Reserved4; /* 0x0A */
  201. } MPI2_IOC_FACTS_REQUEST, MPI2_POINTER PTR_MPI2_IOC_FACTS_REQUEST,
  202. Mpi2IOCFactsRequest_t, MPI2_POINTER pMpi2IOCFactsRequest_t;
  203. /* IOCFacts Reply message */
  204. typedef struct _MPI2_IOC_FACTS_REPLY
  205. {
  206. U16 MsgVersion; /* 0x00 */
  207. U8 MsgLength; /* 0x02 */
  208. U8 Function; /* 0x03 */
  209. U16 HeaderVersion; /* 0x04 */
  210. U8 IOCNumber; /* 0x06 */
  211. U8 MsgFlags; /* 0x07 */
  212. U8 VP_ID; /* 0x08 */
  213. U8 VF_ID; /* 0x09 */
  214. U16 Reserved1; /* 0x0A */
  215. U16 IOCExceptions; /* 0x0C */
  216. U16 IOCStatus; /* 0x0E */
  217. U32 IOCLogInfo; /* 0x10 */
  218. U8 MaxChainDepth; /* 0x14 */
  219. U8 WhoInit; /* 0x15 */
  220. U8 NumberOfPorts; /* 0x16 */
  221. U8 MaxMSIxVectors; /* 0x17 */
  222. U16 RequestCredit; /* 0x18 */
  223. U16 ProductID; /* 0x1A */
  224. U32 IOCCapabilities; /* 0x1C */
  225. MPI2_VERSION_UNION FWVersion; /* 0x20 */
  226. U16 IOCRequestFrameSize; /* 0x24 */
  227. U16 Reserved3; /* 0x26 */
  228. U16 MaxInitiators; /* 0x28 */
  229. U16 MaxTargets; /* 0x2A */
  230. U16 MaxSasExpanders; /* 0x2C */
  231. U16 MaxEnclosures; /* 0x2E */
  232. U16 ProtocolFlags; /* 0x30 */
  233. U16 HighPriorityCredit; /* 0x32 */
  234. U16 MaxReplyDescriptorPostQueueDepth; /* 0x34 */
  235. U8 ReplyFrameSize; /* 0x36 */
  236. U8 MaxVolumes; /* 0x37 */
  237. U16 MaxDevHandle; /* 0x38 */
  238. U16 MaxPersistentEntries; /* 0x3A */
  239. U16 MinDevHandle; /* 0x3C */
  240. U16 Reserved4; /* 0x3E */
  241. } MPI2_IOC_FACTS_REPLY, MPI2_POINTER PTR_MPI2_IOC_FACTS_REPLY,
  242. Mpi2IOCFactsReply_t, MPI2_POINTER pMpi2IOCFactsReply_t;
  243. /* MsgVersion */
  244. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
  245. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8)
  246. #define MPI2_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
  247. #define MPI2_IOCFACTS_MSGVERSION_MINOR_SHIFT (0)
  248. /* HeaderVersion */
  249. #define MPI2_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00)
  250. #define MPI2_IOCFACTS_HDRVERSION_UNIT_SHIFT (8)
  251. #define MPI2_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF)
  252. #define MPI2_IOCFACTS_HDRVERSION_DEV_SHIFT (0)
  253. /* IOCExceptions */
  254. #define MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX (0x0100)
  255. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_MASK (0x00E0)
  256. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_GOOD (0x0000)
  257. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_BACKUP (0x0020)
  258. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_RESTORED (0x0040)
  259. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_CORRUPT_BACKUP (0x0060)
  260. #define MPI2_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED (0x0010)
  261. #define MPI2_IOCFACTS_EXCEPT_MANUFACT_CHECKSUM_FAIL (0x0008)
  262. #define MPI2_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
  263. #define MPI2_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
  264. #define MPI2_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
  265. /* defines for WhoInit field are after the IOCInit Request */
  266. /* ProductID field uses MPI2_FW_HEADER_PID_ */
  267. /* IOCCapabilities */
  268. #define MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY (0x00010000)
  269. #define MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX (0x00008000)
  270. #define MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR (0x00004000)
  271. #define MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY (0x00002000)
  272. #define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID (0x00001000)
  273. #define MPI2_IOCFACTS_CAPABILITY_TLR (0x00000800)
  274. #define MPI2_IOCFACTS_CAPABILITY_MULTICAST (0x00000100)
  275. #define MPI2_IOCFACTS_CAPABILITY_BIDIRECTIONAL_TARGET (0x00000080)
  276. #define MPI2_IOCFACTS_CAPABILITY_EEDP (0x00000040)
  277. #define MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
  278. #define MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
  279. #define MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
  280. #define MPI2_IOCFACTS_CAPABILITY_TASK_SET_FULL_HANDLING (0x00000004)
  281. /* ProtocolFlags */
  282. #define MPI2_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001)
  283. #define MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002)
  284. /****************************************************************************
  285. * PortFacts message
  286. ****************************************************************************/
  287. /* PortFacts Request message */
  288. typedef struct _MPI2_PORT_FACTS_REQUEST
  289. {
  290. U16 Reserved1; /* 0x00 */
  291. U8 ChainOffset; /* 0x02 */
  292. U8 Function; /* 0x03 */
  293. U16 Reserved2; /* 0x04 */
  294. U8 PortNumber; /* 0x06 */
  295. U8 MsgFlags; /* 0x07 */
  296. U8 VP_ID; /* 0x08 */
  297. U8 VF_ID; /* 0x09 */
  298. U16 Reserved3; /* 0x0A */
  299. } MPI2_PORT_FACTS_REQUEST, MPI2_POINTER PTR_MPI2_PORT_FACTS_REQUEST,
  300. Mpi2PortFactsRequest_t, MPI2_POINTER pMpi2PortFactsRequest_t;
  301. /* PortFacts Reply message */
  302. typedef struct _MPI2_PORT_FACTS_REPLY
  303. {
  304. U16 Reserved1; /* 0x00 */
  305. U8 MsgLength; /* 0x02 */
  306. U8 Function; /* 0x03 */
  307. U16 Reserved2; /* 0x04 */
  308. U8 PortNumber; /* 0x06 */
  309. U8 MsgFlags; /* 0x07 */
  310. U8 VP_ID; /* 0x08 */
  311. U8 VF_ID; /* 0x09 */
  312. U16 Reserved3; /* 0x0A */
  313. U16 Reserved4; /* 0x0C */
  314. U16 IOCStatus; /* 0x0E */
  315. U32 IOCLogInfo; /* 0x10 */
  316. U8 Reserved5; /* 0x14 */
  317. U8 PortType; /* 0x15 */
  318. U16 Reserved6; /* 0x16 */
  319. U16 MaxPostedCmdBuffers; /* 0x18 */
  320. U16 Reserved7; /* 0x1A */
  321. } MPI2_PORT_FACTS_REPLY, MPI2_POINTER PTR_MPI2_PORT_FACTS_REPLY,
  322. Mpi2PortFactsReply_t, MPI2_POINTER pMpi2PortFactsReply_t;
  323. /* PortType values */
  324. #define MPI2_PORTFACTS_PORTTYPE_INACTIVE (0x00)
  325. #define MPI2_PORTFACTS_PORTTYPE_FC (0x10)
  326. #define MPI2_PORTFACTS_PORTTYPE_ISCSI (0x20)
  327. #define MPI2_PORTFACTS_PORTTYPE_SAS_PHYSICAL (0x30)
  328. #define MPI2_PORTFACTS_PORTTYPE_SAS_VIRTUAL (0x31)
  329. /****************************************************************************
  330. * PortEnable message
  331. ****************************************************************************/
  332. /* PortEnable Request message */
  333. typedef struct _MPI2_PORT_ENABLE_REQUEST
  334. {
  335. U16 Reserved1; /* 0x00 */
  336. U8 ChainOffset; /* 0x02 */
  337. U8 Function; /* 0x03 */
  338. U8 Reserved2; /* 0x04 */
  339. U8 PortFlags; /* 0x05 */
  340. U8 Reserved3; /* 0x06 */
  341. U8 MsgFlags; /* 0x07 */
  342. U8 VP_ID; /* 0x08 */
  343. U8 VF_ID; /* 0x09 */
  344. U16 Reserved4; /* 0x0A */
  345. } MPI2_PORT_ENABLE_REQUEST, MPI2_POINTER PTR_MPI2_PORT_ENABLE_REQUEST,
  346. Mpi2PortEnableRequest_t, MPI2_POINTER pMpi2PortEnableRequest_t;
  347. /* PortEnable Reply message */
  348. typedef struct _MPI2_PORT_ENABLE_REPLY
  349. {
  350. U16 Reserved1; /* 0x00 */
  351. U8 MsgLength; /* 0x02 */
  352. U8 Function; /* 0x03 */
  353. U8 Reserved2; /* 0x04 */
  354. U8 PortFlags; /* 0x05 */
  355. U8 Reserved3; /* 0x06 */
  356. U8 MsgFlags; /* 0x07 */
  357. U8 VP_ID; /* 0x08 */
  358. U8 VF_ID; /* 0x09 */
  359. U16 Reserved4; /* 0x0A */
  360. U16 Reserved5; /* 0x0C */
  361. U16 IOCStatus; /* 0x0E */
  362. U32 IOCLogInfo; /* 0x10 */
  363. } MPI2_PORT_ENABLE_REPLY, MPI2_POINTER PTR_MPI2_PORT_ENABLE_REPLY,
  364. Mpi2PortEnableReply_t, MPI2_POINTER pMpi2PortEnableReply_t;
  365. /****************************************************************************
  366. * EventNotification message
  367. ****************************************************************************/
  368. /* EventNotification Request message */
  369. #define MPI2_EVENT_NOTIFY_EVENTMASK_WORDS (4)
  370. typedef struct _MPI2_EVENT_NOTIFICATION_REQUEST
  371. {
  372. U16 Reserved1; /* 0x00 */
  373. U8 ChainOffset; /* 0x02 */
  374. U8 Function; /* 0x03 */
  375. U16 Reserved2; /* 0x04 */
  376. U8 Reserved3; /* 0x06 */
  377. U8 MsgFlags; /* 0x07 */
  378. U8 VP_ID; /* 0x08 */
  379. U8 VF_ID; /* 0x09 */
  380. U16 Reserved4; /* 0x0A */
  381. U32 Reserved5; /* 0x0C */
  382. U32 Reserved6; /* 0x10 */
  383. U32 EventMasks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS];/* 0x14 */
  384. U16 SASBroadcastPrimitiveMasks; /* 0x24 */
  385. U16 Reserved7; /* 0x26 */
  386. U32 Reserved8; /* 0x28 */
  387. } MPI2_EVENT_NOTIFICATION_REQUEST,
  388. MPI2_POINTER PTR_MPI2_EVENT_NOTIFICATION_REQUEST,
  389. Mpi2EventNotificationRequest_t, MPI2_POINTER pMpi2EventNotificationRequest_t;
  390. /* EventNotification Reply message */
  391. typedef struct _MPI2_EVENT_NOTIFICATION_REPLY
  392. {
  393. U16 EventDataLength; /* 0x00 */
  394. U8 MsgLength; /* 0x02 */
  395. U8 Function; /* 0x03 */
  396. U16 Reserved1; /* 0x04 */
  397. U8 AckRequired; /* 0x06 */
  398. U8 MsgFlags; /* 0x07 */
  399. U8 VP_ID; /* 0x08 */
  400. U8 VF_ID; /* 0x09 */
  401. U16 Reserved2; /* 0x0A */
  402. U16 Reserved3; /* 0x0C */
  403. U16 IOCStatus; /* 0x0E */
  404. U32 IOCLogInfo; /* 0x10 */
  405. U16 Event; /* 0x14 */
  406. U16 Reserved4; /* 0x16 */
  407. U32 EventContext; /* 0x18 */
  408. U32 EventData[1]; /* 0x1C */
  409. } MPI2_EVENT_NOTIFICATION_REPLY, MPI2_POINTER PTR_MPI2_EVENT_NOTIFICATION_REPLY,
  410. Mpi2EventNotificationReply_t, MPI2_POINTER pMpi2EventNotificationReply_t;
  411. /* AckRequired */
  412. #define MPI2_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
  413. #define MPI2_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
  414. /* Event */
  415. #define MPI2_EVENT_LOG_DATA (0x0001)
  416. #define MPI2_EVENT_STATE_CHANGE (0x0002)
  417. #define MPI2_EVENT_HARD_RESET_RECEIVED (0x0005)
  418. #define MPI2_EVENT_EVENT_CHANGE (0x000A)
  419. #define MPI2_EVENT_TASK_SET_FULL (0x000E) /* obsolete */
  420. #define MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE (0x000F)
  421. #define MPI2_EVENT_IR_OPERATION_STATUS (0x0014)
  422. #define MPI2_EVENT_SAS_DISCOVERY (0x0016)
  423. #define MPI2_EVENT_SAS_BROADCAST_PRIMITIVE (0x0017)
  424. #define MPI2_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x0018)
  425. #define MPI2_EVENT_SAS_INIT_TABLE_OVERFLOW (0x0019)
  426. #define MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST (0x001C)
  427. #define MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE (0x001D)
  428. #define MPI2_EVENT_IR_VOLUME (0x001E)
  429. #define MPI2_EVENT_IR_PHYSICAL_DISK (0x001F)
  430. #define MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST (0x0020)
  431. #define MPI2_EVENT_LOG_ENTRY_ADDED (0x0021)
  432. #define MPI2_EVENT_SAS_PHY_COUNTER (0x0022)
  433. #define MPI2_EVENT_GPIO_INTERRUPT (0x0023)
  434. #define MPI2_EVENT_HOST_BASED_DISCOVERY_PHY (0x0024)
  435. #define MPI2_EVENT_SAS_QUIESCE (0x0025)
  436. /* Log Entry Added Event data */
  437. /* the following structure matches MPI2_LOG_0_ENTRY in mpi2_cnfg.h */
  438. #define MPI2_EVENT_DATA_LOG_DATA_LENGTH (0x1C)
  439. typedef struct _MPI2_EVENT_DATA_LOG_ENTRY_ADDED
  440. {
  441. U64 TimeStamp; /* 0x00 */
  442. U32 Reserved1; /* 0x08 */
  443. U16 LogSequence; /* 0x0C */
  444. U16 LogEntryQualifier; /* 0x0E */
  445. U8 VP_ID; /* 0x10 */
  446. U8 VF_ID; /* 0x11 */
  447. U16 Reserved2; /* 0x12 */
  448. U8 LogData[MPI2_EVENT_DATA_LOG_DATA_LENGTH];/* 0x14 */
  449. } MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  450. MPI2_POINTER PTR_MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  451. Mpi2EventDataLogEntryAdded_t, MPI2_POINTER pMpi2EventDataLogEntryAdded_t;
  452. /* GPIO Interrupt Event data */
  453. typedef struct _MPI2_EVENT_DATA_GPIO_INTERRUPT {
  454. U8 GPIONum; /* 0x00 */
  455. U8 Reserved1; /* 0x01 */
  456. U16 Reserved2; /* 0x02 */
  457. } MPI2_EVENT_DATA_GPIO_INTERRUPT,
  458. MPI2_POINTER PTR_MPI2_EVENT_DATA_GPIO_INTERRUPT,
  459. Mpi2EventDataGpioInterrupt_t, MPI2_POINTER pMpi2EventDataGpioInterrupt_t;
  460. /* Hard Reset Received Event data */
  461. typedef struct _MPI2_EVENT_DATA_HARD_RESET_RECEIVED
  462. {
  463. U8 Reserved1; /* 0x00 */
  464. U8 Port; /* 0x01 */
  465. U16 Reserved2; /* 0x02 */
  466. } MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  467. MPI2_POINTER PTR_MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  468. Mpi2EventDataHardResetReceived_t,
  469. MPI2_POINTER pMpi2EventDataHardResetReceived_t;
  470. /* Task Set Full Event data */
  471. /* this event is obsolete */
  472. typedef struct _MPI2_EVENT_DATA_TASK_SET_FULL
  473. {
  474. U16 DevHandle; /* 0x00 */
  475. U16 CurrentDepth; /* 0x02 */
  476. } MPI2_EVENT_DATA_TASK_SET_FULL, MPI2_POINTER PTR_MPI2_EVENT_DATA_TASK_SET_FULL,
  477. Mpi2EventDataTaskSetFull_t, MPI2_POINTER pMpi2EventDataTaskSetFull_t;
  478. /* SAS Device Status Change Event data */
  479. typedef struct _MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
  480. {
  481. U16 TaskTag; /* 0x00 */
  482. U8 ReasonCode; /* 0x02 */
  483. U8 Reserved1; /* 0x03 */
  484. U8 ASC; /* 0x04 */
  485. U8 ASCQ; /* 0x05 */
  486. U16 DevHandle; /* 0x06 */
  487. U32 Reserved2; /* 0x08 */
  488. U64 SASAddress; /* 0x0C */
  489. U8 LUN[8]; /* 0x14 */
  490. } MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  491. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  492. Mpi2EventDataSasDeviceStatusChange_t,
  493. MPI2_POINTER pMpi2EventDataSasDeviceStatusChange_t;
  494. /* SAS Device Status Change Event data ReasonCode values */
  495. #define MPI2_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
  496. #define MPI2_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07)
  497. #define MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08)
  498. #define MPI2_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL (0x09)
  499. #define MPI2_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A)
  500. #define MPI2_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
  501. #define MPI2_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
  502. #define MPI2_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
  503. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET (0x0E)
  504. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_TASK_ABORT_INTERNAL (0x0F)
  505. #define MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE (0x10)
  506. #define MPI2_EVENT_SAS_DEV_STAT_RC_EXPANDER_REDUCED_FUNCTIONALITY (0x11)
  507. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_EXPANDER_REDUCED_FUNCTIONALITY (0x12)
  508. /* Integrated RAID Operation Status Event data */
  509. typedef struct _MPI2_EVENT_DATA_IR_OPERATION_STATUS
  510. {
  511. U16 VolDevHandle; /* 0x00 */
  512. U16 Reserved1; /* 0x02 */
  513. U8 RAIDOperation; /* 0x04 */
  514. U8 PercentComplete; /* 0x05 */
  515. U16 Reserved2; /* 0x06 */
  516. U32 Resereved3; /* 0x08 */
  517. } MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  518. MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  519. Mpi2EventDataIrOperationStatus_t,
  520. MPI2_POINTER pMpi2EventDataIrOperationStatus_t;
  521. /* Integrated RAID Operation Status Event data RAIDOperation values */
  522. #define MPI2_EVENT_IR_RAIDOP_RESYNC (0x00)
  523. #define MPI2_EVENT_IR_RAIDOP_ONLINE_CAP_EXPANSION (0x01)
  524. #define MPI2_EVENT_IR_RAIDOP_CONSISTENCY_CHECK (0x02)
  525. #define MPI2_EVENT_IR_RAIDOP_BACKGROUND_INIT (0x03)
  526. #define MPI2_EVENT_IR_RAIDOP_MAKE_DATA_CONSISTENT (0x04)
  527. /* Integrated RAID Volume Event data */
  528. typedef struct _MPI2_EVENT_DATA_IR_VOLUME
  529. {
  530. U16 VolDevHandle; /* 0x00 */
  531. U8 ReasonCode; /* 0x02 */
  532. U8 Reserved1; /* 0x03 */
  533. U32 NewValue; /* 0x04 */
  534. U32 PreviousValue; /* 0x08 */
  535. } MPI2_EVENT_DATA_IR_VOLUME, MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_VOLUME,
  536. Mpi2EventDataIrVolume_t, MPI2_POINTER pMpi2EventDataIrVolume_t;
  537. /* Integrated RAID Volume Event data ReasonCode values */
  538. #define MPI2_EVENT_IR_VOLUME_RC_SETTINGS_CHANGED (0x01)
  539. #define MPI2_EVENT_IR_VOLUME_RC_STATUS_FLAGS_CHANGED (0x02)
  540. #define MPI2_EVENT_IR_VOLUME_RC_STATE_CHANGED (0x03)
  541. /* Integrated RAID Physical Disk Event data */
  542. typedef struct _MPI2_EVENT_DATA_IR_PHYSICAL_DISK
  543. {
  544. U16 Reserved1; /* 0x00 */
  545. U8 ReasonCode; /* 0x02 */
  546. U8 PhysDiskNum; /* 0x03 */
  547. U16 PhysDiskDevHandle; /* 0x04 */
  548. U16 Reserved2; /* 0x06 */
  549. U16 Slot; /* 0x08 */
  550. U16 EnclosureHandle; /* 0x0A */
  551. U32 NewValue; /* 0x0C */
  552. U32 PreviousValue; /* 0x10 */
  553. } MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  554. MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  555. Mpi2EventDataIrPhysicalDisk_t, MPI2_POINTER pMpi2EventDataIrPhysicalDisk_t;
  556. /* Integrated RAID Physical Disk Event data ReasonCode values */
  557. #define MPI2_EVENT_IR_PHYSDISK_RC_SETTINGS_CHANGED (0x01)
  558. #define MPI2_EVENT_IR_PHYSDISK_RC_STATUS_FLAGS_CHANGED (0x02)
  559. #define MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED (0x03)
  560. /* Integrated RAID Configuration Change List Event data */
  561. /*
  562. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  563. * one and check NumElements at runtime.
  564. */
  565. #ifndef MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT
  566. #define MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT (1)
  567. #endif
  568. typedef struct _MPI2_EVENT_IR_CONFIG_ELEMENT
  569. {
  570. U16 ElementFlags; /* 0x00 */
  571. U16 VolDevHandle; /* 0x02 */
  572. U8 ReasonCode; /* 0x04 */
  573. U8 PhysDiskNum; /* 0x05 */
  574. U16 PhysDiskDevHandle; /* 0x06 */
  575. } MPI2_EVENT_IR_CONFIG_ELEMENT, MPI2_POINTER PTR_MPI2_EVENT_IR_CONFIG_ELEMENT,
  576. Mpi2EventIrConfigElement_t, MPI2_POINTER pMpi2EventIrConfigElement_t;
  577. /* IR Configuration Change List Event data ElementFlags values */
  578. #define MPI2_EVENT_IR_CHANGE_EFLAGS_ELEMENT_TYPE_MASK (0x000F)
  579. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLUME_ELEMENT (0x0000)
  580. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLPHYSDISK_ELEMENT (0x0001)
  581. #define MPI2_EVENT_IR_CHANGE_EFLAGS_HOTSPARE_ELEMENT (0x0002)
  582. /* IR Configuration Change List Event data ReasonCode values */
  583. #define MPI2_EVENT_IR_CHANGE_RC_ADDED (0x01)
  584. #define MPI2_EVENT_IR_CHANGE_RC_REMOVED (0x02)
  585. #define MPI2_EVENT_IR_CHANGE_RC_NO_CHANGE (0x03)
  586. #define MPI2_EVENT_IR_CHANGE_RC_HIDE (0x04)
  587. #define MPI2_EVENT_IR_CHANGE_RC_UNHIDE (0x05)
  588. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED (0x06)
  589. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED (0x07)
  590. #define MPI2_EVENT_IR_CHANGE_RC_PD_CREATED (0x08)
  591. #define MPI2_EVENT_IR_CHANGE_RC_PD_DELETED (0x09)
  592. typedef struct _MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST
  593. {
  594. U8 NumElements; /* 0x00 */
  595. U8 Reserved1; /* 0x01 */
  596. U8 Reserved2; /* 0x02 */
  597. U8 ConfigNum; /* 0x03 */
  598. U32 Flags; /* 0x04 */
  599. MPI2_EVENT_IR_CONFIG_ELEMENT ConfigElement[MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT]; /* 0x08 */
  600. } MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  601. MPI2_POINTER PTR_MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  602. Mpi2EventDataIrConfigChangeList_t,
  603. MPI2_POINTER pMpi2EventDataIrConfigChangeList_t;
  604. /* IR Configuration Change List Event data Flags values */
  605. #define MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG (0x00000001)
  606. /* SAS Discovery Event data */
  607. typedef struct _MPI2_EVENT_DATA_SAS_DISCOVERY
  608. {
  609. U8 Flags; /* 0x00 */
  610. U8 ReasonCode; /* 0x01 */
  611. U8 PhysicalPort; /* 0x02 */
  612. U8 Reserved1; /* 0x03 */
  613. U32 DiscoveryStatus; /* 0x04 */
  614. } MPI2_EVENT_DATA_SAS_DISCOVERY,
  615. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_DISCOVERY,
  616. Mpi2EventDataSasDiscovery_t, MPI2_POINTER pMpi2EventDataSasDiscovery_t;
  617. /* SAS Discovery Event data Flags values */
  618. #define MPI2_EVENT_SAS_DISC_DEVICE_CHANGE (0x02)
  619. #define MPI2_EVENT_SAS_DISC_IN_PROGRESS (0x01)
  620. /* SAS Discovery Event data ReasonCode values */
  621. #define MPI2_EVENT_SAS_DISC_RC_STARTED (0x01)
  622. #define MPI2_EVENT_SAS_DISC_RC_COMPLETED (0x02)
  623. /* SAS Discovery Event data DiscoveryStatus values */
  624. #define MPI2_EVENT_SAS_DISC_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
  625. #define MPI2_EVENT_SAS_DISC_DS_MAX_EXPANDERS_EXCEED (0x40000000)
  626. #define MPI2_EVENT_SAS_DISC_DS_MAX_DEVICES_EXCEED (0x20000000)
  627. #define MPI2_EVENT_SAS_DISC_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
  628. #define MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR (0x08000000)
  629. #define MPI2_EVENT_SAS_DISC_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
  630. #define MPI2_EVENT_SAS_DISC_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
  631. #define MPI2_EVENT_SAS_DISC_DS_MULTI_PORT_DOMAIN (0x00002000)
  632. #define MPI2_EVENT_SAS_DISC_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
  633. #define MPI2_EVENT_SAS_DISC_DS_UNSUPPORTED_DEVICE (0x00000800)
  634. #define MPI2_EVENT_SAS_DISC_DS_TABLE_LINK (0x00000400)
  635. #define MPI2_EVENT_SAS_DISC_DS_SUBTRACTIVE_LINK (0x00000200)
  636. #define MPI2_EVENT_SAS_DISC_DS_SMP_CRC_ERROR (0x00000100)
  637. #define MPI2_EVENT_SAS_DISC_DS_SMP_FUNCTION_FAILED (0x00000080)
  638. #define MPI2_EVENT_SAS_DISC_DS_INDEX_NOT_EXIST (0x00000040)
  639. #define MPI2_EVENT_SAS_DISC_DS_OUT_ROUTE_ENTRIES (0x00000020)
  640. #define MPI2_EVENT_SAS_DISC_DS_SMP_TIMEOUT (0x00000010)
  641. #define MPI2_EVENT_SAS_DISC_DS_MULTIPLE_PORTS (0x00000004)
  642. #define MPI2_EVENT_SAS_DISC_DS_UNADDRESSABLE_DEVICE (0x00000002)
  643. #define MPI2_EVENT_SAS_DISC_DS_LOOP_DETECTED (0x00000001)
  644. /* SAS Broadcast Primitive Event data */
  645. typedef struct _MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE
  646. {
  647. U8 PhyNum; /* 0x00 */
  648. U8 Port; /* 0x01 */
  649. U8 PortWidth; /* 0x02 */
  650. U8 Primitive; /* 0x03 */
  651. } MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  652. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  653. Mpi2EventDataSasBroadcastPrimitive_t,
  654. MPI2_POINTER pMpi2EventDataSasBroadcastPrimitive_t;
  655. /* defines for the Primitive field */
  656. #define MPI2_EVENT_PRIMITIVE_CHANGE (0x01)
  657. #define MPI2_EVENT_PRIMITIVE_SES (0x02)
  658. #define MPI2_EVENT_PRIMITIVE_EXPANDER (0x03)
  659. #define MPI2_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04)
  660. #define MPI2_EVENT_PRIMITIVE_RESERVED3 (0x05)
  661. #define MPI2_EVENT_PRIMITIVE_RESERVED4 (0x06)
  662. #define MPI2_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07)
  663. #define MPI2_EVENT_PRIMITIVE_CHANGE1_RESERVED (0x08)
  664. /* SAS Initiator Device Status Change Event data */
  665. typedef struct _MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE
  666. {
  667. U8 ReasonCode; /* 0x00 */
  668. U8 PhysicalPort; /* 0x01 */
  669. U16 DevHandle; /* 0x02 */
  670. U64 SASAddress; /* 0x04 */
  671. } MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  672. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  673. Mpi2EventDataSasInitDevStatusChange_t,
  674. MPI2_POINTER pMpi2EventDataSasInitDevStatusChange_t;
  675. /* SAS Initiator Device Status Change event ReasonCode values */
  676. #define MPI2_EVENT_SAS_INIT_RC_ADDED (0x01)
  677. #define MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING (0x02)
  678. /* SAS Initiator Device Table Overflow Event data */
  679. typedef struct _MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW
  680. {
  681. U16 MaxInit; /* 0x00 */
  682. U16 CurrentInit; /* 0x02 */
  683. U64 SASAddress; /* 0x04 */
  684. } MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  685. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  686. Mpi2EventDataSasInitTableOverflow_t,
  687. MPI2_POINTER pMpi2EventDataSasInitTableOverflow_t;
  688. /* SAS Topology Change List Event data */
  689. /*
  690. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  691. * one and check NumEntries at runtime.
  692. */
  693. #ifndef MPI2_EVENT_SAS_TOPO_PHY_COUNT
  694. #define MPI2_EVENT_SAS_TOPO_PHY_COUNT (1)
  695. #endif
  696. typedef struct _MPI2_EVENT_SAS_TOPO_PHY_ENTRY
  697. {
  698. U16 AttachedDevHandle; /* 0x00 */
  699. U8 LinkRate; /* 0x02 */
  700. U8 PhyStatus; /* 0x03 */
  701. } MPI2_EVENT_SAS_TOPO_PHY_ENTRY, MPI2_POINTER PTR_MPI2_EVENT_SAS_TOPO_PHY_ENTRY,
  702. Mpi2EventSasTopoPhyEntry_t, MPI2_POINTER pMpi2EventSasTopoPhyEntry_t;
  703. typedef struct _MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST
  704. {
  705. U16 EnclosureHandle; /* 0x00 */
  706. U16 ExpanderDevHandle; /* 0x02 */
  707. U8 NumPhys; /* 0x04 */
  708. U8 Reserved1; /* 0x05 */
  709. U16 Reserved2; /* 0x06 */
  710. U8 NumEntries; /* 0x08 */
  711. U8 StartPhyNum; /* 0x09 */
  712. U8 ExpStatus; /* 0x0A */
  713. U8 PhysicalPort; /* 0x0B */
  714. MPI2_EVENT_SAS_TOPO_PHY_ENTRY PHY[MPI2_EVENT_SAS_TOPO_PHY_COUNT]; /* 0x0C*/
  715. } MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  716. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  717. Mpi2EventDataSasTopologyChangeList_t,
  718. MPI2_POINTER pMpi2EventDataSasTopologyChangeList_t;
  719. /* values for the ExpStatus field */
  720. #define MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER (0x00)
  721. #define MPI2_EVENT_SAS_TOPO_ES_ADDED (0x01)
  722. #define MPI2_EVENT_SAS_TOPO_ES_NOT_RESPONDING (0x02)
  723. #define MPI2_EVENT_SAS_TOPO_ES_RESPONDING (0x03)
  724. #define MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING (0x04)
  725. /* defines for the LinkRate field */
  726. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_MASK (0xF0)
  727. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_SHIFT (4)
  728. #define MPI2_EVENT_SAS_TOPO_LR_PREV_MASK (0x0F)
  729. #define MPI2_EVENT_SAS_TOPO_LR_PREV_SHIFT (0)
  730. #define MPI2_EVENT_SAS_TOPO_LR_UNKNOWN_LINK_RATE (0x00)
  731. #define MPI2_EVENT_SAS_TOPO_LR_PHY_DISABLED (0x01)
  732. #define MPI2_EVENT_SAS_TOPO_LR_NEGOTIATION_FAILED (0x02)
  733. #define MPI2_EVENT_SAS_TOPO_LR_SATA_OOB_COMPLETE (0x03)
  734. #define MPI2_EVENT_SAS_TOPO_LR_PORT_SELECTOR (0x04)
  735. #define MPI2_EVENT_SAS_TOPO_LR_SMP_RESET_IN_PROGRESS (0x05)
  736. #define MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY (0x06)
  737. #define MPI2_EVENT_SAS_TOPO_LR_RATE_1_5 (0x08)
  738. #define MPI2_EVENT_SAS_TOPO_LR_RATE_3_0 (0x09)
  739. #define MPI2_EVENT_SAS_TOPO_LR_RATE_6_0 (0x0A)
  740. /* values for the PhyStatus field */
  741. #define MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT (0x80)
  742. #define MPI2_EVENT_SAS_TOPO_PS_MULTIPLEX_CHANGE (0x10)
  743. /* values for the PhyStatus ReasonCode sub-field */
  744. #define MPI2_EVENT_SAS_TOPO_RC_MASK (0x0F)
  745. #define MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED (0x01)
  746. #define MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING (0x02)
  747. #define MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED (0x03)
  748. #define MPI2_EVENT_SAS_TOPO_RC_NO_CHANGE (0x04)
  749. #define MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING (0x05)
  750. /* SAS Enclosure Device Status Change Event data */
  751. typedef struct _MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE
  752. {
  753. U16 EnclosureHandle; /* 0x00 */
  754. U8 ReasonCode; /* 0x02 */
  755. U8 PhysicalPort; /* 0x03 */
  756. U64 EnclosureLogicalID; /* 0x04 */
  757. U16 NumSlots; /* 0x0C */
  758. U16 StartSlot; /* 0x0E */
  759. U32 PhyBits; /* 0x10 */
  760. } MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  761. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  762. Mpi2EventDataSasEnclDevStatusChange_t,
  763. MPI2_POINTER pMpi2EventDataSasEnclDevStatusChange_t;
  764. /* SAS Enclosure Device Status Change event ReasonCode values */
  765. #define MPI2_EVENT_SAS_ENCL_RC_ADDED (0x01)
  766. #define MPI2_EVENT_SAS_ENCL_RC_NOT_RESPONDING (0x02)
  767. /* SAS PHY Counter Event data */
  768. typedef struct _MPI2_EVENT_DATA_SAS_PHY_COUNTER {
  769. U64 TimeStamp; /* 0x00 */
  770. U32 Reserved1; /* 0x08 */
  771. U8 PhyEventCode; /* 0x0C */
  772. U8 PhyNum; /* 0x0D */
  773. U16 Reserved2; /* 0x0E */
  774. U32 PhyEventInfo; /* 0x10 */
  775. U8 CounterType; /* 0x14 */
  776. U8 ThresholdWindow; /* 0x15 */
  777. U8 TimeUnits; /* 0x16 */
  778. U8 Reserved3; /* 0x17 */
  779. U32 EventThreshold; /* 0x18 */
  780. U16 ThresholdFlags; /* 0x1C */
  781. U16 Reserved4; /* 0x1E */
  782. } MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  783. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  784. Mpi2EventDataSasPhyCounter_t, MPI2_POINTER pMpi2EventDataSasPhyCounter_t;
  785. /* use MPI2_SASPHY3_EVENT_CODE_ values from mpi2_cnfg.h for the
  786. * PhyEventCode field
  787. * use MPI2_SASPHY3_COUNTER_TYPE_ values from mpi2_cnfg.h for the
  788. * CounterType field
  789. * use MPI2_SASPHY3_TIME_UNITS_ values from mpi2_cnfg.h for the
  790. * TimeUnits field
  791. * use MPI2_SASPHY3_TFLAGS_ values from mpi2_cnfg.h for the
  792. * ThresholdFlags field
  793. * */
  794. /* SAS Quiesce Event data */
  795. typedef struct _MPI2_EVENT_DATA_SAS_QUIESCE {
  796. U8 ReasonCode; /* 0x00 */
  797. U8 Reserved1; /* 0x01 */
  798. U16 Reserved2; /* 0x02 */
  799. U32 Reserved3; /* 0x04 */
  800. } MPI2_EVENT_DATA_SAS_QUIESCE,
  801. MPI2_POINTER PTR_MPI2_EVENT_DATA_SAS_QUIESCE,
  802. Mpi2EventDataSasQuiesce_t, MPI2_POINTER pMpi2EventDataSasQuiesce_t;
  803. /* SAS Quiesce Event data ReasonCode values */
  804. #define MPI2_EVENT_SAS_QUIESCE_RC_STARTED (0x01)
  805. #define MPI2_EVENT_SAS_QUIESCE_RC_COMPLETED (0x02)
  806. /* Host Based Discovery Phy Event data */
  807. typedef struct _MPI2_EVENT_HBD_PHY_SAS {
  808. U8 Flags; /* 0x00 */
  809. U8 NegotiatedLinkRate; /* 0x01 */
  810. U8 PhyNum; /* 0x02 */
  811. U8 PhysicalPort; /* 0x03 */
  812. U32 Reserved1; /* 0x04 */
  813. U8 InitialFrame[28]; /* 0x08 */
  814. } MPI2_EVENT_HBD_PHY_SAS, MPI2_POINTER PTR_MPI2_EVENT_HBD_PHY_SAS,
  815. Mpi2EventHbdPhySas_t, MPI2_POINTER pMpi2EventHbdPhySas_t;
  816. /* values for the Flags field */
  817. #define MPI2_EVENT_HBD_SAS_FLAGS_FRAME_VALID (0x02)
  818. #define MPI2_EVENT_HBD_SAS_FLAGS_SATA_FRAME (0x01)
  819. /* use MPI2_SAS_NEG_LINK_RATE_ defines from mpi2_cnfg.h for
  820. * the NegotiatedLinkRate field */
  821. typedef union _MPI2_EVENT_HBD_DESCRIPTOR {
  822. MPI2_EVENT_HBD_PHY_SAS Sas;
  823. } MPI2_EVENT_HBD_DESCRIPTOR, MPI2_POINTER PTR_MPI2_EVENT_HBD_DESCRIPTOR,
  824. Mpi2EventHbdDescriptor_t, MPI2_POINTER pMpi2EventHbdDescriptor_t;
  825. typedef struct _MPI2_EVENT_DATA_HBD_PHY {
  826. U8 DescriptorType; /* 0x00 */
  827. U8 Reserved1; /* 0x01 */
  828. U16 Reserved2; /* 0x02 */
  829. U32 Reserved3; /* 0x04 */
  830. MPI2_EVENT_HBD_DESCRIPTOR Descriptor; /* 0x08 */
  831. } MPI2_EVENT_DATA_HBD_PHY, MPI2_POINTER PTR_MPI2_EVENT_DATA_HBD_PHY,
  832. Mpi2EventDataHbdPhy_t, MPI2_POINTER pMpi2EventDataMpi2EventDataHbdPhy_t;
  833. /* values for the DescriptorType field */
  834. #define MPI2_EVENT_HBD_DT_SAS (0x01)
  835. /****************************************************************************
  836. * EventAck message
  837. ****************************************************************************/
  838. /* EventAck Request message */
  839. typedef struct _MPI2_EVENT_ACK_REQUEST
  840. {
  841. U16 Reserved1; /* 0x00 */
  842. U8 ChainOffset; /* 0x02 */
  843. U8 Function; /* 0x03 */
  844. U16 Reserved2; /* 0x04 */
  845. U8 Reserved3; /* 0x06 */
  846. U8 MsgFlags; /* 0x07 */
  847. U8 VP_ID; /* 0x08 */
  848. U8 VF_ID; /* 0x09 */
  849. U16 Reserved4; /* 0x0A */
  850. U16 Event; /* 0x0C */
  851. U16 Reserved5; /* 0x0E */
  852. U32 EventContext; /* 0x10 */
  853. } MPI2_EVENT_ACK_REQUEST, MPI2_POINTER PTR_MPI2_EVENT_ACK_REQUEST,
  854. Mpi2EventAckRequest_t, MPI2_POINTER pMpi2EventAckRequest_t;
  855. /* EventAck Reply message */
  856. typedef struct _MPI2_EVENT_ACK_REPLY
  857. {
  858. U16 Reserved1; /* 0x00 */
  859. U8 MsgLength; /* 0x02 */
  860. U8 Function; /* 0x03 */
  861. U16 Reserved2; /* 0x04 */
  862. U8 Reserved3; /* 0x06 */
  863. U8 MsgFlags; /* 0x07 */
  864. U8 VP_ID; /* 0x08 */
  865. U8 VF_ID; /* 0x09 */
  866. U16 Reserved4; /* 0x0A */
  867. U16 Reserved5; /* 0x0C */
  868. U16 IOCStatus; /* 0x0E */
  869. U32 IOCLogInfo; /* 0x10 */
  870. } MPI2_EVENT_ACK_REPLY, MPI2_POINTER PTR_MPI2_EVENT_ACK_REPLY,
  871. Mpi2EventAckReply_t, MPI2_POINTER pMpi2EventAckReply_t;
  872. /****************************************************************************
  873. * FWDownload message
  874. ****************************************************************************/
  875. /* FWDownload Request message */
  876. typedef struct _MPI2_FW_DOWNLOAD_REQUEST
  877. {
  878. U8 ImageType; /* 0x00 */
  879. U8 Reserved1; /* 0x01 */
  880. U8 ChainOffset; /* 0x02 */
  881. U8 Function; /* 0x03 */
  882. U16 Reserved2; /* 0x04 */
  883. U8 Reserved3; /* 0x06 */
  884. U8 MsgFlags; /* 0x07 */
  885. U8 VP_ID; /* 0x08 */
  886. U8 VF_ID; /* 0x09 */
  887. U16 Reserved4; /* 0x0A */
  888. U32 TotalImageSize; /* 0x0C */
  889. U32 Reserved5; /* 0x10 */
  890. MPI2_MPI_SGE_UNION SGL; /* 0x14 */
  891. } MPI2_FW_DOWNLOAD_REQUEST, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_REQUEST,
  892. Mpi2FWDownloadRequest, MPI2_POINTER pMpi2FWDownloadRequest;
  893. #define MPI2_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01)
  894. #define MPI2_FW_DOWNLOAD_ITYPE_FW (0x01)
  895. #define MPI2_FW_DOWNLOAD_ITYPE_BIOS (0x02)
  896. #define MPI2_FW_DOWNLOAD_ITYPE_MANUFACTURING (0x06)
  897. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07)
  898. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08)
  899. #define MPI2_FW_DOWNLOAD_ITYPE_MEGARAID (0x09)
  900. #define MPI2_FW_DOWNLOAD_ITYPE_COMPLETE (0x0A)
  901. #define MPI2_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  902. /* FWDownload TransactionContext Element */
  903. typedef struct _MPI2_FW_DOWNLOAD_TCSGE
  904. {
  905. U8 Reserved1; /* 0x00 */
  906. U8 ContextSize; /* 0x01 */
  907. U8 DetailsLength; /* 0x02 */
  908. U8 Flags; /* 0x03 */
  909. U32 Reserved2; /* 0x04 */
  910. U32 ImageOffset; /* 0x08 */
  911. U32 ImageSize; /* 0x0C */
  912. } MPI2_FW_DOWNLOAD_TCSGE, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_TCSGE,
  913. Mpi2FWDownloadTCSGE_t, MPI2_POINTER pMpi2FWDownloadTCSGE_t;
  914. /* FWDownload Reply message */
  915. typedef struct _MPI2_FW_DOWNLOAD_REPLY
  916. {
  917. U8 ImageType; /* 0x00 */
  918. U8 Reserved1; /* 0x01 */
  919. U8 MsgLength; /* 0x02 */
  920. U8 Function; /* 0x03 */
  921. U16 Reserved2; /* 0x04 */
  922. U8 Reserved3; /* 0x06 */
  923. U8 MsgFlags; /* 0x07 */
  924. U8 VP_ID; /* 0x08 */
  925. U8 VF_ID; /* 0x09 */
  926. U16 Reserved4; /* 0x0A */
  927. U16 Reserved5; /* 0x0C */
  928. U16 IOCStatus; /* 0x0E */
  929. U32 IOCLogInfo; /* 0x10 */
  930. } MPI2_FW_DOWNLOAD_REPLY, MPI2_POINTER PTR_MPI2_FW_DOWNLOAD_REPLY,
  931. Mpi2FWDownloadReply_t, MPI2_POINTER pMpi2FWDownloadReply_t;
  932. /****************************************************************************
  933. * FWUpload message
  934. ****************************************************************************/
  935. /* FWUpload Request message */
  936. typedef struct _MPI2_FW_UPLOAD_REQUEST
  937. {
  938. U8 ImageType; /* 0x00 */
  939. U8 Reserved1; /* 0x01 */
  940. U8 ChainOffset; /* 0x02 */
  941. U8 Function; /* 0x03 */
  942. U16 Reserved2; /* 0x04 */
  943. U8 Reserved3; /* 0x06 */
  944. U8 MsgFlags; /* 0x07 */
  945. U8 VP_ID; /* 0x08 */
  946. U8 VF_ID; /* 0x09 */
  947. U16 Reserved4; /* 0x0A */
  948. U32 Reserved5; /* 0x0C */
  949. U32 Reserved6; /* 0x10 */
  950. MPI2_MPI_SGE_UNION SGL; /* 0x14 */
  951. } MPI2_FW_UPLOAD_REQUEST, MPI2_POINTER PTR_MPI2_FW_UPLOAD_REQUEST,
  952. Mpi2FWUploadRequest_t, MPI2_POINTER pMpi2FWUploadRequest_t;
  953. #define MPI2_FW_UPLOAD_ITYPE_FW_CURRENT (0x00)
  954. #define MPI2_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
  955. #define MPI2_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
  956. #define MPI2_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
  957. #define MPI2_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
  958. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
  959. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
  960. #define MPI2_FW_UPLOAD_ITYPE_MEGARAID (0x09)
  961. #define MPI2_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
  962. #define MPI2_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  963. typedef struct _MPI2_FW_UPLOAD_TCSGE
  964. {
  965. U8 Reserved1; /* 0x00 */
  966. U8 ContextSize; /* 0x01 */
  967. U8 DetailsLength; /* 0x02 */
  968. U8 Flags; /* 0x03 */
  969. U32 Reserved2; /* 0x04 */
  970. U32 ImageOffset; /* 0x08 */
  971. U32 ImageSize; /* 0x0C */
  972. } MPI2_FW_UPLOAD_TCSGE, MPI2_POINTER PTR_MPI2_FW_UPLOAD_TCSGE,
  973. Mpi2FWUploadTCSGE_t, MPI2_POINTER pMpi2FWUploadTCSGE_t;
  974. /* FWUpload Reply message */
  975. typedef struct _MPI2_FW_UPLOAD_REPLY
  976. {
  977. U8 ImageType; /* 0x00 */
  978. U8 Reserved1; /* 0x01 */
  979. U8 MsgLength; /* 0x02 */
  980. U8 Function; /* 0x03 */
  981. U16 Reserved2; /* 0x04 */
  982. U8 Reserved3; /* 0x06 */
  983. U8 MsgFlags; /* 0x07 */
  984. U8 VP_ID; /* 0x08 */
  985. U8 VF_ID; /* 0x09 */
  986. U16 Reserved4; /* 0x0A */
  987. U16 Reserved5; /* 0x0C */
  988. U16 IOCStatus; /* 0x0E */
  989. U32 IOCLogInfo; /* 0x10 */
  990. U32 ActualImageSize; /* 0x14 */
  991. } MPI2_FW_UPLOAD_REPLY, MPI2_POINTER PTR_MPI2_FW_UPLOAD_REPLY,
  992. Mpi2FWUploadReply_t, MPI2_POINTER pMPi2FWUploadReply_t;
  993. /* FW Image Header */
  994. typedef struct _MPI2_FW_IMAGE_HEADER
  995. {
  996. U32 Signature; /* 0x00 */
  997. U32 Signature0; /* 0x04 */
  998. U32 Signature1; /* 0x08 */
  999. U32 Signature2; /* 0x0C */
  1000. MPI2_VERSION_UNION MPIVersion; /* 0x10 */
  1001. MPI2_VERSION_UNION FWVersion; /* 0x14 */
  1002. MPI2_VERSION_UNION NVDATAVersion; /* 0x18 */
  1003. MPI2_VERSION_UNION PackageVersion; /* 0x1C */
  1004. U16 VendorID; /* 0x20 */
  1005. U16 ProductID; /* 0x22 */
  1006. U16 ProtocolFlags; /* 0x24 */
  1007. U16 Reserved26; /* 0x26 */
  1008. U32 IOCCapabilities; /* 0x28 */
  1009. U32 ImageSize; /* 0x2C */
  1010. U32 NextImageHeaderOffset; /* 0x30 */
  1011. U32 Checksum; /* 0x34 */
  1012. U32 Reserved38; /* 0x38 */
  1013. U32 Reserved3C; /* 0x3C */
  1014. U32 Reserved40; /* 0x40 */
  1015. U32 Reserved44; /* 0x44 */
  1016. U32 Reserved48; /* 0x48 */
  1017. U32 Reserved4C; /* 0x4C */
  1018. U32 Reserved50; /* 0x50 */
  1019. U32 Reserved54; /* 0x54 */
  1020. U32 Reserved58; /* 0x58 */
  1021. U32 Reserved5C; /* 0x5C */
  1022. U32 Reserved60; /* 0x60 */
  1023. U32 FirmwareVersionNameWhat; /* 0x64 */
  1024. U8 FirmwareVersionName[32]; /* 0x68 */
  1025. U32 VendorNameWhat; /* 0x88 */
  1026. U8 VendorName[32]; /* 0x8C */
  1027. U32 PackageNameWhat; /* 0x88 */
  1028. U8 PackageName[32]; /* 0x8C */
  1029. U32 ReservedD0; /* 0xD0 */
  1030. U32 ReservedD4; /* 0xD4 */
  1031. U32 ReservedD8; /* 0xD8 */
  1032. U32 ReservedDC; /* 0xDC */
  1033. U32 ReservedE0; /* 0xE0 */
  1034. U32 ReservedE4; /* 0xE4 */
  1035. U32 ReservedE8; /* 0xE8 */
  1036. U32 ReservedEC; /* 0xEC */
  1037. U32 ReservedF0; /* 0xF0 */
  1038. U32 ReservedF4; /* 0xF4 */
  1039. U32 ReservedF8; /* 0xF8 */
  1040. U32 ReservedFC; /* 0xFC */
  1041. } MPI2_FW_IMAGE_HEADER, MPI2_POINTER PTR_MPI2_FW_IMAGE_HEADER,
  1042. Mpi2FWImageHeader_t, MPI2_POINTER pMpi2FWImageHeader_t;
  1043. /* Signature field */
  1044. #define MPI2_FW_HEADER_SIGNATURE_OFFSET (0x00)
  1045. #define MPI2_FW_HEADER_SIGNATURE_MASK (0xFF000000)
  1046. #define MPI2_FW_HEADER_SIGNATURE (0xEA000000)
  1047. /* Signature0 field */
  1048. #define MPI2_FW_HEADER_SIGNATURE0_OFFSET (0x04)
  1049. #define MPI2_FW_HEADER_SIGNATURE0 (0x5AFAA55A)
  1050. /* Signature1 field */
  1051. #define MPI2_FW_HEADER_SIGNATURE1_OFFSET (0x08)
  1052. #define MPI2_FW_HEADER_SIGNATURE1 (0xA55AFAA5)
  1053. /* Signature2 field */
  1054. #define MPI2_FW_HEADER_SIGNATURE2_OFFSET (0x0C)
  1055. #define MPI2_FW_HEADER_SIGNATURE2 (0x5AA55AFA)
  1056. /* defines for using the ProductID field */
  1057. #define MPI2_FW_HEADER_PID_TYPE_MASK (0xF000)
  1058. #define MPI2_FW_HEADER_PID_TYPE_SAS (0x2000)
  1059. #define MPI2_FW_HEADER_PID_PROD_MASK (0x0F00)
  1060. #define MPI2_FW_HEADER_PID_PROD_A (0x0000)
  1061. #define MPI2_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200)
  1062. #define MPI2_FW_HEADER_PID_PROD_IR_SCSI (0x0700)
  1063. #define MPI2_FW_HEADER_PID_FAMILY_MASK (0x00FF)
  1064. /* SAS */
  1065. #define MPI2_FW_HEADER_PID_FAMILY_2108_SAS (0x0013)
  1066. #define MPI2_FW_HEADER_PID_FAMILY_2208_SAS (0x0014)
  1067. /* use MPI2_IOCFACTS_PROTOCOL_ defines for ProtocolFlags field */
  1068. /* use MPI2_IOCFACTS_CAPABILITY_ defines for IOCCapabilities field */
  1069. #define MPI2_FW_HEADER_IMAGESIZE_OFFSET (0x2C)
  1070. #define MPI2_FW_HEADER_NEXTIMAGE_OFFSET (0x30)
  1071. #define MPI2_FW_HEADER_VERNMHWAT_OFFSET (0x64)
  1072. #define MPI2_FW_HEADER_WHAT_SIGNATURE (0x29232840)
  1073. #define MPI2_FW_HEADER_SIZE (0x100)
  1074. /* Extended Image Header */
  1075. typedef struct _MPI2_EXT_IMAGE_HEADER
  1076. {
  1077. U8 ImageType; /* 0x00 */
  1078. U8 Reserved1; /* 0x01 */
  1079. U16 Reserved2; /* 0x02 */
  1080. U32 Checksum; /* 0x04 */
  1081. U32 ImageSize; /* 0x08 */
  1082. U32 NextImageHeaderOffset; /* 0x0C */
  1083. U32 PackageVersion; /* 0x10 */
  1084. U32 Reserved3; /* 0x14 */
  1085. U32 Reserved4; /* 0x18 */
  1086. U32 Reserved5; /* 0x1C */
  1087. U8 IdentifyString[32]; /* 0x20 */
  1088. } MPI2_EXT_IMAGE_HEADER, MPI2_POINTER PTR_MPI2_EXT_IMAGE_HEADER,
  1089. Mpi2ExtImageHeader_t, MPI2_POINTER pMpi2ExtImageHeader_t;
  1090. /* useful offsets */
  1091. #define MPI2_EXT_IMAGE_IMAGETYPE_OFFSET (0x00)
  1092. #define MPI2_EXT_IMAGE_IMAGESIZE_OFFSET (0x08)
  1093. #define MPI2_EXT_IMAGE_NEXTIMAGE_OFFSET (0x0C)
  1094. #define MPI2_EXT_IMAGE_HEADER_SIZE (0x40)
  1095. /* defines for the ImageType field */
  1096. #define MPI2_EXT_IMAGE_TYPE_UNSPECIFIED (0x00)
  1097. #define MPI2_EXT_IMAGE_TYPE_FW (0x01)
  1098. #define MPI2_EXT_IMAGE_TYPE_NVDATA (0x03)
  1099. #define MPI2_EXT_IMAGE_TYPE_BOOTLOADER (0x04)
  1100. #define MPI2_EXT_IMAGE_TYPE_INITIALIZATION (0x05)
  1101. #define MPI2_EXT_IMAGE_TYPE_FLASH_LAYOUT (0x06)
  1102. #define MPI2_EXT_IMAGE_TYPE_SUPPORTED_DEVICES (0x07)
  1103. #define MPI2_EXT_IMAGE_TYPE_MEGARAID (0x08)
  1104. #define MPI2_EXT_IMAGE_TYPE_MAX (MPI2_EXT_IMAGE_TYPE_MEGARAID)
  1105. /* FLASH Layout Extended Image Data */
  1106. /*
  1107. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1108. * one and check RegionsPerLayout at runtime.
  1109. */
  1110. #ifndef MPI2_FLASH_NUMBER_OF_REGIONS
  1111. #define MPI2_FLASH_NUMBER_OF_REGIONS (1)
  1112. #endif
  1113. /*
  1114. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1115. * one and check NumberOfLayouts at runtime.
  1116. */
  1117. #ifndef MPI2_FLASH_NUMBER_OF_LAYOUTS
  1118. #define MPI2_FLASH_NUMBER_OF_LAYOUTS (1)
  1119. #endif
  1120. typedef struct _MPI2_FLASH_REGION
  1121. {
  1122. U8 RegionType; /* 0x00 */
  1123. U8 Reserved1; /* 0x01 */
  1124. U16 Reserved2; /* 0x02 */
  1125. U32 RegionOffset; /* 0x04 */
  1126. U32 RegionSize; /* 0x08 */
  1127. U32 Reserved3; /* 0x0C */
  1128. } MPI2_FLASH_REGION, MPI2_POINTER PTR_MPI2_FLASH_REGION,
  1129. Mpi2FlashRegion_t, MPI2_POINTER pMpi2FlashRegion_t;
  1130. typedef struct _MPI2_FLASH_LAYOUT
  1131. {
  1132. U32 FlashSize; /* 0x00 */
  1133. U32 Reserved1; /* 0x04 */
  1134. U32 Reserved2; /* 0x08 */
  1135. U32 Reserved3; /* 0x0C */
  1136. MPI2_FLASH_REGION Region[MPI2_FLASH_NUMBER_OF_REGIONS];/* 0x10 */
  1137. } MPI2_FLASH_LAYOUT, MPI2_POINTER PTR_MPI2_FLASH_LAYOUT,
  1138. Mpi2FlashLayout_t, MPI2_POINTER pMpi2FlashLayout_t;
  1139. typedef struct _MPI2_FLASH_LAYOUT_DATA
  1140. {
  1141. U8 ImageRevision; /* 0x00 */
  1142. U8 Reserved1; /* 0x01 */
  1143. U8 SizeOfRegion; /* 0x02 */
  1144. U8 Reserved2; /* 0x03 */
  1145. U16 NumberOfLayouts; /* 0x04 */
  1146. U16 RegionsPerLayout; /* 0x06 */
  1147. U16 MinimumSectorAlignment; /* 0x08 */
  1148. U16 Reserved3; /* 0x0A */
  1149. U32 Reserved4; /* 0x0C */
  1150. MPI2_FLASH_LAYOUT Layout[MPI2_FLASH_NUMBER_OF_LAYOUTS];/* 0x10 */
  1151. } MPI2_FLASH_LAYOUT_DATA, MPI2_POINTER PTR_MPI2_FLASH_LAYOUT_DATA,
  1152. Mpi2FlashLayoutData_t, MPI2_POINTER pMpi2FlashLayoutData_t;
  1153. /* defines for the RegionType field */
  1154. #define MPI2_FLASH_REGION_UNUSED (0x00)
  1155. #define MPI2_FLASH_REGION_FIRMWARE (0x01)
  1156. #define MPI2_FLASH_REGION_BIOS (0x02)
  1157. #define MPI2_FLASH_REGION_NVDATA (0x03)
  1158. #define MPI2_FLASH_REGION_FIRMWARE_BACKUP (0x05)
  1159. #define MPI2_FLASH_REGION_MFG_INFORMATION (0x06)
  1160. #define MPI2_FLASH_REGION_CONFIG_1 (0x07)
  1161. #define MPI2_FLASH_REGION_CONFIG_2 (0x08)
  1162. #define MPI2_FLASH_REGION_MEGARAID (0x09)
  1163. #define MPI2_FLASH_REGION_INIT (0x0A)
  1164. /* ImageRevision */
  1165. #define MPI2_FLASH_LAYOUT_IMAGE_REVISION (0x00)
  1166. /* Supported Devices Extended Image Data */
  1167. /*
  1168. * Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1169. * one and check NumberOfDevices at runtime.
  1170. */
  1171. #ifndef MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES
  1172. #define MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES (1)
  1173. #endif
  1174. typedef struct _MPI2_SUPPORTED_DEVICE
  1175. {
  1176. U16 DeviceID; /* 0x00 */
  1177. U16 VendorID; /* 0x02 */
  1178. U16 DeviceIDMask; /* 0x04 */
  1179. U16 Reserved1; /* 0x06 */
  1180. U8 LowPCIRev; /* 0x08 */
  1181. U8 HighPCIRev; /* 0x09 */
  1182. U16 Reserved2; /* 0x0A */
  1183. U32 Reserved3; /* 0x0C */
  1184. } MPI2_SUPPORTED_DEVICE, MPI2_POINTER PTR_MPI2_SUPPORTED_DEVICE,
  1185. Mpi2SupportedDevice_t, MPI2_POINTER pMpi2SupportedDevice_t;
  1186. typedef struct _MPI2_SUPPORTED_DEVICES_DATA
  1187. {
  1188. U8 ImageRevision; /* 0x00 */
  1189. U8 Reserved1; /* 0x01 */
  1190. U8 NumberOfDevices; /* 0x02 */
  1191. U8 Reserved2; /* 0x03 */
  1192. U32 Reserved3; /* 0x04 */
  1193. MPI2_SUPPORTED_DEVICE SupportedDevice[MPI2_SUPPORTED_DEVICES_IMAGE_NUM_DEVICES]; /* 0x08 */
  1194. } MPI2_SUPPORTED_DEVICES_DATA, MPI2_POINTER PTR_MPI2_SUPPORTED_DEVICES_DATA,
  1195. Mpi2SupportedDevicesData_t, MPI2_POINTER pMpi2SupportedDevicesData_t;
  1196. /* ImageRevision */
  1197. #define MPI2_SUPPORTED_DEVICES_IMAGE_REVISION (0x00)
  1198. /* Init Extended Image Data */
  1199. typedef struct _MPI2_INIT_IMAGE_FOOTER
  1200. {
  1201. U32 BootFlags; /* 0x00 */
  1202. U32 ImageSize; /* 0x04 */
  1203. U32 Signature0; /* 0x08 */
  1204. U32 Signature1; /* 0x0C */
  1205. U32 Signature2; /* 0x10 */
  1206. U32 ResetVector; /* 0x14 */
  1207. } MPI2_INIT_IMAGE_FOOTER, MPI2_POINTER PTR_MPI2_INIT_IMAGE_FOOTER,
  1208. Mpi2InitImageFooter_t, MPI2_POINTER pMpi2InitImageFooter_t;
  1209. /* defines for the BootFlags field */
  1210. #define MPI2_INIT_IMAGE_BOOTFLAGS_OFFSET (0x00)
  1211. /* defines for the ImageSize field */
  1212. #define MPI2_INIT_IMAGE_IMAGESIZE_OFFSET (0x04)
  1213. /* defines for the Signature0 field */
  1214. #define MPI2_INIT_IMAGE_SIGNATURE0_OFFSET (0x08)
  1215. #define MPI2_INIT_IMAGE_SIGNATURE0 (0x5AA55AEA)
  1216. /* defines for the Signature1 field */
  1217. #define MPI2_INIT_IMAGE_SIGNATURE1_OFFSET (0x0C)
  1218. #define MPI2_INIT_IMAGE_SIGNATURE1 (0xA55AEAA5)
  1219. /* defines for the Signature2 field */
  1220. #define MPI2_INIT_IMAGE_SIGNATURE2_OFFSET (0x10)
  1221. #define MPI2_INIT_IMAGE_SIGNATURE2 (0x5AEAA55A)
  1222. /* Signature fields as individual bytes */
  1223. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_0 (0xEA)
  1224. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_1 (0x5A)
  1225. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_2 (0xA5)
  1226. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_3 (0x5A)
  1227. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_4 (0xA5)
  1228. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_5 (0xEA)
  1229. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_6 (0x5A)
  1230. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_7 (0xA5)
  1231. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_8 (0x5A)
  1232. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_9 (0xA5)
  1233. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_A (0xEA)
  1234. #define MPI2_INIT_IMAGE_SIGNATURE_BYTE_B (0x5A)
  1235. /* defines for the ResetVector field */
  1236. #define MPI2_INIT_IMAGE_RESETVECTOR_OFFSET (0x14)
  1237. /****************************************************************************
  1238. * PowerManagementControl message
  1239. ****************************************************************************/
  1240. /* PowerManagementControl Request message */
  1241. typedef struct _MPI2_PWR_MGMT_CONTROL_REQUEST {
  1242. U8 Feature; /* 0x00 */
  1243. U8 Reserved1; /* 0x01 */
  1244. U8 ChainOffset; /* 0x02 */
  1245. U8 Function; /* 0x03 */
  1246. U16 Reserved2; /* 0x04 */
  1247. U8 Reserved3; /* 0x06 */
  1248. U8 MsgFlags; /* 0x07 */
  1249. U8 VP_ID; /* 0x08 */
  1250. U8 VF_ID; /* 0x09 */
  1251. U16 Reserved4; /* 0x0A */
  1252. U8 Parameter1; /* 0x0C */
  1253. U8 Parameter2; /* 0x0D */
  1254. U8 Parameter3; /* 0x0E */
  1255. U8 Parameter4; /* 0x0F */
  1256. U32 Reserved5; /* 0x10 */
  1257. U32 Reserved6; /* 0x14 */
  1258. } MPI2_PWR_MGMT_CONTROL_REQUEST, MPI2_POINTER PTR_MPI2_PWR_MGMT_CONTROL_REQUEST,
  1259. Mpi2PwrMgmtControlRequest_t, MPI2_POINTER pMpi2PwrMgmtControlRequest_t;
  1260. /* defines for the Feature field */
  1261. #define MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND (0x01)
  1262. #define MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION (0x02)
  1263. #define MPI2_PM_CONTROL_FEATURE_PCIE_LINK (0x03)
  1264. #define MPI2_PM_CONTROL_FEATURE_IOC_SPEED (0x04)
  1265. #define MPI2_PM_CONTROL_FEATURE_MIN_PRODUCT_SPECIFIC (0x80)
  1266. #define MPI2_PM_CONTROL_FEATURE_MAX_PRODUCT_SPECIFIC (0xFF)
  1267. /* parameter usage for the MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND Feature */
  1268. /* Parameter1 contains a PHY number */
  1269. /* Parameter2 indicates power condition action using these defines */
  1270. #define MPI2_PM_CONTROL_PARAM2_PARTIAL (0x01)
  1271. #define MPI2_PM_CONTROL_PARAM2_SLUMBER (0x02)
  1272. #define MPI2_PM_CONTROL_PARAM2_EXIT_PWR_MGMT (0x03)
  1273. /* Parameter3 and Parameter4 are reserved */
  1274. /* parameter usage for the MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION
  1275. * Feature */
  1276. /* Parameter1 contains SAS port width modulation group number */
  1277. /* Parameter2 indicates IOC action using these defines */
  1278. #define MPI2_PM_CONTROL_PARAM2_REQUEST_OWNERSHIP (0x01)
  1279. #define MPI2_PM_CONTROL_PARAM2_CHANGE_MODULATION (0x02)
  1280. #define MPI2_PM_CONTROL_PARAM2_RELINQUISH_OWNERSHIP (0x03)
  1281. /* Parameter3 indicates desired modulation level using these defines */
  1282. #define MPI2_PM_CONTROL_PARAM3_25_PERCENT (0x00)
  1283. #define MPI2_PM_CONTROL_PARAM3_50_PERCENT (0x01)
  1284. #define MPI2_PM_CONTROL_PARAM3_75_PERCENT (0x02)
  1285. #define MPI2_PM_CONTROL_PARAM3_100_PERCENT (0x03)
  1286. /* Parameter4 is reserved */
  1287. /* parameter usage for the MPI2_PM_CONTROL_FEATURE_PCIE_LINK Feature */
  1288. /* Parameter1 indicates desired PCIe link speed using these defines */
  1289. #define MPI2_PM_CONTROL_PARAM1_PCIE_2_5_GBPS (0x00)
  1290. #define MPI2_PM_CONTROL_PARAM1_PCIE_5_0_GBPS (0x01)
  1291. #define MPI2_PM_CONTROL_PARAM1_PCIE_8_0_GBPS (0x02)
  1292. /* Parameter2 indicates desired PCIe link width using these defines */
  1293. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X1 (0x01)
  1294. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X2 (0x02)
  1295. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X4 (0x04)
  1296. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X8 (0x08)
  1297. /* Parameter3 and Parameter4 are reserved */
  1298. /* parameter usage for the MPI2_PM_CONTROL_FEATURE_IOC_SPEED Feature */
  1299. /* Parameter1 indicates desired IOC hardware clock speed using these defines */
  1300. #define MPI2_PM_CONTROL_PARAM1_FULL_IOC_SPEED (0x01)
  1301. #define MPI2_PM_CONTROL_PARAM1_HALF_IOC_SPEED (0x02)
  1302. #define MPI2_PM_CONTROL_PARAM1_QUARTER_IOC_SPEED (0x04)
  1303. #define MPI2_PM_CONTROL_PARAM1_EIGHTH_IOC_SPEED (0x08)
  1304. /* Parameter2, Parameter3, and Parameter4 are reserved */
  1305. /* PowerManagementControl Reply message */
  1306. typedef struct _MPI2_PWR_MGMT_CONTROL_REPLY {
  1307. U8 Feature; /* 0x00 */
  1308. U8 Reserved1; /* 0x01 */
  1309. U8 MsgLength; /* 0x02 */
  1310. U8 Function; /* 0x03 */
  1311. U16 Reserved2; /* 0x04 */
  1312. U8 Reserved3; /* 0x06 */
  1313. U8 MsgFlags; /* 0x07 */
  1314. U8 VP_ID; /* 0x08 */
  1315. U8 VF_ID; /* 0x09 */
  1316. U16 Reserved4; /* 0x0A */
  1317. U16 Reserved5; /* 0x0C */
  1318. U16 IOCStatus; /* 0x0E */
  1319. U32 IOCLogInfo; /* 0x10 */
  1320. } MPI2_PWR_MGMT_CONTROL_REPLY, MPI2_POINTER PTR_MPI2_PWR_MGMT_CONTROL_REPLY,
  1321. Mpi2PwrMgmtControlReply_t, MPI2_POINTER pMpi2PwrMgmtControlReply_t;
  1322. #endif