mpi2_ioc.h 82 KB

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