mpi2_ioc.h 73 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright 2000-2020 Broadcom Inc. All rights reserved.
  4. *
  5. *
  6. * Name: mpi2_ioc.h
  7. * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
  8. * Creation Date: October 11, 2006
  9. *
  10. * mpi2_ioc.h Version: 02.00.37
  11. *
  12. * NOTE: Names (typedefs, defines, etc.) beginning with an MPI25 or Mpi25
  13. * prefix are for use only on MPI v2.5 products, and must not be used
  14. * with MPI v2.0 products. Unless otherwise noted, names beginning with
  15. * MPI2 or Mpi2 are for use with both MPI v2.0 and MPI v2.5 products.
  16. *
  17. * Version History
  18. * ---------------
  19. *
  20. * Date Version Description
  21. * -------- -------- ------------------------------------------------------
  22. * 04-30-07 02.00.00 Corresponds to Fusion-MPT MPI Specification Rev A.
  23. * 06-04-07 02.00.01 In IOCFacts Reply structure, renamed MaxDevices to
  24. * MaxTargets.
  25. * Added TotalImageSize field to FWDownload Request.
  26. * Added reserved words to FWUpload Request.
  27. * 06-26-07 02.00.02 Added IR Configuration Change List Event.
  28. * 08-31-07 02.00.03 Removed SystemReplyQueueDepth field from the IOCInit
  29. * request and replaced it with
  30. * ReplyDescriptorPostQueueDepth and ReplyFreeQueueDepth.
  31. * Replaced the MinReplyQueueDepth field of the IOCFacts
  32. * reply with MaxReplyDescriptorPostQueueDepth.
  33. * Added MPI2_RDPQ_DEPTH_MIN define to specify the minimum
  34. * depth for the Reply Descriptor Post Queue.
  35. * Added SASAddress field to Initiator Device Table
  36. * Overflow Event data.
  37. * 10-31-07 02.00.04 Added ReasonCode MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING
  38. * for SAS Initiator Device Status Change Event data.
  39. * Modified Reason Code defines for SAS Topology Change
  40. * List Event data, including adding a bit for PHY Vacant
  41. * status, and adding a mask for the Reason Code.
  42. * Added define for
  43. * MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING.
  44. * Added define for MPI2_EXT_IMAGE_TYPE_MEGARAID.
  45. * 12-18-07 02.00.05 Added Boot Status defines for the IOCExceptions field of
  46. * the IOCFacts Reply.
  47. * Removed MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  48. * Moved MPI2_VERSION_UNION to mpi2.h.
  49. * Changed MPI2_EVENT_NOTIFICATION_REQUEST to use masks
  50. * instead of enables, and added SASBroadcastPrimitiveMasks
  51. * field.
  52. * Added Log Entry Added Event and related structure.
  53. * 02-29-08 02.00.06 Added define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID.
  54. * Removed define MPI2_IOCFACTS_PROTOCOL_SMP_TARGET.
  55. * Added MaxVolumes and MaxPersistentEntries fields to
  56. * IOCFacts reply.
  57. * Added ProtocalFlags and IOCCapabilities fields to
  58. * MPI2_FW_IMAGE_HEADER.
  59. * Removed MPI2_PORTENABLE_FLAGS_ENABLE_SINGLE_PORT.
  60. * 03-03-08 02.00.07 Fixed MPI2_FW_IMAGE_HEADER by changing Reserved26 to
  61. * a U16 (from a U32).
  62. * Removed extra 's' from EventMasks name.
  63. * 06-27-08 02.00.08 Fixed an offset in a comment.
  64. * 10-02-08 02.00.09 Removed SystemReplyFrameSize from MPI2_IOC_INIT_REQUEST.
  65. * Removed CurReplyFrameSize from MPI2_IOC_FACTS_REPLY and
  66. * renamed MinReplyFrameSize to ReplyFrameSize.
  67. * Added MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX.
  68. * Added two new RAIDOperation values for Integrated RAID
  69. * Operations Status Event data.
  70. * Added four new IR Configuration Change List Event data
  71. * ReasonCode values.
  72. * Added two new ReasonCode defines for SAS Device Status
  73. * Change Event data.
  74. * Added three new DiscoveryStatus bits for the SAS
  75. * Discovery event data.
  76. * Added Multiplexing Status Change bit to the PhyStatus
  77. * field of the SAS Topology Change List event data.
  78. * Removed define for MPI2_INIT_IMAGE_BOOTFLAGS_XMEMCOPY.
  79. * BootFlags are now product-specific.
  80. * Added defines for the indivdual signature bytes
  81. * for MPI2_INIT_IMAGE_FOOTER.
  82. * 01-19-09 02.00.10 Added MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY define.
  83. * Added MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR
  84. * define.
  85. * Added MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE
  86. * define.
  87. * Removed MPI2_EVENT_SAS_DISC_DS_SATA_INIT_FAILURE define.
  88. * 05-06-09 02.00.11 Added MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR define.
  89. * Added MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX define.
  90. * Added two new reason codes for SAS Device Status Change
  91. * Event.
  92. * Added new event: SAS PHY Counter.
  93. * 07-30-09 02.00.12 Added GPIO Interrupt event define and structure.
  94. * Added MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER define.
  95. * Added new product id family for 2208.
  96. * 10-28-09 02.00.13 Added HostMSIxVectors field to MPI2_IOC_INIT_REQUEST.
  97. * Added MaxMSIxVectors field to MPI2_IOC_FACTS_REPLY.
  98. * Added MinDevHandle field to MPI2_IOC_FACTS_REPLY.
  99. * Added MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY.
  100. * Added MPI2_EVENT_HOST_BASED_DISCOVERY_PHY define.
  101. * Added MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER define.
  102. * Added Host Based Discovery Phy Event data.
  103. * Added defines for ProductID Product field
  104. * (MPI2_FW_HEADER_PID_).
  105. * Modified values for SAS ProductID Family
  106. * (MPI2_FW_HEADER_PID_FAMILY_).
  107. * 02-10-10 02.00.14 Added SAS Quiesce Event structure and defines.
  108. * Added PowerManagementControl Request structures and
  109. * defines.
  110. * 05-12-10 02.00.15 Marked Task Set Full Event as obsolete.
  111. * Added MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY define.
  112. * 11-10-10 02.00.16 Added MPI2_FW_DOWNLOAD_ITYPE_MIN_PRODUCT_SPECIFIC.
  113. * 02-23-11 02.00.17 Added SAS NOTIFY Primitive event, and added
  114. * SASNotifyPrimitiveMasks field to
  115. * MPI2_EVENT_NOTIFICATION_REQUEST.
  116. * Added Temperature Threshold Event.
  117. * Added Host Message Event.
  118. * Added Send Host Message request and reply.
  119. * 05-25-11 02.00.18 For Extended Image Header, added
  120. * MPI2_EXT_IMAGE_TYPE_MIN_PRODUCT_SPECIFIC and
  121. * MPI2_EXT_IMAGE_TYPE_MAX_PRODUCT_SPECIFIC defines.
  122. * Deprecated MPI2_EXT_IMAGE_TYPE_MAX define.
  123. * 08-24-11 02.00.19 Added PhysicalPort field to
  124. * MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE structure.
  125. * Marked MPI2_PM_CONTROL_FEATURE_PCIE_LINK as obsolete.
  126. * 11-18-11 02.00.20 Incorporating additions for MPI v2.5.
  127. * 03-29-12 02.00.21 Added a product specific range to event values.
  128. * 07-26-12 02.00.22 Added MPI2_IOCFACTS_EXCEPT_PARTIAL_MEMORY_FAILURE.
  129. * Added ElapsedSeconds field to
  130. * MPI2_EVENT_DATA_IR_OPERATION_STATUS.
  131. * 08-19-13 02.00.23 For IOCInit, added MPI2_IOCINIT_MSGFLAG_RDPQ_ARRAY_MODE
  132. * and MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY.
  133. * Added MPI2_IOCFACTS_CAPABILITY_RDPQ_ARRAY_CAPABLE.
  134. * Added MPI2_FW_DOWNLOAD_ITYPE_PUBLIC_KEY.
  135. * Added Encrypted Hash Extended Image.
  136. * 12-05-13 02.00.24 Added MPI25_HASH_IMAGE_TYPE_BIOS.
  137. * 11-18-14 02.00.25 Updated copyright information.
  138. * 03-16-15 02.00.26 Updated for MPI v2.6.
  139. * Added MPI2_EVENT_ACTIVE_CABLE_EXCEPTION and
  140. * MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT.
  141. * Added MPI26_FW_HEADER_PID_FAMILY_3324_SAS and
  142. * MPI26_FW_HEADER_PID_FAMILY_3516_SAS.
  143. * Added MPI26_CTRL_OP_SHUTDOWN.
  144. * 08-25-15 02.00.27 Added IC ARCH Class based signature defines.
  145. * Added MPI26_EVENT_PCIE_ENUM_ES_RESOURCES_EXHAUSTED event.
  146. * Added ConigurationFlags field to IOCInit message to
  147. * support NVMe SGL format control.
  148. * Added PCIe SRIOV support.
  149. * 02-17-16 02.00.28 Added SAS 4 22.5 gbs speed support.
  150. * Added PCIe 4 16.0 GT/sec speec support.
  151. * Removed AHCI support.
  152. * Removed SOP support.
  153. * 07-01-16 02.00.29 Added Archclass for 4008 product.
  154. * Added IOCException MPI2_IOCFACTS_EXCEPT_PCIE_DISABLED
  155. * 08-23-16 02.00.30 Added new defines for the ImageType field of FWDownload
  156. * Request Message.
  157. * Added new defines for the ImageType field of FWUpload
  158. * Request Message.
  159. * Added new values for the RegionType field in the Layout
  160. * Data sections of the FLASH Layout Extended Image Data.
  161. * Added new defines for the ReasonCode field of
  162. * Active Cable Exception Event.
  163. * Added MPI2_EVENT_ENCL_DEVICE_STATUS_CHANGE and
  164. * MPI26_EVENT_DATA_ENCL_DEV_STATUS_CHANGE.
  165. * 11-23-16 02.00.31 Added MPI2_EVENT_SAS_DEVICE_DISCOVERY_ERROR and
  166. * MPI25_EVENT_DATA_SAS_DEVICE_DISCOVERY_ERROR.
  167. * 02-02-17 02.00.32 Added MPI2_FW_DOWNLOAD_ITYPE_CBB_BACKUP.
  168. * Added MPI25_EVENT_DATA_ACTIVE_CABLE_EXCEPT and related
  169. * defines for the ReasonCode field.
  170. * 06-13-17 02.00.33 Added MPI2_FW_DOWNLOAD_ITYPE_CPLD.
  171. * 09-29-17 02.00.34 Added MPI26_EVENT_PCIDEV_STAT_RC_PCIE_HOT_RESET_FAILED
  172. * to the ReasonCode field in PCIe Device Status Change
  173. * Event Data.
  174. * 07-22-18 02.00.35 Added FW_DOWNLOAD_ITYPE_CPLD and _PSOC.
  175. * Moved FW image definitions ionto new mpi2_image,h
  176. * 08-14-18 02.00.36 Fixed definition of MPI2_FW_DOWNLOAD_ITYPE_PSOC (0x16)
  177. * 09-07-18 02.00.37 Added MPI26_EVENT_PCIE_TOPO_PI_16_LANES
  178. * 10-02-19 02.00.38 Added MPI26_IOCINIT_CFGFLAGS_COREDUMP_ENABLE
  179. * Added MPI26_IOCFACTS_CAPABILITY_COREDUMP_ENABLED
  180. * Added MPI2_FW_DOWNLOAD_ITYPE_COREDUMP
  181. * Added MPI2_FW_UPLOAD_ITYPE_COREDUMP
  182. * --------------------------------------------------------------------------
  183. */
  184. #ifndef MPI2_IOC_H
  185. #define MPI2_IOC_H
  186. /*****************************************************************************
  187. *
  188. * IOC Messages
  189. *
  190. *****************************************************************************/
  191. /****************************************************************************
  192. * IOCInit message
  193. ****************************************************************************/
  194. /*IOCInit Request message */
  195. typedef struct _MPI2_IOC_INIT_REQUEST {
  196. U8 WhoInit; /*0x00 */
  197. U8 Reserved1; /*0x01 */
  198. U8 ChainOffset; /*0x02 */
  199. U8 Function; /*0x03 */
  200. U16 Reserved2; /*0x04 */
  201. U8 Reserved3; /*0x06 */
  202. U8 MsgFlags; /*0x07 */
  203. U8 VP_ID; /*0x08 */
  204. U8 VF_ID; /*0x09 */
  205. U16 Reserved4; /*0x0A */
  206. U16 MsgVersion; /*0x0C */
  207. U16 HeaderVersion; /*0x0E */
  208. U32 Reserved5; /*0x10 */
  209. U16 ConfigurationFlags; /* 0x14 */
  210. U8 HostPageSize; /*0x16 */
  211. U8 HostMSIxVectors; /*0x17 */
  212. U16 Reserved8; /*0x18 */
  213. U16 SystemRequestFrameSize; /*0x1A */
  214. U16 ReplyDescriptorPostQueueDepth; /*0x1C */
  215. U16 ReplyFreeQueueDepth; /*0x1E */
  216. U32 SenseBufferAddressHigh; /*0x20 */
  217. U32 SystemReplyAddressHigh; /*0x24 */
  218. U64 SystemRequestFrameBaseAddress; /*0x28 */
  219. U64 ReplyDescriptorPostQueueAddress; /*0x30 */
  220. U64 ReplyFreeQueueAddress; /*0x38 */
  221. U64 TimeStamp; /*0x40 */
  222. } MPI2_IOC_INIT_REQUEST, *PTR_MPI2_IOC_INIT_REQUEST,
  223. Mpi2IOCInitRequest_t, *pMpi2IOCInitRequest_t;
  224. /*WhoInit values */
  225. #define MPI2_WHOINIT_NOT_INITIALIZED (0x00)
  226. #define MPI2_WHOINIT_SYSTEM_BIOS (0x01)
  227. #define MPI2_WHOINIT_ROM_BIOS (0x02)
  228. #define MPI2_WHOINIT_PCI_PEER (0x03)
  229. #define MPI2_WHOINIT_HOST_DRIVER (0x04)
  230. #define MPI2_WHOINIT_MANUFACTURER (0x05)
  231. /* MsgFlags */
  232. #define MPI2_IOCINIT_MSGFLAG_RDPQ_ARRAY_MODE (0x01)
  233. /*MsgVersion */
  234. #define MPI2_IOCINIT_MSGVERSION_MAJOR_MASK (0xFF00)
  235. #define MPI2_IOCINIT_MSGVERSION_MAJOR_SHIFT (8)
  236. #define MPI2_IOCINIT_MSGVERSION_MINOR_MASK (0x00FF)
  237. #define MPI2_IOCINIT_MSGVERSION_MINOR_SHIFT (0)
  238. /*HeaderVersion */
  239. #define MPI2_IOCINIT_HDRVERSION_UNIT_MASK (0xFF00)
  240. #define MPI2_IOCINIT_HDRVERSION_UNIT_SHIFT (8)
  241. #define MPI2_IOCINIT_HDRVERSION_DEV_MASK (0x00FF)
  242. #define MPI2_IOCINIT_HDRVERSION_DEV_SHIFT (0)
  243. /*ConfigurationFlags */
  244. #define MPI26_IOCINIT_CFGFLAGS_NVME_SGL_FORMAT (0x0001)
  245. #define MPI26_IOCINIT_CFGFLAGS_COREDUMP_ENABLE (0x0002)
  246. /*minimum depth for a Reply Descriptor Post Queue */
  247. #define MPI2_RDPQ_DEPTH_MIN (16)
  248. /* Reply Descriptor Post Queue Array Entry */
  249. typedef struct _MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY {
  250. U64 RDPQBaseAddress; /* 0x00 */
  251. U32 Reserved1; /* 0x08 */
  252. U32 Reserved2; /* 0x0C */
  253. } MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY,
  254. *PTR_MPI2_IOC_INIT_RDPQ_ARRAY_ENTRY,
  255. Mpi2IOCInitRDPQArrayEntry, *pMpi2IOCInitRDPQArrayEntry;
  256. /*IOCInit Reply message */
  257. typedef struct _MPI2_IOC_INIT_REPLY {
  258. U8 WhoInit; /*0x00 */
  259. U8 Reserved1; /*0x01 */
  260. U8 MsgLength; /*0x02 */
  261. U8 Function; /*0x03 */
  262. U16 Reserved2; /*0x04 */
  263. U8 Reserved3; /*0x06 */
  264. U8 MsgFlags; /*0x07 */
  265. U8 VP_ID; /*0x08 */
  266. U8 VF_ID; /*0x09 */
  267. U16 Reserved4; /*0x0A */
  268. U16 Reserved5; /*0x0C */
  269. U16 IOCStatus; /*0x0E */
  270. U32 IOCLogInfo; /*0x10 */
  271. } MPI2_IOC_INIT_REPLY, *PTR_MPI2_IOC_INIT_REPLY,
  272. Mpi2IOCInitReply_t, *pMpi2IOCInitReply_t;
  273. /****************************************************************************
  274. * IOCFacts message
  275. ****************************************************************************/
  276. /*IOCFacts Request message */
  277. typedef struct _MPI2_IOC_FACTS_REQUEST {
  278. U16 Reserved1; /*0x00 */
  279. U8 ChainOffset; /*0x02 */
  280. U8 Function; /*0x03 */
  281. U16 Reserved2; /*0x04 */
  282. U8 Reserved3; /*0x06 */
  283. U8 MsgFlags; /*0x07 */
  284. U8 VP_ID; /*0x08 */
  285. U8 VF_ID; /*0x09 */
  286. U16 Reserved4; /*0x0A */
  287. } MPI2_IOC_FACTS_REQUEST, *PTR_MPI2_IOC_FACTS_REQUEST,
  288. Mpi2IOCFactsRequest_t, *pMpi2IOCFactsRequest_t;
  289. /*IOCFacts Reply message */
  290. typedef struct _MPI2_IOC_FACTS_REPLY {
  291. U16 MsgVersion; /*0x00 */
  292. U8 MsgLength; /*0x02 */
  293. U8 Function; /*0x03 */
  294. U16 HeaderVersion; /*0x04 */
  295. U8 IOCNumber; /*0x06 */
  296. U8 MsgFlags; /*0x07 */
  297. U8 VP_ID; /*0x08 */
  298. U8 VF_ID; /*0x09 */
  299. U16 Reserved1; /*0x0A */
  300. U16 IOCExceptions; /*0x0C */
  301. U16 IOCStatus; /*0x0E */
  302. U32 IOCLogInfo; /*0x10 */
  303. U8 MaxChainDepth; /*0x14 */
  304. U8 WhoInit; /*0x15 */
  305. U8 NumberOfPorts; /*0x16 */
  306. U8 MaxMSIxVectors; /*0x17 */
  307. U16 RequestCredit; /*0x18 */
  308. U16 ProductID; /*0x1A */
  309. U32 IOCCapabilities; /*0x1C */
  310. MPI2_VERSION_UNION FWVersion; /*0x20 */
  311. U16 IOCRequestFrameSize; /*0x24 */
  312. U16 IOCMaxChainSegmentSize; /*0x26 */
  313. U16 MaxInitiators; /*0x28 */
  314. U16 MaxTargets; /*0x2A */
  315. U16 MaxSasExpanders; /*0x2C */
  316. U16 MaxEnclosures; /*0x2E */
  317. U16 ProtocolFlags; /*0x30 */
  318. U16 HighPriorityCredit; /*0x32 */
  319. U16 MaxReplyDescriptorPostQueueDepth; /*0x34 */
  320. U8 ReplyFrameSize; /*0x36 */
  321. U8 MaxVolumes; /*0x37 */
  322. U16 MaxDevHandle; /*0x38 */
  323. U16 MaxPersistentEntries; /*0x3A */
  324. U16 MinDevHandle; /*0x3C */
  325. U8 CurrentHostPageSize; /* 0x3E */
  326. U8 Reserved4; /* 0x3F */
  327. U8 SGEModifierMask; /*0x40 */
  328. U8 SGEModifierValue; /*0x41 */
  329. U8 SGEModifierShift; /*0x42 */
  330. U8 Reserved5; /*0x43 */
  331. } MPI2_IOC_FACTS_REPLY, *PTR_MPI2_IOC_FACTS_REPLY,
  332. Mpi2IOCFactsReply_t, *pMpi2IOCFactsReply_t;
  333. /*MsgVersion */
  334. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
  335. #define MPI2_IOCFACTS_MSGVERSION_MAJOR_SHIFT (8)
  336. #define MPI2_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
  337. #define MPI2_IOCFACTS_MSGVERSION_MINOR_SHIFT (0)
  338. /*HeaderVersion */
  339. #define MPI2_IOCFACTS_HDRVERSION_UNIT_MASK (0xFF00)
  340. #define MPI2_IOCFACTS_HDRVERSION_UNIT_SHIFT (8)
  341. #define MPI2_IOCFACTS_HDRVERSION_DEV_MASK (0x00FF)
  342. #define MPI2_IOCFACTS_HDRVERSION_DEV_SHIFT (0)
  343. /*IOCExceptions */
  344. #define MPI2_IOCFACTS_EXCEPT_PCIE_DISABLED (0x0400)
  345. #define MPI2_IOCFACTS_EXCEPT_PARTIAL_MEMORY_FAILURE (0x0200)
  346. #define MPI2_IOCFACTS_EXCEPT_IR_FOREIGN_CONFIG_MAX (0x0100)
  347. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_MASK (0x00E0)
  348. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_GOOD (0x0000)
  349. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_BACKUP (0x0020)
  350. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_RESTORED (0x0040)
  351. #define MPI2_IOCFACTS_EXCEPT_BOOTSTAT_CORRUPT_BACKUP (0x0060)
  352. #define MPI2_IOCFACTS_EXCEPT_METADATA_UNSUPPORTED (0x0010)
  353. #define MPI2_IOCFACTS_EXCEPT_MANUFACT_CHECKSUM_FAIL (0x0008)
  354. #define MPI2_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
  355. #define MPI2_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
  356. #define MPI2_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
  357. /*defines for WhoInit field are after the IOCInit Request */
  358. /*ProductID field uses MPI2_FW_HEADER_PID_ */
  359. /*IOCCapabilities */
  360. #define MPI26_IOCFACTS_CAPABILITY_COREDUMP_ENABLED (0x00200000)
  361. #define MPI26_IOCFACTS_CAPABILITY_PCIE_SRIOV (0x00100000)
  362. #define MPI26_IOCFACTS_CAPABILITY_ATOMIC_REQ (0x00080000)
  363. #define MPI2_IOCFACTS_CAPABILITY_RDPQ_ARRAY_CAPABLE (0x00040000)
  364. #define MPI25_IOCFACTS_CAPABILITY_FAST_PATH_CAPABLE (0x00020000)
  365. #define MPI2_IOCFACTS_CAPABILITY_HOST_BASED_DISCOVERY (0x00010000)
  366. #define MPI2_IOCFACTS_CAPABILITY_MSI_X_INDEX (0x00008000)
  367. #define MPI2_IOCFACTS_CAPABILITY_RAID_ACCELERATOR (0x00004000)
  368. #define MPI2_IOCFACTS_CAPABILITY_EVENT_REPLAY (0x00002000)
  369. #define MPI2_IOCFACTS_CAPABILITY_INTEGRATED_RAID (0x00001000)
  370. #define MPI2_IOCFACTS_CAPABILITY_TLR (0x00000800)
  371. #define MPI2_IOCFACTS_CAPABILITY_MULTICAST (0x00000100)
  372. #define MPI2_IOCFACTS_CAPABILITY_BIDIRECTIONAL_TARGET (0x00000080)
  373. #define MPI2_IOCFACTS_CAPABILITY_EEDP (0x00000040)
  374. #define MPI2_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
  375. #define MPI2_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
  376. #define MPI2_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
  377. #define MPI2_IOCFACTS_CAPABILITY_TASK_SET_FULL_HANDLING (0x00000004)
  378. /*ProtocolFlags */
  379. #define MPI2_IOCFACTS_PROTOCOL_NVME_DEVICES (0x0008)
  380. #define MPI2_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002)
  381. #define MPI2_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001)
  382. /****************************************************************************
  383. * PortFacts message
  384. ****************************************************************************/
  385. /*PortFacts Request message */
  386. typedef struct _MPI2_PORT_FACTS_REQUEST {
  387. U16 Reserved1; /*0x00 */
  388. U8 ChainOffset; /*0x02 */
  389. U8 Function; /*0x03 */
  390. U16 Reserved2; /*0x04 */
  391. U8 PortNumber; /*0x06 */
  392. U8 MsgFlags; /*0x07 */
  393. U8 VP_ID; /*0x08 */
  394. U8 VF_ID; /*0x09 */
  395. U16 Reserved3; /*0x0A */
  396. } MPI2_PORT_FACTS_REQUEST, *PTR_MPI2_PORT_FACTS_REQUEST,
  397. Mpi2PortFactsRequest_t, *pMpi2PortFactsRequest_t;
  398. /*PortFacts Reply message */
  399. typedef struct _MPI2_PORT_FACTS_REPLY {
  400. U16 Reserved1; /*0x00 */
  401. U8 MsgLength; /*0x02 */
  402. U8 Function; /*0x03 */
  403. U16 Reserved2; /*0x04 */
  404. U8 PortNumber; /*0x06 */
  405. U8 MsgFlags; /*0x07 */
  406. U8 VP_ID; /*0x08 */
  407. U8 VF_ID; /*0x09 */
  408. U16 Reserved3; /*0x0A */
  409. U16 Reserved4; /*0x0C */
  410. U16 IOCStatus; /*0x0E */
  411. U32 IOCLogInfo; /*0x10 */
  412. U8 Reserved5; /*0x14 */
  413. U8 PortType; /*0x15 */
  414. U16 Reserved6; /*0x16 */
  415. U16 MaxPostedCmdBuffers; /*0x18 */
  416. U16 Reserved7; /*0x1A */
  417. } MPI2_PORT_FACTS_REPLY, *PTR_MPI2_PORT_FACTS_REPLY,
  418. Mpi2PortFactsReply_t, *pMpi2PortFactsReply_t;
  419. /*PortType values */
  420. #define MPI2_PORTFACTS_PORTTYPE_INACTIVE (0x00)
  421. #define MPI2_PORTFACTS_PORTTYPE_FC (0x10)
  422. #define MPI2_PORTFACTS_PORTTYPE_ISCSI (0x20)
  423. #define MPI2_PORTFACTS_PORTTYPE_SAS_PHYSICAL (0x30)
  424. #define MPI2_PORTFACTS_PORTTYPE_SAS_VIRTUAL (0x31)
  425. #define MPI2_PORTFACTS_PORTTYPE_TRI_MODE (0x40)
  426. /****************************************************************************
  427. * PortEnable message
  428. ****************************************************************************/
  429. /*PortEnable Request message */
  430. typedef struct _MPI2_PORT_ENABLE_REQUEST {
  431. U16 Reserved1; /*0x00 */
  432. U8 ChainOffset; /*0x02 */
  433. U8 Function; /*0x03 */
  434. U8 Reserved2; /*0x04 */
  435. U8 PortFlags; /*0x05 */
  436. U8 Reserved3; /*0x06 */
  437. U8 MsgFlags; /*0x07 */
  438. U8 VP_ID; /*0x08 */
  439. U8 VF_ID; /*0x09 */
  440. U16 Reserved4; /*0x0A */
  441. } MPI2_PORT_ENABLE_REQUEST, *PTR_MPI2_PORT_ENABLE_REQUEST,
  442. Mpi2PortEnableRequest_t, *pMpi2PortEnableRequest_t;
  443. /*PortEnable Reply message */
  444. typedef struct _MPI2_PORT_ENABLE_REPLY {
  445. U16 Reserved1; /*0x00 */
  446. U8 MsgLength; /*0x02 */
  447. U8 Function; /*0x03 */
  448. U8 Reserved2; /*0x04 */
  449. U8 PortFlags; /*0x05 */
  450. U8 Reserved3; /*0x06 */
  451. U8 MsgFlags; /*0x07 */
  452. U8 VP_ID; /*0x08 */
  453. U8 VF_ID; /*0x09 */
  454. U16 Reserved4; /*0x0A */
  455. U16 Reserved5; /*0x0C */
  456. U16 IOCStatus; /*0x0E */
  457. U32 IOCLogInfo; /*0x10 */
  458. } MPI2_PORT_ENABLE_REPLY, *PTR_MPI2_PORT_ENABLE_REPLY,
  459. Mpi2PortEnableReply_t, *pMpi2PortEnableReply_t;
  460. /****************************************************************************
  461. * EventNotification message
  462. ****************************************************************************/
  463. /*EventNotification Request message */
  464. #define MPI2_EVENT_NOTIFY_EVENTMASK_WORDS (4)
  465. typedef struct _MPI2_EVENT_NOTIFICATION_REQUEST {
  466. U16 Reserved1; /*0x00 */
  467. U8 ChainOffset; /*0x02 */
  468. U8 Function; /*0x03 */
  469. U16 Reserved2; /*0x04 */
  470. U8 Reserved3; /*0x06 */
  471. U8 MsgFlags; /*0x07 */
  472. U8 VP_ID; /*0x08 */
  473. U8 VF_ID; /*0x09 */
  474. U16 Reserved4; /*0x0A */
  475. U32 Reserved5; /*0x0C */
  476. U32 Reserved6; /*0x10 */
  477. U32 EventMasks[MPI2_EVENT_NOTIFY_EVENTMASK_WORDS]; /*0x14 */
  478. U16 SASBroadcastPrimitiveMasks; /*0x24 */
  479. U16 SASNotifyPrimitiveMasks; /*0x26 */
  480. U32 Reserved8; /*0x28 */
  481. } MPI2_EVENT_NOTIFICATION_REQUEST,
  482. *PTR_MPI2_EVENT_NOTIFICATION_REQUEST,
  483. Mpi2EventNotificationRequest_t,
  484. *pMpi2EventNotificationRequest_t;
  485. /*EventNotification Reply message */
  486. typedef struct _MPI2_EVENT_NOTIFICATION_REPLY {
  487. U16 EventDataLength; /*0x00 */
  488. U8 MsgLength; /*0x02 */
  489. U8 Function; /*0x03 */
  490. U16 Reserved1; /*0x04 */
  491. U8 AckRequired; /*0x06 */
  492. U8 MsgFlags; /*0x07 */
  493. U8 VP_ID; /*0x08 */
  494. U8 VF_ID; /*0x09 */
  495. U16 Reserved2; /*0x0A */
  496. U16 Reserved3; /*0x0C */
  497. U16 IOCStatus; /*0x0E */
  498. U32 IOCLogInfo; /*0x10 */
  499. U16 Event; /*0x14 */
  500. U16 Reserved4; /*0x16 */
  501. U32 EventContext; /*0x18 */
  502. U32 EventData[]; /*0x1C */
  503. } MPI2_EVENT_NOTIFICATION_REPLY, *PTR_MPI2_EVENT_NOTIFICATION_REPLY,
  504. Mpi2EventNotificationReply_t,
  505. *pMpi2EventNotificationReply_t;
  506. /*AckRequired */
  507. #define MPI2_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
  508. #define MPI2_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
  509. /*Event */
  510. #define MPI2_EVENT_LOG_DATA (0x0001)
  511. #define MPI2_EVENT_STATE_CHANGE (0x0002)
  512. #define MPI2_EVENT_HARD_RESET_RECEIVED (0x0005)
  513. #define MPI2_EVENT_EVENT_CHANGE (0x000A)
  514. #define MPI2_EVENT_TASK_SET_FULL (0x000E) /*obsolete */
  515. #define MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE (0x000F)
  516. #define MPI2_EVENT_IR_OPERATION_STATUS (0x0014)
  517. #define MPI2_EVENT_SAS_DISCOVERY (0x0016)
  518. #define MPI2_EVENT_SAS_BROADCAST_PRIMITIVE (0x0017)
  519. #define MPI2_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x0018)
  520. #define MPI2_EVENT_SAS_INIT_TABLE_OVERFLOW (0x0019)
  521. #define MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST (0x001C)
  522. #define MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE (0x001D)
  523. #define MPI2_EVENT_ENCL_DEVICE_STATUS_CHANGE (0x001D)
  524. #define MPI2_EVENT_IR_VOLUME (0x001E)
  525. #define MPI2_EVENT_IR_PHYSICAL_DISK (0x001F)
  526. #define MPI2_EVENT_IR_CONFIGURATION_CHANGE_LIST (0x0020)
  527. #define MPI2_EVENT_LOG_ENTRY_ADDED (0x0021)
  528. #define MPI2_EVENT_SAS_PHY_COUNTER (0x0022)
  529. #define MPI2_EVENT_GPIO_INTERRUPT (0x0023)
  530. #define MPI2_EVENT_HOST_BASED_DISCOVERY_PHY (0x0024)
  531. #define MPI2_EVENT_SAS_QUIESCE (0x0025)
  532. #define MPI2_EVENT_SAS_NOTIFY_PRIMITIVE (0x0026)
  533. #define MPI2_EVENT_TEMP_THRESHOLD (0x0027)
  534. #define MPI2_EVENT_HOST_MESSAGE (0x0028)
  535. #define MPI2_EVENT_POWER_PERFORMANCE_CHANGE (0x0029)
  536. #define MPI2_EVENT_PCIE_DEVICE_STATUS_CHANGE (0x0030)
  537. #define MPI2_EVENT_PCIE_ENUMERATION (0x0031)
  538. #define MPI2_EVENT_PCIE_TOPOLOGY_CHANGE_LIST (0x0032)
  539. #define MPI2_EVENT_PCIE_LINK_COUNTER (0x0033)
  540. #define MPI2_EVENT_ACTIVE_CABLE_EXCEPTION (0x0034)
  541. #define MPI2_EVENT_SAS_DEVICE_DISCOVERY_ERROR (0x0035)
  542. #define MPI2_EVENT_MIN_PRODUCT_SPECIFIC (0x006E)
  543. #define MPI2_EVENT_MAX_PRODUCT_SPECIFIC (0x007F)
  544. /*Log Entry Added Event data */
  545. /*the following structure matches MPI2_LOG_0_ENTRY in mpi2_cnfg.h */
  546. #define MPI2_EVENT_DATA_LOG_DATA_LENGTH (0x1C)
  547. typedef struct _MPI2_EVENT_DATA_LOG_ENTRY_ADDED {
  548. U64 TimeStamp; /*0x00 */
  549. U32 Reserved1; /*0x08 */
  550. U16 LogSequence; /*0x0C */
  551. U16 LogEntryQualifier; /*0x0E */
  552. U8 VP_ID; /*0x10 */
  553. U8 VF_ID; /*0x11 */
  554. U16 Reserved2; /*0x12 */
  555. U8 LogData[MPI2_EVENT_DATA_LOG_DATA_LENGTH]; /*0x14 */
  556. } MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  557. *PTR_MPI2_EVENT_DATA_LOG_ENTRY_ADDED,
  558. Mpi2EventDataLogEntryAdded_t,
  559. *pMpi2EventDataLogEntryAdded_t;
  560. /*GPIO Interrupt Event data */
  561. typedef struct _MPI2_EVENT_DATA_GPIO_INTERRUPT {
  562. U8 GPIONum; /*0x00 */
  563. U8 Reserved1; /*0x01 */
  564. U16 Reserved2; /*0x02 */
  565. } MPI2_EVENT_DATA_GPIO_INTERRUPT,
  566. *PTR_MPI2_EVENT_DATA_GPIO_INTERRUPT,
  567. Mpi2EventDataGpioInterrupt_t,
  568. *pMpi2EventDataGpioInterrupt_t;
  569. /*Temperature Threshold Event data */
  570. typedef struct _MPI2_EVENT_DATA_TEMPERATURE {
  571. U16 Status; /*0x00 */
  572. U8 SensorNum; /*0x02 */
  573. U8 Reserved1; /*0x03 */
  574. U16 CurrentTemperature; /*0x04 */
  575. U16 Reserved2; /*0x06 */
  576. U32 Reserved3; /*0x08 */
  577. U32 Reserved4; /*0x0C */
  578. } MPI2_EVENT_DATA_TEMPERATURE,
  579. *PTR_MPI2_EVENT_DATA_TEMPERATURE,
  580. Mpi2EventDataTemperature_t, *pMpi2EventDataTemperature_t;
  581. /*Temperature Threshold Event data Status bits */
  582. #define MPI2_EVENT_TEMPERATURE3_EXCEEDED (0x0008)
  583. #define MPI2_EVENT_TEMPERATURE2_EXCEEDED (0x0004)
  584. #define MPI2_EVENT_TEMPERATURE1_EXCEEDED (0x0002)
  585. #define MPI2_EVENT_TEMPERATURE0_EXCEEDED (0x0001)
  586. /*Host Message Event data */
  587. typedef struct _MPI2_EVENT_DATA_HOST_MESSAGE {
  588. U8 SourceVF_ID; /*0x00 */
  589. U8 Reserved1; /*0x01 */
  590. U16 Reserved2; /*0x02 */
  591. U32 Reserved3; /*0x04 */
  592. U32 HostData[]; /*0x08 */
  593. } MPI2_EVENT_DATA_HOST_MESSAGE, *PTR_MPI2_EVENT_DATA_HOST_MESSAGE,
  594. Mpi2EventDataHostMessage_t, *pMpi2EventDataHostMessage_t;
  595. /*Power Performance Change Event data */
  596. typedef struct _MPI2_EVENT_DATA_POWER_PERF_CHANGE {
  597. U8 CurrentPowerMode; /*0x00 */
  598. U8 PreviousPowerMode; /*0x01 */
  599. U16 Reserved1; /*0x02 */
  600. } MPI2_EVENT_DATA_POWER_PERF_CHANGE,
  601. *PTR_MPI2_EVENT_DATA_POWER_PERF_CHANGE,
  602. Mpi2EventDataPowerPerfChange_t,
  603. *pMpi2EventDataPowerPerfChange_t;
  604. /*defines for CurrentPowerMode and PreviousPowerMode fields */
  605. #define MPI2_EVENT_PM_INIT_MASK (0xC0)
  606. #define MPI2_EVENT_PM_INIT_UNAVAILABLE (0x00)
  607. #define MPI2_EVENT_PM_INIT_HOST (0x40)
  608. #define MPI2_EVENT_PM_INIT_IO_UNIT (0x80)
  609. #define MPI2_EVENT_PM_INIT_PCIE_DPA (0xC0)
  610. #define MPI2_EVENT_PM_MODE_MASK (0x07)
  611. #define MPI2_EVENT_PM_MODE_UNAVAILABLE (0x00)
  612. #define MPI2_EVENT_PM_MODE_UNKNOWN (0x01)
  613. #define MPI2_EVENT_PM_MODE_FULL_POWER (0x04)
  614. #define MPI2_EVENT_PM_MODE_REDUCED_POWER (0x05)
  615. #define MPI2_EVENT_PM_MODE_STANDBY (0x06)
  616. /* Active Cable Exception Event data */
  617. typedef struct _MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT {
  618. U32 ActiveCablePowerRequirement; /* 0x00 */
  619. U8 ReasonCode; /* 0x04 */
  620. U8 ReceptacleID; /* 0x05 */
  621. U16 Reserved1; /* 0x06 */
  622. } MPI25_EVENT_DATA_ACTIVE_CABLE_EXCEPT,
  623. *PTR_MPI25_EVENT_DATA_ACTIVE_CABLE_EXCEPT,
  624. Mpi25EventDataActiveCableExcept_t,
  625. *pMpi25EventDataActiveCableExcept_t,
  626. MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT,
  627. *PTR_MPI26_EVENT_DATA_ACTIVE_CABLE_EXCEPT,
  628. Mpi26EventDataActiveCableExcept_t,
  629. *pMpi26EventDataActiveCableExcept_t;
  630. /*MPI2.5 defines for the ReasonCode field */
  631. #define MPI25_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER (0x00)
  632. #define MPI25_EVENT_ACTIVE_CABLE_PRESENT (0x01)
  633. #define MPI25_EVENT_ACTIVE_CABLE_DEGRADED (0x02)
  634. /* defines for ReasonCode field */
  635. #define MPI26_EVENT_ACTIVE_CABLE_INSUFFICIENT_POWER (0x00)
  636. #define MPI26_EVENT_ACTIVE_CABLE_PRESENT (0x01)
  637. #define MPI26_EVENT_ACTIVE_CABLE_DEGRADED (0x02)
  638. /*Hard Reset Received Event data */
  639. typedef struct _MPI2_EVENT_DATA_HARD_RESET_RECEIVED {
  640. U8 Reserved1; /*0x00 */
  641. U8 Port; /*0x01 */
  642. U16 Reserved2; /*0x02 */
  643. } MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  644. *PTR_MPI2_EVENT_DATA_HARD_RESET_RECEIVED,
  645. Mpi2EventDataHardResetReceived_t,
  646. *pMpi2EventDataHardResetReceived_t;
  647. /*Task Set Full Event data */
  648. /* this event is obsolete */
  649. typedef struct _MPI2_EVENT_DATA_TASK_SET_FULL {
  650. U16 DevHandle; /*0x00 */
  651. U16 CurrentDepth; /*0x02 */
  652. } MPI2_EVENT_DATA_TASK_SET_FULL, *PTR_MPI2_EVENT_DATA_TASK_SET_FULL,
  653. Mpi2EventDataTaskSetFull_t, *pMpi2EventDataTaskSetFull_t;
  654. /*SAS Device Status Change Event data */
  655. typedef struct _MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE {
  656. U16 TaskTag; /*0x00 */
  657. U8 ReasonCode; /*0x02 */
  658. U8 PhysicalPort; /*0x03 */
  659. U8 ASC; /*0x04 */
  660. U8 ASCQ; /*0x05 */
  661. U16 DevHandle; /*0x06 */
  662. U32 Reserved2; /*0x08 */
  663. U64 SASAddress; /*0x0C */
  664. U8 LUN[8]; /*0x14 */
  665. } MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  666. *PTR_MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  667. Mpi2EventDataSasDeviceStatusChange_t,
  668. *pMpi2EventDataSasDeviceStatusChange_t;
  669. /*SAS Device Status Change Event data ReasonCode values */
  670. #define MPI2_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
  671. #define MPI2_EVENT_SAS_DEV_STAT_RC_UNSUPPORTED (0x07)
  672. #define MPI2_EVENT_SAS_DEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08)
  673. #define MPI2_EVENT_SAS_DEV_STAT_RC_TASK_ABORT_INTERNAL (0x09)
  674. #define MPI2_EVENT_SAS_DEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A)
  675. #define MPI2_EVENT_SAS_DEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
  676. #define MPI2_EVENT_SAS_DEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
  677. #define MPI2_EVENT_SAS_DEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
  678. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_INTERNAL_DEV_RESET (0x0E)
  679. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_TASK_ABORT_INTERNAL (0x0F)
  680. #define MPI2_EVENT_SAS_DEV_STAT_RC_SATA_INIT_FAILURE (0x10)
  681. #define MPI2_EVENT_SAS_DEV_STAT_RC_EXPANDER_REDUCED_FUNCTIONALITY (0x11)
  682. #define MPI2_EVENT_SAS_DEV_STAT_RC_CMP_EXPANDER_REDUCED_FUNCTIONALITY (0x12)
  683. /*Integrated RAID Operation Status Event data */
  684. typedef struct _MPI2_EVENT_DATA_IR_OPERATION_STATUS {
  685. U16 VolDevHandle; /*0x00 */
  686. U16 Reserved1; /*0x02 */
  687. U8 RAIDOperation; /*0x04 */
  688. U8 PercentComplete; /*0x05 */
  689. U16 Reserved2; /*0x06 */
  690. U32 ElapsedSeconds; /*0x08 */
  691. } MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  692. *PTR_MPI2_EVENT_DATA_IR_OPERATION_STATUS,
  693. Mpi2EventDataIrOperationStatus_t,
  694. *pMpi2EventDataIrOperationStatus_t;
  695. /*Integrated RAID Operation Status Event data RAIDOperation values */
  696. #define MPI2_EVENT_IR_RAIDOP_RESYNC (0x00)
  697. #define MPI2_EVENT_IR_RAIDOP_ONLINE_CAP_EXPANSION (0x01)
  698. #define MPI2_EVENT_IR_RAIDOP_CONSISTENCY_CHECK (0x02)
  699. #define MPI2_EVENT_IR_RAIDOP_BACKGROUND_INIT (0x03)
  700. #define MPI2_EVENT_IR_RAIDOP_MAKE_DATA_CONSISTENT (0x04)
  701. /*Integrated RAID Volume Event data */
  702. typedef struct _MPI2_EVENT_DATA_IR_VOLUME {
  703. U16 VolDevHandle; /*0x00 */
  704. U8 ReasonCode; /*0x02 */
  705. U8 Reserved1; /*0x03 */
  706. U32 NewValue; /*0x04 */
  707. U32 PreviousValue; /*0x08 */
  708. } MPI2_EVENT_DATA_IR_VOLUME, *PTR_MPI2_EVENT_DATA_IR_VOLUME,
  709. Mpi2EventDataIrVolume_t, *pMpi2EventDataIrVolume_t;
  710. /*Integrated RAID Volume Event data ReasonCode values */
  711. #define MPI2_EVENT_IR_VOLUME_RC_SETTINGS_CHANGED (0x01)
  712. #define MPI2_EVENT_IR_VOLUME_RC_STATUS_FLAGS_CHANGED (0x02)
  713. #define MPI2_EVENT_IR_VOLUME_RC_STATE_CHANGED (0x03)
  714. /*Integrated RAID Physical Disk Event data */
  715. typedef struct _MPI2_EVENT_DATA_IR_PHYSICAL_DISK {
  716. U16 Reserved1; /*0x00 */
  717. U8 ReasonCode; /*0x02 */
  718. U8 PhysDiskNum; /*0x03 */
  719. U16 PhysDiskDevHandle; /*0x04 */
  720. U16 Reserved2; /*0x06 */
  721. U16 Slot; /*0x08 */
  722. U16 EnclosureHandle; /*0x0A */
  723. U32 NewValue; /*0x0C */
  724. U32 PreviousValue; /*0x10 */
  725. } MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  726. *PTR_MPI2_EVENT_DATA_IR_PHYSICAL_DISK,
  727. Mpi2EventDataIrPhysicalDisk_t,
  728. *pMpi2EventDataIrPhysicalDisk_t;
  729. /*Integrated RAID Physical Disk Event data ReasonCode values */
  730. #define MPI2_EVENT_IR_PHYSDISK_RC_SETTINGS_CHANGED (0x01)
  731. #define MPI2_EVENT_IR_PHYSDISK_RC_STATUS_FLAGS_CHANGED (0x02)
  732. #define MPI2_EVENT_IR_PHYSDISK_RC_STATE_CHANGED (0x03)
  733. /*Integrated RAID Configuration Change List Event data */
  734. /*
  735. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  736. *one and check NumElements at runtime.
  737. */
  738. #ifndef MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT
  739. #define MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT (1)
  740. #endif
  741. typedef struct _MPI2_EVENT_IR_CONFIG_ELEMENT {
  742. U16 ElementFlags; /*0x00 */
  743. U16 VolDevHandle; /*0x02 */
  744. U8 ReasonCode; /*0x04 */
  745. U8 PhysDiskNum; /*0x05 */
  746. U16 PhysDiskDevHandle; /*0x06 */
  747. } MPI2_EVENT_IR_CONFIG_ELEMENT, *PTR_MPI2_EVENT_IR_CONFIG_ELEMENT,
  748. Mpi2EventIrConfigElement_t, *pMpi2EventIrConfigElement_t;
  749. /*IR Configuration Change List Event data ElementFlags values */
  750. #define MPI2_EVENT_IR_CHANGE_EFLAGS_ELEMENT_TYPE_MASK (0x000F)
  751. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLUME_ELEMENT (0x0000)
  752. #define MPI2_EVENT_IR_CHANGE_EFLAGS_VOLPHYSDISK_ELEMENT (0x0001)
  753. #define MPI2_EVENT_IR_CHANGE_EFLAGS_HOTSPARE_ELEMENT (0x0002)
  754. /*IR Configuration Change List Event data ReasonCode values */
  755. #define MPI2_EVENT_IR_CHANGE_RC_ADDED (0x01)
  756. #define MPI2_EVENT_IR_CHANGE_RC_REMOVED (0x02)
  757. #define MPI2_EVENT_IR_CHANGE_RC_NO_CHANGE (0x03)
  758. #define MPI2_EVENT_IR_CHANGE_RC_HIDE (0x04)
  759. #define MPI2_EVENT_IR_CHANGE_RC_UNHIDE (0x05)
  760. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_CREATED (0x06)
  761. #define MPI2_EVENT_IR_CHANGE_RC_VOLUME_DELETED (0x07)
  762. #define MPI2_EVENT_IR_CHANGE_RC_PD_CREATED (0x08)
  763. #define MPI2_EVENT_IR_CHANGE_RC_PD_DELETED (0x09)
  764. typedef struct _MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST {
  765. U8 NumElements; /*0x00 */
  766. U8 Reserved1; /*0x01 */
  767. U8 Reserved2; /*0x02 */
  768. U8 ConfigNum; /*0x03 */
  769. U32 Flags; /*0x04 */
  770. MPI2_EVENT_IR_CONFIG_ELEMENT
  771. ConfigElement[MPI2_EVENT_IR_CONFIG_ELEMENT_COUNT];/*0x08 */
  772. } MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  773. *PTR_MPI2_EVENT_DATA_IR_CONFIG_CHANGE_LIST,
  774. Mpi2EventDataIrConfigChangeList_t,
  775. *pMpi2EventDataIrConfigChangeList_t;
  776. /*IR Configuration Change List Event data Flags values */
  777. #define MPI2_EVENT_IR_CHANGE_FLAGS_FOREIGN_CONFIG (0x00000001)
  778. /*SAS Discovery Event data */
  779. typedef struct _MPI2_EVENT_DATA_SAS_DISCOVERY {
  780. U8 Flags; /*0x00 */
  781. U8 ReasonCode; /*0x01 */
  782. U8 PhysicalPort; /*0x02 */
  783. U8 Reserved1; /*0x03 */
  784. U32 DiscoveryStatus; /*0x04 */
  785. } MPI2_EVENT_DATA_SAS_DISCOVERY,
  786. *PTR_MPI2_EVENT_DATA_SAS_DISCOVERY,
  787. Mpi2EventDataSasDiscovery_t, *pMpi2EventDataSasDiscovery_t;
  788. /*SAS Discovery Event data Flags values */
  789. #define MPI2_EVENT_SAS_DISC_DEVICE_CHANGE (0x02)
  790. #define MPI2_EVENT_SAS_DISC_IN_PROGRESS (0x01)
  791. /*SAS Discovery Event data ReasonCode values */
  792. #define MPI2_EVENT_SAS_DISC_RC_STARTED (0x01)
  793. #define MPI2_EVENT_SAS_DISC_RC_COMPLETED (0x02)
  794. /*SAS Discovery Event data DiscoveryStatus values */
  795. #define MPI2_EVENT_SAS_DISC_DS_MAX_ENCLOSURES_EXCEED (0x80000000)
  796. #define MPI2_EVENT_SAS_DISC_DS_MAX_EXPANDERS_EXCEED (0x40000000)
  797. #define MPI2_EVENT_SAS_DISC_DS_MAX_DEVICES_EXCEED (0x20000000)
  798. #define MPI2_EVENT_SAS_DISC_DS_MAX_TOPO_PHYS_EXCEED (0x10000000)
  799. #define MPI2_EVENT_SAS_DISC_DS_DOWNSTREAM_INITIATOR (0x08000000)
  800. #define MPI2_EVENT_SAS_DISC_DS_MULTI_SUBTRACTIVE_SUBTRACTIVE (0x00008000)
  801. #define MPI2_EVENT_SAS_DISC_DS_EXP_MULTI_SUBTRACTIVE (0x00004000)
  802. #define MPI2_EVENT_SAS_DISC_DS_MULTI_PORT_DOMAIN (0x00002000)
  803. #define MPI2_EVENT_SAS_DISC_DS_TABLE_TO_SUBTRACTIVE_LINK (0x00001000)
  804. #define MPI2_EVENT_SAS_DISC_DS_UNSUPPORTED_DEVICE (0x00000800)
  805. #define MPI2_EVENT_SAS_DISC_DS_TABLE_LINK (0x00000400)
  806. #define MPI2_EVENT_SAS_DISC_DS_SUBTRACTIVE_LINK (0x00000200)
  807. #define MPI2_EVENT_SAS_DISC_DS_SMP_CRC_ERROR (0x00000100)
  808. #define MPI2_EVENT_SAS_DISC_DS_SMP_FUNCTION_FAILED (0x00000080)
  809. #define MPI2_EVENT_SAS_DISC_DS_INDEX_NOT_EXIST (0x00000040)
  810. #define MPI2_EVENT_SAS_DISC_DS_OUT_ROUTE_ENTRIES (0x00000020)
  811. #define MPI2_EVENT_SAS_DISC_DS_SMP_TIMEOUT (0x00000010)
  812. #define MPI2_EVENT_SAS_DISC_DS_MULTIPLE_PORTS (0x00000004)
  813. #define MPI2_EVENT_SAS_DISC_DS_UNADDRESSABLE_DEVICE (0x00000002)
  814. #define MPI2_EVENT_SAS_DISC_DS_LOOP_DETECTED (0x00000001)
  815. /*SAS Broadcast Primitive Event data */
  816. typedef struct _MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE {
  817. U8 PhyNum; /*0x00 */
  818. U8 Port; /*0x01 */
  819. U8 PortWidth; /*0x02 */
  820. U8 Primitive; /*0x03 */
  821. } MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  822. *PTR_MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE,
  823. Mpi2EventDataSasBroadcastPrimitive_t,
  824. *pMpi2EventDataSasBroadcastPrimitive_t;
  825. /*defines for the Primitive field */
  826. #define MPI2_EVENT_PRIMITIVE_CHANGE (0x01)
  827. #define MPI2_EVENT_PRIMITIVE_SES (0x02)
  828. #define MPI2_EVENT_PRIMITIVE_EXPANDER (0x03)
  829. #define MPI2_EVENT_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04)
  830. #define MPI2_EVENT_PRIMITIVE_RESERVED3 (0x05)
  831. #define MPI2_EVENT_PRIMITIVE_RESERVED4 (0x06)
  832. #define MPI2_EVENT_PRIMITIVE_CHANGE0_RESERVED (0x07)
  833. #define MPI2_EVENT_PRIMITIVE_CHANGE1_RESERVED (0x08)
  834. /*SAS Notify Primitive Event data */
  835. typedef struct _MPI2_EVENT_DATA_SAS_NOTIFY_PRIMITIVE {
  836. U8 PhyNum; /*0x00 */
  837. U8 Port; /*0x01 */
  838. U8 Reserved1; /*0x02 */
  839. U8 Primitive; /*0x03 */
  840. } MPI2_EVENT_DATA_SAS_NOTIFY_PRIMITIVE,
  841. *PTR_MPI2_EVENT_DATA_SAS_NOTIFY_PRIMITIVE,
  842. Mpi2EventDataSasNotifyPrimitive_t,
  843. *pMpi2EventDataSasNotifyPrimitive_t;
  844. /*defines for the Primitive field */
  845. #define MPI2_EVENT_NOTIFY_ENABLE_SPINUP (0x01)
  846. #define MPI2_EVENT_NOTIFY_POWER_LOSS_EXPECTED (0x02)
  847. #define MPI2_EVENT_NOTIFY_RESERVED1 (0x03)
  848. #define MPI2_EVENT_NOTIFY_RESERVED2 (0x04)
  849. /*SAS Initiator Device Status Change Event data */
  850. typedef struct _MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE {
  851. U8 ReasonCode; /*0x00 */
  852. U8 PhysicalPort; /*0x01 */
  853. U16 DevHandle; /*0x02 */
  854. U64 SASAddress; /*0x04 */
  855. } MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  856. *PTR_MPI2_EVENT_DATA_SAS_INIT_DEV_STATUS_CHANGE,
  857. Mpi2EventDataSasInitDevStatusChange_t,
  858. *pMpi2EventDataSasInitDevStatusChange_t;
  859. /*SAS Initiator Device Status Change event ReasonCode values */
  860. #define MPI2_EVENT_SAS_INIT_RC_ADDED (0x01)
  861. #define MPI2_EVENT_SAS_INIT_RC_NOT_RESPONDING (0x02)
  862. /*SAS Initiator Device Table Overflow Event data */
  863. typedef struct _MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW {
  864. U16 MaxInit; /*0x00 */
  865. U16 CurrentInit; /*0x02 */
  866. U64 SASAddress; /*0x04 */
  867. } MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  868. *PTR_MPI2_EVENT_DATA_SAS_INIT_TABLE_OVERFLOW,
  869. Mpi2EventDataSasInitTableOverflow_t,
  870. *pMpi2EventDataSasInitTableOverflow_t;
  871. /*SAS Topology Change List Event data */
  872. /*
  873. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  874. *one and check NumEntries at runtime.
  875. */
  876. #ifndef MPI2_EVENT_SAS_TOPO_PHY_COUNT
  877. #define MPI2_EVENT_SAS_TOPO_PHY_COUNT (1)
  878. #endif
  879. typedef struct _MPI2_EVENT_SAS_TOPO_PHY_ENTRY {
  880. U16 AttachedDevHandle; /*0x00 */
  881. U8 LinkRate; /*0x02 */
  882. U8 PhyStatus; /*0x03 */
  883. } MPI2_EVENT_SAS_TOPO_PHY_ENTRY, *PTR_MPI2_EVENT_SAS_TOPO_PHY_ENTRY,
  884. Mpi2EventSasTopoPhyEntry_t, *pMpi2EventSasTopoPhyEntry_t;
  885. typedef struct _MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST {
  886. U16 EnclosureHandle; /*0x00 */
  887. U16 ExpanderDevHandle; /*0x02 */
  888. U8 NumPhys; /*0x04 */
  889. U8 Reserved1; /*0x05 */
  890. U16 Reserved2; /*0x06 */
  891. U8 NumEntries; /*0x08 */
  892. U8 StartPhyNum; /*0x09 */
  893. U8 ExpStatus; /*0x0A */
  894. U8 PhysicalPort; /*0x0B */
  895. MPI2_EVENT_SAS_TOPO_PHY_ENTRY
  896. PHY[MPI2_EVENT_SAS_TOPO_PHY_COUNT]; /*0x0C */
  897. } MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  898. *PTR_MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST,
  899. Mpi2EventDataSasTopologyChangeList_t,
  900. *pMpi2EventDataSasTopologyChangeList_t;
  901. /*values for the ExpStatus field */
  902. #define MPI2_EVENT_SAS_TOPO_ES_NO_EXPANDER (0x00)
  903. #define MPI2_EVENT_SAS_TOPO_ES_ADDED (0x01)
  904. #define MPI2_EVENT_SAS_TOPO_ES_NOT_RESPONDING (0x02)
  905. #define MPI2_EVENT_SAS_TOPO_ES_RESPONDING (0x03)
  906. #define MPI2_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING (0x04)
  907. /*defines for the LinkRate field */
  908. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_MASK (0xF0)
  909. #define MPI2_EVENT_SAS_TOPO_LR_CURRENT_SHIFT (4)
  910. #define MPI2_EVENT_SAS_TOPO_LR_PREV_MASK (0x0F)
  911. #define MPI2_EVENT_SAS_TOPO_LR_PREV_SHIFT (0)
  912. #define MPI2_EVENT_SAS_TOPO_LR_UNKNOWN_LINK_RATE (0x00)
  913. #define MPI2_EVENT_SAS_TOPO_LR_PHY_DISABLED (0x01)
  914. #define MPI2_EVENT_SAS_TOPO_LR_NEGOTIATION_FAILED (0x02)
  915. #define MPI2_EVENT_SAS_TOPO_LR_SATA_OOB_COMPLETE (0x03)
  916. #define MPI2_EVENT_SAS_TOPO_LR_PORT_SELECTOR (0x04)
  917. #define MPI2_EVENT_SAS_TOPO_LR_SMP_RESET_IN_PROGRESS (0x05)
  918. #define MPI2_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY (0x06)
  919. #define MPI2_EVENT_SAS_TOPO_LR_RATE_1_5 (0x08)
  920. #define MPI2_EVENT_SAS_TOPO_LR_RATE_3_0 (0x09)
  921. #define MPI2_EVENT_SAS_TOPO_LR_RATE_6_0 (0x0A)
  922. #define MPI25_EVENT_SAS_TOPO_LR_RATE_12_0 (0x0B)
  923. #define MPI26_EVENT_SAS_TOPO_LR_RATE_22_5 (0x0C)
  924. /*values for the PhyStatus field */
  925. #define MPI2_EVENT_SAS_TOPO_PHYSTATUS_VACANT (0x80)
  926. #define MPI2_EVENT_SAS_TOPO_PS_MULTIPLEX_CHANGE (0x10)
  927. /*values for the PhyStatus ReasonCode sub-field */
  928. #define MPI2_EVENT_SAS_TOPO_RC_MASK (0x0F)
  929. #define MPI2_EVENT_SAS_TOPO_RC_TARG_ADDED (0x01)
  930. #define MPI2_EVENT_SAS_TOPO_RC_TARG_NOT_RESPONDING (0x02)
  931. #define MPI2_EVENT_SAS_TOPO_RC_PHY_CHANGED (0x03)
  932. #define MPI2_EVENT_SAS_TOPO_RC_NO_CHANGE (0x04)
  933. #define MPI2_EVENT_SAS_TOPO_RC_DELAY_NOT_RESPONDING (0x05)
  934. /*SAS Enclosure Device Status Change Event data */
  935. typedef struct _MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE {
  936. U16 EnclosureHandle; /*0x00 */
  937. U8 ReasonCode; /*0x02 */
  938. U8 PhysicalPort; /*0x03 */
  939. U64 EnclosureLogicalID; /*0x04 */
  940. U16 NumSlots; /*0x0C */
  941. U16 StartSlot; /*0x0E */
  942. U32 PhyBits; /*0x10 */
  943. } MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  944. *PTR_MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE,
  945. Mpi2EventDataSasEnclDevStatusChange_t,
  946. *pMpi2EventDataSasEnclDevStatusChange_t,
  947. MPI26_EVENT_DATA_ENCL_DEV_STATUS_CHANGE,
  948. *PTR_MPI26_EVENT_DATA_ENCL_DEV_STATUS_CHANGE,
  949. Mpi26EventDataEnclDevStatusChange_t,
  950. *pMpi26EventDataEnclDevStatusChange_t;
  951. /*SAS Enclosure Device Status Change event ReasonCode values */
  952. #define MPI2_EVENT_SAS_ENCL_RC_ADDED (0x01)
  953. #define MPI2_EVENT_SAS_ENCL_RC_NOT_RESPONDING (0x02)
  954. /*Enclosure Device Status Change event ReasonCode values */
  955. #define MPI26_EVENT_ENCL_RC_ADDED (0x01)
  956. #define MPI26_EVENT_ENCL_RC_NOT_RESPONDING (0x02)
  957. typedef struct _MPI25_EVENT_DATA_SAS_DEVICE_DISCOVERY_ERROR {
  958. U16 DevHandle; /*0x00 */
  959. U8 ReasonCode; /*0x02 */
  960. U8 PhysicalPort; /*0x03 */
  961. U32 Reserved1[2]; /*0x04 */
  962. U64 SASAddress; /*0x0C */
  963. U32 Reserved2[2]; /*0x14 */
  964. } MPI25_EVENT_DATA_SAS_DEVICE_DISCOVERY_ERROR,
  965. *PTR_MPI25_EVENT_DATA_SAS_DEVICE_DISCOVERY_ERROR,
  966. Mpi25EventDataSasDeviceDiscoveryError_t,
  967. *pMpi25EventDataSasDeviceDiscoveryError_t;
  968. /*SAS Device Discovery Error Event data ReasonCode values */
  969. #define MPI25_EVENT_SAS_DISC_ERR_SMP_FAILED (0x01)
  970. #define MPI25_EVENT_SAS_DISC_ERR_SMP_TIMEOUT (0x02)
  971. /*SAS PHY Counter Event data */
  972. typedef struct _MPI2_EVENT_DATA_SAS_PHY_COUNTER {
  973. U64 TimeStamp; /*0x00 */
  974. U32 Reserved1; /*0x08 */
  975. U8 PhyEventCode; /*0x0C */
  976. U8 PhyNum; /*0x0D */
  977. U16 Reserved2; /*0x0E */
  978. U32 PhyEventInfo; /*0x10 */
  979. U8 CounterType; /*0x14 */
  980. U8 ThresholdWindow; /*0x15 */
  981. U8 TimeUnits; /*0x16 */
  982. U8 Reserved3; /*0x17 */
  983. U32 EventThreshold; /*0x18 */
  984. U16 ThresholdFlags; /*0x1C */
  985. U16 Reserved4; /*0x1E */
  986. } MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  987. *PTR_MPI2_EVENT_DATA_SAS_PHY_COUNTER,
  988. Mpi2EventDataSasPhyCounter_t,
  989. *pMpi2EventDataSasPhyCounter_t;
  990. /*use MPI2_SASPHY3_EVENT_CODE_ values from mpi2_cnfg.h
  991. *for the PhyEventCode field */
  992. /*use MPI2_SASPHY3_COUNTER_TYPE_ values from mpi2_cnfg.h
  993. *for the CounterType field */
  994. /*use MPI2_SASPHY3_TIME_UNITS_ values from mpi2_cnfg.h
  995. *for the TimeUnits field */
  996. /*use MPI2_SASPHY3_TFLAGS_ values from mpi2_cnfg.h
  997. *for the ThresholdFlags field */
  998. /*SAS Quiesce Event data */
  999. typedef struct _MPI2_EVENT_DATA_SAS_QUIESCE {
  1000. U8 ReasonCode; /*0x00 */
  1001. U8 Reserved1; /*0x01 */
  1002. U16 Reserved2; /*0x02 */
  1003. U32 Reserved3; /*0x04 */
  1004. } MPI2_EVENT_DATA_SAS_QUIESCE,
  1005. *PTR_MPI2_EVENT_DATA_SAS_QUIESCE,
  1006. Mpi2EventDataSasQuiesce_t, *pMpi2EventDataSasQuiesce_t;
  1007. /*SAS Quiesce Event data ReasonCode values */
  1008. #define MPI2_EVENT_SAS_QUIESCE_RC_STARTED (0x01)
  1009. #define MPI2_EVENT_SAS_QUIESCE_RC_COMPLETED (0x02)
  1010. /*Host Based Discovery Phy Event data */
  1011. typedef struct _MPI2_EVENT_HBD_PHY_SAS {
  1012. U8 Flags; /*0x00 */
  1013. U8 NegotiatedLinkRate; /*0x01 */
  1014. U8 PhyNum; /*0x02 */
  1015. U8 PhysicalPort; /*0x03 */
  1016. U32 Reserved1; /*0x04 */
  1017. U8 InitialFrame[28]; /*0x08 */
  1018. } MPI2_EVENT_HBD_PHY_SAS, *PTR_MPI2_EVENT_HBD_PHY_SAS,
  1019. Mpi2EventHbdPhySas_t, *pMpi2EventHbdPhySas_t;
  1020. /*values for the Flags field */
  1021. #define MPI2_EVENT_HBD_SAS_FLAGS_FRAME_VALID (0x02)
  1022. #define MPI2_EVENT_HBD_SAS_FLAGS_SATA_FRAME (0x01)
  1023. /*use MPI2_SAS_NEG_LINK_RATE_ defines from mpi2_cnfg.h
  1024. *for the NegotiatedLinkRate field */
  1025. typedef union _MPI2_EVENT_HBD_DESCRIPTOR {
  1026. MPI2_EVENT_HBD_PHY_SAS Sas;
  1027. } MPI2_EVENT_HBD_DESCRIPTOR, *PTR_MPI2_EVENT_HBD_DESCRIPTOR,
  1028. Mpi2EventHbdDescriptor_t, *pMpi2EventHbdDescriptor_t;
  1029. typedef struct _MPI2_EVENT_DATA_HBD_PHY {
  1030. U8 DescriptorType; /*0x00 */
  1031. U8 Reserved1; /*0x01 */
  1032. U16 Reserved2; /*0x02 */
  1033. U32 Reserved3; /*0x04 */
  1034. MPI2_EVENT_HBD_DESCRIPTOR Descriptor; /*0x08 */
  1035. } MPI2_EVENT_DATA_HBD_PHY, *PTR_MPI2_EVENT_DATA_HBD_PHY,
  1036. Mpi2EventDataHbdPhy_t,
  1037. *pMpi2EventDataMpi2EventDataHbdPhy_t;
  1038. /*values for the DescriptorType field */
  1039. #define MPI2_EVENT_HBD_DT_SAS (0x01)
  1040. /*PCIe Device Status Change Event data (MPI v2.6 and later) */
  1041. typedef struct _MPI26_EVENT_DATA_PCIE_DEVICE_STATUS_CHANGE {
  1042. U16 TaskTag; /*0x00 */
  1043. U8 ReasonCode; /*0x02 */
  1044. U8 PhysicalPort; /*0x03 */
  1045. U8 ASC; /*0x04 */
  1046. U8 ASCQ; /*0x05 */
  1047. U16 DevHandle; /*0x06 */
  1048. U32 Reserved2; /*0x08 */
  1049. U64 WWID; /*0x0C */
  1050. U8 LUN[8]; /*0x14 */
  1051. } MPI26_EVENT_DATA_PCIE_DEVICE_STATUS_CHANGE,
  1052. *PTR_MPI26_EVENT_DATA_PCIE_DEVICE_STATUS_CHANGE,
  1053. Mpi26EventDataPCIeDeviceStatusChange_t,
  1054. *pMpi26EventDataPCIeDeviceStatusChange_t;
  1055. /*PCIe Device Status Change Event data ReasonCode values */
  1056. #define MPI26_EVENT_PCIDEV_STAT_RC_SMART_DATA (0x05)
  1057. #define MPI26_EVENT_PCIDEV_STAT_RC_UNSUPPORTED (0x07)
  1058. #define MPI26_EVENT_PCIDEV_STAT_RC_INTERNAL_DEVICE_RESET (0x08)
  1059. #define MPI26_EVENT_PCIDEV_STAT_RC_TASK_ABORT_INTERNAL (0x09)
  1060. #define MPI26_EVENT_PCIDEV_STAT_RC_ABORT_TASK_SET_INTERNAL (0x0A)
  1061. #define MPI26_EVENT_PCIDEV_STAT_RC_CLEAR_TASK_SET_INTERNAL (0x0B)
  1062. #define MPI26_EVENT_PCIDEV_STAT_RC_QUERY_TASK_INTERNAL (0x0C)
  1063. #define MPI26_EVENT_PCIDEV_STAT_RC_ASYNC_NOTIFICATION (0x0D)
  1064. #define MPI26_EVENT_PCIDEV_STAT_RC_CMP_INTERNAL_DEV_RESET (0x0E)
  1065. #define MPI26_EVENT_PCIDEV_STAT_RC_CMP_TASK_ABORT_INTERNAL (0x0F)
  1066. #define MPI26_EVENT_PCIDEV_STAT_RC_DEV_INIT_FAILURE (0x10)
  1067. #define MPI26_EVENT_PCIDEV_STAT_RC_PCIE_HOT_RESET_FAILED (0x11)
  1068. /*PCIe Enumeration Event data (MPI v2.6 and later) */
  1069. typedef struct _MPI26_EVENT_DATA_PCIE_ENUMERATION {
  1070. U8 Flags; /*0x00 */
  1071. U8 ReasonCode; /*0x01 */
  1072. U8 PhysicalPort; /*0x02 */
  1073. U8 Reserved1; /*0x03 */
  1074. U32 EnumerationStatus; /*0x04 */
  1075. } MPI26_EVENT_DATA_PCIE_ENUMERATION,
  1076. *PTR_MPI26_EVENT_DATA_PCIE_ENUMERATION,
  1077. Mpi26EventDataPCIeEnumeration_t,
  1078. *pMpi26EventDataPCIeEnumeration_t;
  1079. /*PCIe Enumeration Event data Flags values */
  1080. #define MPI26_EVENT_PCIE_ENUM_DEVICE_CHANGE (0x02)
  1081. #define MPI26_EVENT_PCIE_ENUM_IN_PROGRESS (0x01)
  1082. /*PCIe Enumeration Event data ReasonCode values */
  1083. #define MPI26_EVENT_PCIE_ENUM_RC_STARTED (0x01)
  1084. #define MPI26_EVENT_PCIE_ENUM_RC_COMPLETED (0x02)
  1085. /*PCIe Enumeration Event data EnumerationStatus values */
  1086. #define MPI26_EVENT_PCIE_ENUM_ES_MAX_SWITCHES_EXCEED (0x40000000)
  1087. #define MPI26_EVENT_PCIE_ENUM_ES_MAX_DEVICES_EXCEED (0x20000000)
  1088. #define MPI26_EVENT_PCIE_ENUM_ES_RESOURCES_EXHAUSTED (0x10000000)
  1089. /*PCIe Topology Change List Event data (MPI v2.6 and later) */
  1090. /*
  1091. *Host code (drivers, BIOS, utilities, etc.) should leave this define set to
  1092. *one and check NumEntries at runtime.
  1093. */
  1094. #ifndef MPI26_EVENT_PCIE_TOPO_PORT_COUNT
  1095. #define MPI26_EVENT_PCIE_TOPO_PORT_COUNT (1)
  1096. #endif
  1097. typedef struct _MPI26_EVENT_PCIE_TOPO_PORT_ENTRY {
  1098. U16 AttachedDevHandle; /*0x00 */
  1099. U8 PortStatus; /*0x02 */
  1100. U8 Reserved1; /*0x03 */
  1101. U8 CurrentPortInfo; /*0x04 */
  1102. U8 Reserved2; /*0x05 */
  1103. U8 PreviousPortInfo; /*0x06 */
  1104. U8 Reserved3; /*0x07 */
  1105. } MPI26_EVENT_PCIE_TOPO_PORT_ENTRY,
  1106. *PTR_MPI26_EVENT_PCIE_TOPO_PORT_ENTRY,
  1107. Mpi26EventPCIeTopoPortEntry_t,
  1108. *pMpi26EventPCIeTopoPortEntry_t;
  1109. /*PCIe Topology Change List Event data PortStatus values */
  1110. #define MPI26_EVENT_PCIE_TOPO_PS_DEV_ADDED (0x01)
  1111. #define MPI26_EVENT_PCIE_TOPO_PS_NOT_RESPONDING (0x02)
  1112. #define MPI26_EVENT_PCIE_TOPO_PS_PORT_CHANGED (0x03)
  1113. #define MPI26_EVENT_PCIE_TOPO_PS_NO_CHANGE (0x04)
  1114. #define MPI26_EVENT_PCIE_TOPO_PS_DELAY_NOT_RESPONDING (0x05)
  1115. /*PCIe Topology Change List Event data defines for CurrentPortInfo and
  1116. *PreviousPortInfo
  1117. */
  1118. #define MPI26_EVENT_PCIE_TOPO_PI_LANE_MASK (0xF0)
  1119. #define MPI26_EVENT_PCIE_TOPO_PI_LANES_UNKNOWN (0x00)
  1120. #define MPI26_EVENT_PCIE_TOPO_PI_1_LANE (0x10)
  1121. #define MPI26_EVENT_PCIE_TOPO_PI_2_LANES (0x20)
  1122. #define MPI26_EVENT_PCIE_TOPO_PI_4_LANES (0x30)
  1123. #define MPI26_EVENT_PCIE_TOPO_PI_8_LANES (0x40)
  1124. #define MPI26_EVENT_PCIE_TOPO_PI_16_LANES (0x50)
  1125. #define MPI26_EVENT_PCIE_TOPO_PI_RATE_MASK (0x0F)
  1126. #define MPI26_EVENT_PCIE_TOPO_PI_RATE_UNKNOWN (0x00)
  1127. #define MPI26_EVENT_PCIE_TOPO_PI_RATE_DISABLED (0x01)
  1128. #define MPI26_EVENT_PCIE_TOPO_PI_RATE_2_5 (0x02)
  1129. #define MPI26_EVENT_PCIE_TOPO_PI_RATE_5_0 (0x03)
  1130. #define MPI26_EVENT_PCIE_TOPO_PI_RATE_8_0 (0x04)
  1131. #define MPI26_EVENT_PCIE_TOPO_PI_RATE_16_0 (0x05)
  1132. typedef struct _MPI26_EVENT_DATA_PCIE_TOPOLOGY_CHANGE_LIST {
  1133. U16 EnclosureHandle; /*0x00 */
  1134. U16 SwitchDevHandle; /*0x02 */
  1135. U8 NumPorts; /*0x04 */
  1136. U8 Reserved1; /*0x05 */
  1137. U16 Reserved2; /*0x06 */
  1138. U8 NumEntries; /*0x08 */
  1139. U8 StartPortNum; /*0x09 */
  1140. U8 SwitchStatus; /*0x0A */
  1141. U8 PhysicalPort; /*0x0B */
  1142. MPI26_EVENT_PCIE_TOPO_PORT_ENTRY
  1143. PortEntry[MPI26_EVENT_PCIE_TOPO_PORT_COUNT]; /*0x0C */
  1144. } MPI26_EVENT_DATA_PCIE_TOPOLOGY_CHANGE_LIST,
  1145. *PTR_MPI26_EVENT_DATA_PCIE_TOPOLOGY_CHANGE_LIST,
  1146. Mpi26EventDataPCIeTopologyChangeList_t,
  1147. *pMpi26EventDataPCIeTopologyChangeList_t;
  1148. /*PCIe Topology Change List Event data SwitchStatus values */
  1149. #define MPI26_EVENT_PCIE_TOPO_SS_NO_PCIE_SWITCH (0x00)
  1150. #define MPI26_EVENT_PCIE_TOPO_SS_ADDED (0x01)
  1151. #define MPI26_EVENT_PCIE_TOPO_SS_NOT_RESPONDING (0x02)
  1152. #define MPI26_EVENT_PCIE_TOPO_SS_RESPONDING (0x03)
  1153. #define MPI26_EVENT_PCIE_TOPO_SS_DELAY_NOT_RESPONDING (0x04)
  1154. /*PCIe Link Counter Event data (MPI v2.6 and later) */
  1155. typedef struct _MPI26_EVENT_DATA_PCIE_LINK_COUNTER {
  1156. U64 TimeStamp; /*0x00 */
  1157. U32 Reserved1; /*0x08 */
  1158. U8 LinkEventCode; /*0x0C */
  1159. U8 LinkNum; /*0x0D */
  1160. U16 Reserved2; /*0x0E */
  1161. U32 LinkEventInfo; /*0x10 */
  1162. U8 CounterType; /*0x14 */
  1163. U8 ThresholdWindow; /*0x15 */
  1164. U8 TimeUnits; /*0x16 */
  1165. U8 Reserved3; /*0x17 */
  1166. U32 EventThreshold; /*0x18 */
  1167. U16 ThresholdFlags; /*0x1C */
  1168. U16 Reserved4; /*0x1E */
  1169. } MPI26_EVENT_DATA_PCIE_LINK_COUNTER,
  1170. *PTR_MPI26_EVENT_DATA_PCIE_LINK_COUNTER,
  1171. Mpi26EventDataPcieLinkCounter_t, *pMpi26EventDataPcieLinkCounter_t;
  1172. /*use MPI26_PCIELINK3_EVTCODE_ values from mpi2_cnfg.h for the LinkEventCode
  1173. *field
  1174. */
  1175. /*use MPI26_PCIELINK3_COUNTER_TYPE_ values from mpi2_cnfg.h for the CounterType
  1176. *field
  1177. */
  1178. /*use MPI26_PCIELINK3_TIME_UNITS_ values from mpi2_cnfg.h for the TimeUnits
  1179. *field
  1180. */
  1181. /*use MPI26_PCIELINK3_TFLAGS_ values from mpi2_cnfg.h for the ThresholdFlags
  1182. *field
  1183. */
  1184. /****************************************************************************
  1185. * EventAck message
  1186. ****************************************************************************/
  1187. /*EventAck Request message */
  1188. typedef struct _MPI2_EVENT_ACK_REQUEST {
  1189. U16 Reserved1; /*0x00 */
  1190. U8 ChainOffset; /*0x02 */
  1191. U8 Function; /*0x03 */
  1192. U16 Reserved2; /*0x04 */
  1193. U8 Reserved3; /*0x06 */
  1194. U8 MsgFlags; /*0x07 */
  1195. U8 VP_ID; /*0x08 */
  1196. U8 VF_ID; /*0x09 */
  1197. U16 Reserved4; /*0x0A */
  1198. U16 Event; /*0x0C */
  1199. U16 Reserved5; /*0x0E */
  1200. U32 EventContext; /*0x10 */
  1201. } MPI2_EVENT_ACK_REQUEST, *PTR_MPI2_EVENT_ACK_REQUEST,
  1202. Mpi2EventAckRequest_t, *pMpi2EventAckRequest_t;
  1203. /*EventAck Reply message */
  1204. typedef struct _MPI2_EVENT_ACK_REPLY {
  1205. U16 Reserved1; /*0x00 */
  1206. U8 MsgLength; /*0x02 */
  1207. U8 Function; /*0x03 */
  1208. U16 Reserved2; /*0x04 */
  1209. U8 Reserved3; /*0x06 */
  1210. U8 MsgFlags; /*0x07 */
  1211. U8 VP_ID; /*0x08 */
  1212. U8 VF_ID; /*0x09 */
  1213. U16 Reserved4; /*0x0A */
  1214. U16 Reserved5; /*0x0C */
  1215. U16 IOCStatus; /*0x0E */
  1216. U32 IOCLogInfo; /*0x10 */
  1217. } MPI2_EVENT_ACK_REPLY, *PTR_MPI2_EVENT_ACK_REPLY,
  1218. Mpi2EventAckReply_t, *pMpi2EventAckReply_t;
  1219. /****************************************************************************
  1220. * SendHostMessage message
  1221. ****************************************************************************/
  1222. /*SendHostMessage Request message */
  1223. typedef struct _MPI2_SEND_HOST_MESSAGE_REQUEST {
  1224. U16 HostDataLength; /*0x00 */
  1225. U8 ChainOffset; /*0x02 */
  1226. U8 Function; /*0x03 */
  1227. U16 Reserved1; /*0x04 */
  1228. U8 Reserved2; /*0x06 */
  1229. U8 MsgFlags; /*0x07 */
  1230. U8 VP_ID; /*0x08 */
  1231. U8 VF_ID; /*0x09 */
  1232. U16 Reserved3; /*0x0A */
  1233. U8 Reserved4; /*0x0C */
  1234. U8 DestVF_ID; /*0x0D */
  1235. U16 Reserved5; /*0x0E */
  1236. U32 Reserved6; /*0x10 */
  1237. U32 Reserved7; /*0x14 */
  1238. U32 Reserved8; /*0x18 */
  1239. U32 Reserved9; /*0x1C */
  1240. U32 Reserved10; /*0x20 */
  1241. U32 HostData[]; /*0x24 */
  1242. } MPI2_SEND_HOST_MESSAGE_REQUEST,
  1243. *PTR_MPI2_SEND_HOST_MESSAGE_REQUEST,
  1244. Mpi2SendHostMessageRequest_t,
  1245. *pMpi2SendHostMessageRequest_t;
  1246. /*SendHostMessage Reply message */
  1247. typedef struct _MPI2_SEND_HOST_MESSAGE_REPLY {
  1248. U16 HostDataLength; /*0x00 */
  1249. U8 MsgLength; /*0x02 */
  1250. U8 Function; /*0x03 */
  1251. U16 Reserved1; /*0x04 */
  1252. U8 Reserved2; /*0x06 */
  1253. U8 MsgFlags; /*0x07 */
  1254. U8 VP_ID; /*0x08 */
  1255. U8 VF_ID; /*0x09 */
  1256. U16 Reserved3; /*0x0A */
  1257. U16 Reserved4; /*0x0C */
  1258. U16 IOCStatus; /*0x0E */
  1259. U32 IOCLogInfo; /*0x10 */
  1260. } MPI2_SEND_HOST_MESSAGE_REPLY, *PTR_MPI2_SEND_HOST_MESSAGE_REPLY,
  1261. Mpi2SendHostMessageReply_t, *pMpi2SendHostMessageReply_t;
  1262. /****************************************************************************
  1263. * FWDownload message
  1264. ****************************************************************************/
  1265. /*MPI v2.0 FWDownload Request message */
  1266. typedef struct _MPI2_FW_DOWNLOAD_REQUEST {
  1267. U8 ImageType; /*0x00 */
  1268. U8 Reserved1; /*0x01 */
  1269. U8 ChainOffset; /*0x02 */
  1270. U8 Function; /*0x03 */
  1271. U16 Reserved2; /*0x04 */
  1272. U8 Reserved3; /*0x06 */
  1273. U8 MsgFlags; /*0x07 */
  1274. U8 VP_ID; /*0x08 */
  1275. U8 VF_ID; /*0x09 */
  1276. U16 Reserved4; /*0x0A */
  1277. U32 TotalImageSize; /*0x0C */
  1278. U32 Reserved5; /*0x10 */
  1279. MPI2_MPI_SGE_UNION SGL; /*0x14 */
  1280. } MPI2_FW_DOWNLOAD_REQUEST, *PTR_MPI2_FW_DOWNLOAD_REQUEST,
  1281. Mpi2FWDownloadRequest, *pMpi2FWDownloadRequest;
  1282. #define MPI2_FW_DOWNLOAD_MSGFLGS_LAST_SEGMENT (0x01)
  1283. #define MPI2_FW_DOWNLOAD_ITYPE_FW (0x01)
  1284. #define MPI2_FW_DOWNLOAD_ITYPE_BIOS (0x02)
  1285. #define MPI2_FW_DOWNLOAD_ITYPE_MANUFACTURING (0x06)
  1286. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_1 (0x07)
  1287. #define MPI2_FW_DOWNLOAD_ITYPE_CONFIG_2 (0x08)
  1288. #define MPI2_FW_DOWNLOAD_ITYPE_MEGARAID (0x09)
  1289. #define MPI2_FW_DOWNLOAD_ITYPE_COMPLETE (0x0A)
  1290. #define MPI2_FW_DOWNLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  1291. #define MPI2_FW_DOWNLOAD_ITYPE_PUBLIC_KEY (0x0C)
  1292. #define MPI2_FW_DOWNLOAD_ITYPE_CBB_BACKUP (0x0D)
  1293. #define MPI2_FW_DOWNLOAD_ITYPE_SBR (0x0E)
  1294. #define MPI2_FW_DOWNLOAD_ITYPE_SBR_BACKUP (0x0F)
  1295. #define MPI2_FW_DOWNLOAD_ITYPE_HIIM (0x10)
  1296. #define MPI2_FW_DOWNLOAD_ITYPE_HIIA (0x11)
  1297. #define MPI2_FW_DOWNLOAD_ITYPE_CTLR (0x12)
  1298. #define MPI2_FW_DOWNLOAD_ITYPE_IMR_FIRMWARE (0x13)
  1299. #define MPI2_FW_DOWNLOAD_ITYPE_MR_NVDATA (0x14)
  1300. /*MPI v2.6 and newer */
  1301. #define MPI2_FW_DOWNLOAD_ITYPE_CPLD (0x15)
  1302. #define MPI2_FW_DOWNLOAD_ITYPE_PSOC (0x16)
  1303. #define MPI2_FW_DOWNLOAD_ITYPE_COREDUMP (0x17)
  1304. #define MPI2_FW_DOWNLOAD_ITYPE_MIN_PRODUCT_SPECIFIC (0xF0)
  1305. /*MPI v2.0 FWDownload TransactionContext Element */
  1306. typedef struct _MPI2_FW_DOWNLOAD_TCSGE {
  1307. U8 Reserved1; /*0x00 */
  1308. U8 ContextSize; /*0x01 */
  1309. U8 DetailsLength; /*0x02 */
  1310. U8 Flags; /*0x03 */
  1311. U32 Reserved2; /*0x04 */
  1312. U32 ImageOffset; /*0x08 */
  1313. U32 ImageSize; /*0x0C */
  1314. } MPI2_FW_DOWNLOAD_TCSGE, *PTR_MPI2_FW_DOWNLOAD_TCSGE,
  1315. Mpi2FWDownloadTCSGE_t, *pMpi2FWDownloadTCSGE_t;
  1316. /*MPI v2.5 FWDownload Request message */
  1317. typedef struct _MPI25_FW_DOWNLOAD_REQUEST {
  1318. U8 ImageType; /*0x00 */
  1319. U8 Reserved1; /*0x01 */
  1320. U8 ChainOffset; /*0x02 */
  1321. U8 Function; /*0x03 */
  1322. U16 Reserved2; /*0x04 */
  1323. U8 Reserved3; /*0x06 */
  1324. U8 MsgFlags; /*0x07 */
  1325. U8 VP_ID; /*0x08 */
  1326. U8 VF_ID; /*0x09 */
  1327. U16 Reserved4; /*0x0A */
  1328. U32 TotalImageSize; /*0x0C */
  1329. U32 Reserved5; /*0x10 */
  1330. U32 Reserved6; /*0x14 */
  1331. U32 ImageOffset; /*0x18 */
  1332. U32 ImageSize; /*0x1C */
  1333. MPI25_SGE_IO_UNION SGL; /*0x20 */
  1334. } MPI25_FW_DOWNLOAD_REQUEST, *PTR_MPI25_FW_DOWNLOAD_REQUEST,
  1335. Mpi25FWDownloadRequest, *pMpi25FWDownloadRequest;
  1336. /*FWDownload Reply message */
  1337. typedef struct _MPI2_FW_DOWNLOAD_REPLY {
  1338. U8 ImageType; /*0x00 */
  1339. U8 Reserved1; /*0x01 */
  1340. U8 MsgLength; /*0x02 */
  1341. U8 Function; /*0x03 */
  1342. U16 Reserved2; /*0x04 */
  1343. U8 Reserved3; /*0x06 */
  1344. U8 MsgFlags; /*0x07 */
  1345. U8 VP_ID; /*0x08 */
  1346. U8 VF_ID; /*0x09 */
  1347. U16 Reserved4; /*0x0A */
  1348. U16 Reserved5; /*0x0C */
  1349. U16 IOCStatus; /*0x0E */
  1350. U32 IOCLogInfo; /*0x10 */
  1351. } MPI2_FW_DOWNLOAD_REPLY, *PTR_MPI2_FW_DOWNLOAD_REPLY,
  1352. Mpi2FWDownloadReply_t, *pMpi2FWDownloadReply_t;
  1353. /****************************************************************************
  1354. * FWUpload message
  1355. ****************************************************************************/
  1356. /*MPI v2.0 FWUpload Request message */
  1357. typedef struct _MPI2_FW_UPLOAD_REQUEST {
  1358. U8 ImageType; /*0x00 */
  1359. U8 Reserved1; /*0x01 */
  1360. U8 ChainOffset; /*0x02 */
  1361. U8 Function; /*0x03 */
  1362. U16 Reserved2; /*0x04 */
  1363. U8 Reserved3; /*0x06 */
  1364. U8 MsgFlags; /*0x07 */
  1365. U8 VP_ID; /*0x08 */
  1366. U8 VF_ID; /*0x09 */
  1367. U16 Reserved4; /*0x0A */
  1368. U32 Reserved5; /*0x0C */
  1369. U32 Reserved6; /*0x10 */
  1370. MPI2_MPI_SGE_UNION SGL; /*0x14 */
  1371. } MPI2_FW_UPLOAD_REQUEST, *PTR_MPI2_FW_UPLOAD_REQUEST,
  1372. Mpi2FWUploadRequest_t, *pMpi2FWUploadRequest_t;
  1373. #define MPI2_FW_UPLOAD_ITYPE_FW_CURRENT (0x00)
  1374. #define MPI2_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
  1375. #define MPI2_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
  1376. #define MPI2_FW_UPLOAD_ITYPE_FW_BACKUP (0x05)
  1377. #define MPI2_FW_UPLOAD_ITYPE_MANUFACTURING (0x06)
  1378. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_1 (0x07)
  1379. #define MPI2_FW_UPLOAD_ITYPE_CONFIG_2 (0x08)
  1380. #define MPI2_FW_UPLOAD_ITYPE_MEGARAID (0x09)
  1381. #define MPI2_FW_UPLOAD_ITYPE_COMPLETE (0x0A)
  1382. #define MPI2_FW_UPLOAD_ITYPE_COMMON_BOOT_BLOCK (0x0B)
  1383. #define MPI2_FW_UPLOAD_ITYPE_CBB_BACKUP (0x0D)
  1384. #define MPI2_FW_UPLOAD_ITYPE_SBR (0x0E)
  1385. #define MPI2_FW_UPLOAD_ITYPE_SBR_BACKUP (0x0F)
  1386. #define MPI2_FW_UPLOAD_ITYPE_HIIM (0x10)
  1387. #define MPI2_FW_UPLOAD_ITYPE_HIIA (0x11)
  1388. #define MPI2_FW_UPLOAD_ITYPE_CTLR (0x12)
  1389. #define MPI2_FW_UPLOAD_ITYPE_IMR_FIRMWARE (0x13)
  1390. #define MPI2_FW_UPLOAD_ITYPE_MR_NVDATA (0x14)
  1391. /*MPI v2.0 FWUpload TransactionContext Element */
  1392. typedef struct _MPI2_FW_UPLOAD_TCSGE {
  1393. U8 Reserved1; /*0x00 */
  1394. U8 ContextSize; /*0x01 */
  1395. U8 DetailsLength; /*0x02 */
  1396. U8 Flags; /*0x03 */
  1397. U32 Reserved2; /*0x04 */
  1398. U32 ImageOffset; /*0x08 */
  1399. U32 ImageSize; /*0x0C */
  1400. } MPI2_FW_UPLOAD_TCSGE, *PTR_MPI2_FW_UPLOAD_TCSGE,
  1401. Mpi2FWUploadTCSGE_t, *pMpi2FWUploadTCSGE_t;
  1402. /*MPI v2.5 FWUpload Request message */
  1403. typedef struct _MPI25_FW_UPLOAD_REQUEST {
  1404. U8 ImageType; /*0x00 */
  1405. U8 Reserved1; /*0x01 */
  1406. U8 ChainOffset; /*0x02 */
  1407. U8 Function; /*0x03 */
  1408. U16 Reserved2; /*0x04 */
  1409. U8 Reserved3; /*0x06 */
  1410. U8 MsgFlags; /*0x07 */
  1411. U8 VP_ID; /*0x08 */
  1412. U8 VF_ID; /*0x09 */
  1413. U16 Reserved4; /*0x0A */
  1414. U32 Reserved5; /*0x0C */
  1415. U32 Reserved6; /*0x10 */
  1416. U32 Reserved7; /*0x14 */
  1417. U32 ImageOffset; /*0x18 */
  1418. U32 ImageSize; /*0x1C */
  1419. MPI25_SGE_IO_UNION SGL; /*0x20 */
  1420. } MPI25_FW_UPLOAD_REQUEST, *PTR_MPI25_FW_UPLOAD_REQUEST,
  1421. Mpi25FWUploadRequest_t, *pMpi25FWUploadRequest_t;
  1422. /*FWUpload Reply message */
  1423. typedef struct _MPI2_FW_UPLOAD_REPLY {
  1424. U8 ImageType; /*0x00 */
  1425. U8 Reserved1; /*0x01 */
  1426. U8 MsgLength; /*0x02 */
  1427. U8 Function; /*0x03 */
  1428. U16 Reserved2; /*0x04 */
  1429. U8 Reserved3; /*0x06 */
  1430. U8 MsgFlags; /*0x07 */
  1431. U8 VP_ID; /*0x08 */
  1432. U8 VF_ID; /*0x09 */
  1433. U16 Reserved4; /*0x0A */
  1434. U16 Reserved5; /*0x0C */
  1435. U16 IOCStatus; /*0x0E */
  1436. U32 IOCLogInfo; /*0x10 */
  1437. U32 ActualImageSize; /*0x14 */
  1438. } MPI2_FW_UPLOAD_REPLY, *PTR_MPI2_FW_UPLOAD_REPLY,
  1439. Mpi2FWUploadReply_t, *pMPi2FWUploadReply_t;
  1440. /****************************************************************************
  1441. * PowerManagementControl message
  1442. ****************************************************************************/
  1443. /*PowerManagementControl Request message */
  1444. typedef struct _MPI2_PWR_MGMT_CONTROL_REQUEST {
  1445. U8 Feature; /*0x00 */
  1446. U8 Reserved1; /*0x01 */
  1447. U8 ChainOffset; /*0x02 */
  1448. U8 Function; /*0x03 */
  1449. U16 Reserved2; /*0x04 */
  1450. U8 Reserved3; /*0x06 */
  1451. U8 MsgFlags; /*0x07 */
  1452. U8 VP_ID; /*0x08 */
  1453. U8 VF_ID; /*0x09 */
  1454. U16 Reserved4; /*0x0A */
  1455. U8 Parameter1; /*0x0C */
  1456. U8 Parameter2; /*0x0D */
  1457. U8 Parameter3; /*0x0E */
  1458. U8 Parameter4; /*0x0F */
  1459. U32 Reserved5; /*0x10 */
  1460. U32 Reserved6; /*0x14 */
  1461. } MPI2_PWR_MGMT_CONTROL_REQUEST, *PTR_MPI2_PWR_MGMT_CONTROL_REQUEST,
  1462. Mpi2PwrMgmtControlRequest_t, *pMpi2PwrMgmtControlRequest_t;
  1463. /*defines for the Feature field */
  1464. #define MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND (0x01)
  1465. #define MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION (0x02)
  1466. #define MPI2_PM_CONTROL_FEATURE_PCIE_LINK (0x03) /*obsolete */
  1467. #define MPI2_PM_CONTROL_FEATURE_IOC_SPEED (0x04)
  1468. #define MPI2_PM_CONTROL_FEATURE_GLOBAL_PWR_MGMT_MODE (0x05)
  1469. #define MPI2_PM_CONTROL_FEATURE_MIN_PRODUCT_SPECIFIC (0x80)
  1470. #define MPI2_PM_CONTROL_FEATURE_MAX_PRODUCT_SPECIFIC (0xFF)
  1471. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_DA_PHY_POWER_COND Feature */
  1472. /*Parameter1 contains a PHY number */
  1473. /*Parameter2 indicates power condition action using these defines */
  1474. #define MPI2_PM_CONTROL_PARAM2_PARTIAL (0x01)
  1475. #define MPI2_PM_CONTROL_PARAM2_SLUMBER (0x02)
  1476. #define MPI2_PM_CONTROL_PARAM2_EXIT_PWR_MGMT (0x03)
  1477. /*Parameter3 and Parameter4 are reserved */
  1478. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_PORT_WIDTH_MODULATION
  1479. * Feature */
  1480. /*Parameter1 contains SAS port width modulation group number */
  1481. /*Parameter2 indicates IOC action using these defines */
  1482. #define MPI2_PM_CONTROL_PARAM2_REQUEST_OWNERSHIP (0x01)
  1483. #define MPI2_PM_CONTROL_PARAM2_CHANGE_MODULATION (0x02)
  1484. #define MPI2_PM_CONTROL_PARAM2_RELINQUISH_OWNERSHIP (0x03)
  1485. /*Parameter3 indicates desired modulation level using these defines */
  1486. #define MPI2_PM_CONTROL_PARAM3_25_PERCENT (0x00)
  1487. #define MPI2_PM_CONTROL_PARAM3_50_PERCENT (0x01)
  1488. #define MPI2_PM_CONTROL_PARAM3_75_PERCENT (0x02)
  1489. #define MPI2_PM_CONTROL_PARAM3_100_PERCENT (0x03)
  1490. /*Parameter4 is reserved */
  1491. /*this next set (_PCIE_LINK) is obsolete */
  1492. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_PCIE_LINK Feature */
  1493. /*Parameter1 indicates desired PCIe link speed using these defines */
  1494. #define MPI2_PM_CONTROL_PARAM1_PCIE_2_5_GBPS (0x00) /*obsolete */
  1495. #define MPI2_PM_CONTROL_PARAM1_PCIE_5_0_GBPS (0x01) /*obsolete */
  1496. #define MPI2_PM_CONTROL_PARAM1_PCIE_8_0_GBPS (0x02) /*obsolete */
  1497. /*Parameter2 indicates desired PCIe link width using these defines */
  1498. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X1 (0x01) /*obsolete */
  1499. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X2 (0x02) /*obsolete */
  1500. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X4 (0x04) /*obsolete */
  1501. #define MPI2_PM_CONTROL_PARAM2_WIDTH_X8 (0x08) /*obsolete */
  1502. /*Parameter3 and Parameter4 are reserved */
  1503. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_IOC_SPEED Feature */
  1504. /*Parameter1 indicates desired IOC hardware clock speed using these defines */
  1505. #define MPI2_PM_CONTROL_PARAM1_FULL_IOC_SPEED (0x01)
  1506. #define MPI2_PM_CONTROL_PARAM1_HALF_IOC_SPEED (0x02)
  1507. #define MPI2_PM_CONTROL_PARAM1_QUARTER_IOC_SPEED (0x04)
  1508. #define MPI2_PM_CONTROL_PARAM1_EIGHTH_IOC_SPEED (0x08)
  1509. /*Parameter2, Parameter3, and Parameter4 are reserved */
  1510. /*parameter usage for the MPI2_PM_CONTROL_FEATURE_GLOBAL_PWR_MGMT_MODE Feature*/
  1511. /*Parameter1 indicates host action regarding global power management mode */
  1512. #define MPI2_PM_CONTROL_PARAM1_TAKE_CONTROL (0x01)
  1513. #define MPI2_PM_CONTROL_PARAM1_CHANGE_GLOBAL_MODE (0x02)
  1514. #define MPI2_PM_CONTROL_PARAM1_RELEASE_CONTROL (0x03)
  1515. /*Parameter2 indicates the requested global power management mode */
  1516. #define MPI2_PM_CONTROL_PARAM2_FULL_PWR_PERF (0x01)
  1517. #define MPI2_PM_CONTROL_PARAM2_REDUCED_PWR_PERF (0x08)
  1518. #define MPI2_PM_CONTROL_PARAM2_STANDBY (0x40)
  1519. /*Parameter3 and Parameter4 are reserved */
  1520. /*PowerManagementControl Reply message */
  1521. typedef struct _MPI2_PWR_MGMT_CONTROL_REPLY {
  1522. U8 Feature; /*0x00 */
  1523. U8 Reserved1; /*0x01 */
  1524. U8 MsgLength; /*0x02 */
  1525. U8 Function; /*0x03 */
  1526. U16 Reserved2; /*0x04 */
  1527. U8 Reserved3; /*0x06 */
  1528. U8 MsgFlags; /*0x07 */
  1529. U8 VP_ID; /*0x08 */
  1530. U8 VF_ID; /*0x09 */
  1531. U16 Reserved4; /*0x0A */
  1532. U16 Reserved5; /*0x0C */
  1533. U16 IOCStatus; /*0x0E */
  1534. U32 IOCLogInfo; /*0x10 */
  1535. } MPI2_PWR_MGMT_CONTROL_REPLY, *PTR_MPI2_PWR_MGMT_CONTROL_REPLY,
  1536. Mpi2PwrMgmtControlReply_t, *pMpi2PwrMgmtControlReply_t;
  1537. /****************************************************************************
  1538. * IO Unit Control messages (MPI v2.6 and later only.)
  1539. ****************************************************************************/
  1540. /* IO Unit Control Request Message */
  1541. typedef struct _MPI26_IOUNIT_CONTROL_REQUEST {
  1542. U8 Operation; /* 0x00 */
  1543. U8 Reserved1; /* 0x01 */
  1544. U8 ChainOffset; /* 0x02 */
  1545. U8 Function; /* 0x03 */
  1546. U16 DevHandle; /* 0x04 */
  1547. U8 IOCParameter; /* 0x06 */
  1548. U8 MsgFlags; /* 0x07 */
  1549. U8 VP_ID; /* 0x08 */
  1550. U8 VF_ID; /* 0x09 */
  1551. U16 Reserved3; /* 0x0A */
  1552. U16 Reserved4; /* 0x0C */
  1553. U8 PhyNum; /* 0x0E */
  1554. U8 PrimFlags; /* 0x0F */
  1555. U32 Primitive; /* 0x10 */
  1556. U8 LookupMethod; /* 0x14 */
  1557. U8 Reserved5; /* 0x15 */
  1558. U16 SlotNumber; /* 0x16 */
  1559. U64 LookupAddress; /* 0x18 */
  1560. U32 IOCParameterValue; /* 0x20 */
  1561. U32 Reserved7; /* 0x24 */
  1562. U32 Reserved8; /* 0x28 */
  1563. } MPI26_IOUNIT_CONTROL_REQUEST,
  1564. *PTR_MPI26_IOUNIT_CONTROL_REQUEST,
  1565. Mpi26IoUnitControlRequest_t,
  1566. *pMpi26IoUnitControlRequest_t;
  1567. /* values for the Operation field */
  1568. #define MPI26_CTRL_OP_CLEAR_ALL_PERSISTENT (0x02)
  1569. #define MPI26_CTRL_OP_SAS_PHY_LINK_RESET (0x06)
  1570. #define MPI26_CTRL_OP_SAS_PHY_HARD_RESET (0x07)
  1571. #define MPI26_CTRL_OP_PHY_CLEAR_ERROR_LOG (0x08)
  1572. #define MPI26_CTRL_OP_LINK_CLEAR_ERROR_LOG (0x09)
  1573. #define MPI26_CTRL_OP_SAS_SEND_PRIMITIVE (0x0A)
  1574. #define MPI26_CTRL_OP_FORCE_FULL_DISCOVERY (0x0B)
  1575. #define MPI26_CTRL_OP_REMOVE_DEVICE (0x0D)
  1576. #define MPI26_CTRL_OP_LOOKUP_MAPPING (0x0E)
  1577. #define MPI26_CTRL_OP_SET_IOC_PARAMETER (0x0F)
  1578. #define MPI26_CTRL_OP_ENABLE_FP_DEVICE (0x10)
  1579. #define MPI26_CTRL_OP_DISABLE_FP_DEVICE (0x11)
  1580. #define MPI26_CTRL_OP_ENABLE_FP_ALL (0x12)
  1581. #define MPI26_CTRL_OP_DISABLE_FP_ALL (0x13)
  1582. #define MPI26_CTRL_OP_DEV_ENABLE_NCQ (0x14)
  1583. #define MPI26_CTRL_OP_DEV_DISABLE_NCQ (0x15)
  1584. #define MPI26_CTRL_OP_SHUTDOWN (0x16)
  1585. #define MPI26_CTRL_OP_DEV_ENABLE_PERSIST_CONNECTION (0x17)
  1586. #define MPI26_CTRL_OP_DEV_DISABLE_PERSIST_CONNECTION (0x18)
  1587. #define MPI26_CTRL_OP_DEV_CLOSE_PERSIST_CONNECTION (0x19)
  1588. #define MPI26_CTRL_OP_ENABLE_NVME_SGL_FORMAT (0x1A)
  1589. #define MPI26_CTRL_OP_DISABLE_NVME_SGL_FORMAT (0x1B)
  1590. #define MPI26_CTRL_OP_PRODUCT_SPECIFIC_MIN (0x80)
  1591. /* values for the PrimFlags field */
  1592. #define MPI26_CTRL_PRIMFLAGS_SINGLE (0x08)
  1593. #define MPI26_CTRL_PRIMFLAGS_TRIPLE (0x02)
  1594. #define MPI26_CTRL_PRIMFLAGS_REDUNDANT (0x01)
  1595. /* values for the LookupMethod field */
  1596. #define MPI26_CTRL_LOOKUP_METHOD_WWID_ADDRESS (0x01)
  1597. #define MPI26_CTRL_LOOKUP_METHOD_ENCLOSURE_SLOT (0x02)
  1598. #define MPI26_CTRL_LOOKUP_METHOD_SAS_DEVICE_NAME (0x03)
  1599. /* IO Unit Control Reply Message */
  1600. typedef struct _MPI26_IOUNIT_CONTROL_REPLY {
  1601. U8 Operation; /* 0x00 */
  1602. U8 Reserved1; /* 0x01 */
  1603. U8 MsgLength; /* 0x02 */
  1604. U8 Function; /* 0x03 */
  1605. U16 DevHandle; /* 0x04 */
  1606. U8 IOCParameter; /* 0x06 */
  1607. U8 MsgFlags; /* 0x07 */
  1608. U8 VP_ID; /* 0x08 */
  1609. U8 VF_ID; /* 0x09 */
  1610. U16 Reserved3; /* 0x0A */
  1611. U16 Reserved4; /* 0x0C */
  1612. U16 IOCStatus; /* 0x0E */
  1613. U32 IOCLogInfo; /* 0x10 */
  1614. } MPI26_IOUNIT_CONTROL_REPLY,
  1615. *PTR_MPI26_IOUNIT_CONTROL_REPLY,
  1616. Mpi26IoUnitControlReply_t,
  1617. *pMpi26IoUnitControlReply_t;
  1618. #endif