mpi2_ioc.h 82 KB

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