mpi2_ioc.h 76 KB

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