mpi2_ioc.h 76 KB

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