mpi_ioc.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. /*
  2. * Copyright (c) 2000-2003 LSI Logic Corporation.
  3. *
  4. *
  5. * Name: mpi_ioc.h
  6. * Title: MPI IOC, Port, Event, FW Download, and FW Upload messages
  7. * Creation Date: August 11, 2000
  8. *
  9. * mpi_ioc.h Version: 01.05.xx
  10. *
  11. * Version History
  12. * ---------------
  13. *
  14. * Date Version Description
  15. * -------- -------- ------------------------------------------------------
  16. * 05-08-00 00.10.01 Original release for 0.10 spec dated 4/26/2000.
  17. * 05-24-00 00.10.02 Added _MSG_IOC_INIT_REPLY structure.
  18. * 06-06-00 01.00.01 Added CurReplyFrameSize field to _MSG_IOC_FACTS_REPLY.
  19. * 06-12-00 01.00.02 Added _MSG_PORT_ENABLE_REPLY structure.
  20. * Added _MSG_EVENT_ACK_REPLY structure.
  21. * Added _MSG_FW_DOWNLOAD_REPLY structure.
  22. * Added _MSG_TOOLBOX_REPLY structure.
  23. * 06-30-00 01.00.03 Added MaxLanBuckets to _PORT_FACT_REPLY structure.
  24. * 07-27-00 01.00.04 Added _EVENT_DATA structure definitions for _SCSI,
  25. * _LINK_STATUS, _LOOP_STATE and _LOGOUT.
  26. * 08-11-00 01.00.05 Switched positions of MsgLength and Function fields in
  27. * _MSG_EVENT_ACK_REPLY structure to match specification.
  28. * 11-02-00 01.01.01 Original release for post 1.0 work.
  29. * Added a value for Manufacturer to WhoInit.
  30. * 12-04-00 01.01.02 Modified IOCFacts reply, added FWUpload messages, and
  31. * removed toolbox message.
  32. * 01-09-01 01.01.03 Added event enabled and disabled defines.
  33. * Added structures for FwHeader and DataHeader.
  34. * Added ImageType to FwUpload reply.
  35. * 02-20-01 01.01.04 Started using MPI_POINTER.
  36. * 02-27-01 01.01.05 Added event for RAID status change and its event data.
  37. * Added IocNumber field to MSG_IOC_FACTS_REPLY.
  38. * 03-27-01 01.01.06 Added defines for ProductId field of MPI_FW_HEADER.
  39. * Added structure offset comments.
  40. * 04-09-01 01.01.07 Added structure EVENT_DATA_EVENT_CHANGE.
  41. * 08-08-01 01.02.01 Original release for v1.2 work.
  42. * New format for FWVersion and ProductId in
  43. * MSG_IOC_FACTS_REPLY and MPI_FW_HEADER.
  44. * 08-31-01 01.02.02 Addded event MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE and
  45. * related structure and defines.
  46. * Added event MPI_EVENT_ON_BUS_TIMER_EXPIRED.
  47. * Added MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE.
  48. * Replaced a reserved field in MSG_IOC_FACTS_REPLY with
  49. * IOCExceptions and changed DataImageSize to reserved.
  50. * Added MPI_FW_DOWNLOAD_ITYPE_NVSTORE_DATA and
  51. * MPI_FW_UPLOAD_ITYPE_NVDATA.
  52. * 09-28-01 01.02.03 Modified Event Data for Integrated RAID.
  53. * 11-01-01 01.02.04 Added defines for MPI_EXT_IMAGE_HEADER ImageType field.
  54. * 03-14-02 01.02.05 Added HeaderVersion field to MSG_IOC_FACTS_REPLY.
  55. * 05-31-02 01.02.06 Added define for
  56. * MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID.
  57. * Added AliasIndex to EVENT_DATA_LOGOUT structure.
  58. * 04-01-03 01.02.07 Added defines for MPI_FW_HEADER_SIGNATURE_.
  59. * 06-26-03 01.02.08 Added new values to the product family defines.
  60. * --------------------------------------------------------------------------
  61. */
  62. #ifndef MPI_IOC_H
  63. #define MPI_IOC_H
  64. /*****************************************************************************
  65. *
  66. * I O C M e s s a g e s
  67. *
  68. *****************************************************************************/
  69. /****************************************************************************/
  70. /* IOCInit message */
  71. /****************************************************************************/
  72. typedef struct _MSG_IOC_INIT
  73. {
  74. U8 WhoInit; /* 00h */
  75. U8 Reserved; /* 01h */
  76. U8 ChainOffset; /* 02h */
  77. U8 Function; /* 03h */
  78. U8 Flags; /* 04h */
  79. U8 MaxDevices; /* 05h */
  80. U8 MaxBuses; /* 06h */
  81. U8 MsgFlags; /* 07h */
  82. U32 MsgContext; /* 08h */
  83. U16 ReplyFrameSize; /* 0Ch */
  84. U8 Reserved1[2]; /* 0Eh */
  85. U32 HostMfaHighAddr; /* 10h */
  86. U32 SenseBufferHighAddr; /* 14h */
  87. U32 ReplyFifoHostSignalingAddr; /* 18h */
  88. } MSG_IOC_INIT, MPI_POINTER PTR_MSG_IOC_INIT,
  89. IOCInit_t, MPI_POINTER pIOCInit_t;
  90. /* WhoInit values */
  91. #define MPI_WHOINIT_NO_ONE (0x00)
  92. #define MPI_WHOINIT_SYSTEM_BIOS (0x01)
  93. #define MPI_WHOINIT_ROM_BIOS (0x02)
  94. #define MPI_WHOINIT_PCI_PEER (0x03)
  95. #define MPI_WHOINIT_HOST_DRIVER (0x04)
  96. #define MPI_WHOINIT_MANUFACTURER (0x05)
  97. /* Flags values */
  98. #define MPI_IOCINIT_FLAGS_DISCARD_FW_IMAGE (0x01)
  99. #define MPI_IOCINIT_FLAGS_REPLY_FIFO_HOST_SIGNAL (0x02)
  100. typedef struct _MSG_IOC_INIT_REPLY
  101. {
  102. U8 WhoInit; /* 00h */
  103. U8 Reserved; /* 01h */
  104. U8 MsgLength; /* 02h */
  105. U8 Function; /* 03h */
  106. U8 Flags; /* 04h */
  107. U8 MaxDevices; /* 05h */
  108. U8 MaxBuses; /* 06h */
  109. U8 MsgFlags; /* 07h */
  110. U32 MsgContext; /* 08h */
  111. U16 Reserved2; /* 0Ch */
  112. U16 IOCStatus; /* 0Eh */
  113. U32 IOCLogInfo; /* 10h */
  114. } MSG_IOC_INIT_REPLY, MPI_POINTER PTR_MSG_IOC_INIT_REPLY,
  115. IOCInitReply_t, MPI_POINTER pIOCInitReply_t;
  116. /****************************************************************************/
  117. /* IOC Facts message */
  118. /****************************************************************************/
  119. typedef struct _MSG_IOC_FACTS
  120. {
  121. U8 Reserved[2]; /* 00h */
  122. U8 ChainOffset; /* 01h */
  123. U8 Function; /* 02h */
  124. U8 Reserved1[3]; /* 03h */
  125. U8 MsgFlags; /* 04h */
  126. U32 MsgContext; /* 08h */
  127. } MSG_IOC_FACTS, MPI_POINTER PTR_IOC_FACTS,
  128. IOCFacts_t, MPI_POINTER pIOCFacts_t;
  129. typedef struct _MPI_FW_VERSION_STRUCT
  130. {
  131. U8 Dev; /* 00h */
  132. U8 Unit; /* 01h */
  133. U8 Minor; /* 02h */
  134. U8 Major; /* 03h */
  135. } MPI_FW_VERSION_STRUCT;
  136. typedef union _MPI_FW_VERSION
  137. {
  138. MPI_FW_VERSION_STRUCT Struct;
  139. U32 Word;
  140. } MPI_FW_VERSION;
  141. /* IOC Facts Reply */
  142. typedef struct _MSG_IOC_FACTS_REPLY
  143. {
  144. U16 MsgVersion; /* 00h */
  145. U8 MsgLength; /* 02h */
  146. U8 Function; /* 03h */
  147. U16 HeaderVersion; /* 04h */
  148. U8 IOCNumber; /* 06h */
  149. U8 MsgFlags; /* 07h */
  150. U32 MsgContext; /* 08h */
  151. U16 IOCExceptions; /* 0Ch */
  152. U16 IOCStatus; /* 0Eh */
  153. U32 IOCLogInfo; /* 10h */
  154. U8 MaxChainDepth; /* 14h */
  155. U8 WhoInit; /* 15h */
  156. U8 BlockSize; /* 16h */
  157. U8 Flags; /* 17h */
  158. U16 ReplyQueueDepth; /* 18h */
  159. U16 RequestFrameSize; /* 1Ah */
  160. U16 Reserved_0101_FWVersion; /* 1Ch */ /* obsolete 16-bit FWVersion */
  161. U16 ProductID; /* 1Eh */
  162. U32 CurrentHostMfaHighAddr; /* 20h */
  163. U16 GlobalCredits; /* 24h */
  164. U8 NumberOfPorts; /* 26h */
  165. U8 EventState; /* 27h */
  166. U32 CurrentSenseBufferHighAddr; /* 28h */
  167. U16 CurReplyFrameSize; /* 2Ch */
  168. U8 MaxDevices; /* 2Eh */
  169. U8 MaxBuses; /* 2Fh */
  170. U32 FWImageSize; /* 30h */
  171. U32 IOCCapabilities; /* 34h */
  172. MPI_FW_VERSION FWVersion; /* 38h */
  173. U16 HighPriorityQueueDepth; /* 3Ch */
  174. U16 Reserved2; /* 3Eh */
  175. } MSG_IOC_FACTS_REPLY, MPI_POINTER PTR_MSG_IOC_FACTS_REPLY,
  176. IOCFactsReply_t, MPI_POINTER pIOCFactsReply_t;
  177. #define MPI_IOCFACTS_MSGVERSION_MAJOR_MASK (0xFF00)
  178. #define MPI_IOCFACTS_MSGVERSION_MINOR_MASK (0x00FF)
  179. #define MPI_IOCFACTS_HEADERVERSION_UNIT_MASK (0xFF00)
  180. #define MPI_IOCFACTS_HEADERVERSION_DEV_MASK (0x00FF)
  181. #define MPI_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0001)
  182. #define MPI_IOCFACTS_EXCEPT_RAID_CONFIG_INVALID (0x0002)
  183. #define MPI_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0004)
  184. #define MPI_IOCFACTS_EXCEPT_PERSISTENT_TABLE_FULL (0x0008)
  185. #define MPI_IOCFACTS_FLAGS_FW_DOWNLOAD_BOOT (0x01)
  186. #define MPI_IOCFACTS_EVENTSTATE_DISABLED (0x00)
  187. #define MPI_IOCFACTS_EVENTSTATE_ENABLED (0x01)
  188. #define MPI_IOCFACTS_CAPABILITY_HIGH_PRI_Q (0x00000001)
  189. #define MPI_IOCFACTS_CAPABILITY_REPLY_HOST_SIGNAL (0x00000002)
  190. #define MPI_IOCFACTS_CAPABILITY_QUEUE_FULL_HANDLING (0x00000004)
  191. #define MPI_IOCFACTS_CAPABILITY_DIAG_TRACE_BUFFER (0x00000008)
  192. #define MPI_IOCFACTS_CAPABILITY_SNAPSHOT_BUFFER (0x00000010)
  193. #define MPI_IOCFACTS_CAPABILITY_EXTENDED_BUFFER (0x00000020)
  194. #define MPI_IOCFACTS_CAPABILITY_EEDP (0x00000040)
  195. /*****************************************************************************
  196. *
  197. * P o r t M e s s a g e s
  198. *
  199. *****************************************************************************/
  200. /****************************************************************************/
  201. /* Port Facts message and Reply */
  202. /****************************************************************************/
  203. typedef struct _MSG_PORT_FACTS
  204. {
  205. U8 Reserved[2]; /* 00h */
  206. U8 ChainOffset; /* 02h */
  207. U8 Function; /* 03h */
  208. U8 Reserved1[2]; /* 04h */
  209. U8 PortNumber; /* 06h */
  210. U8 MsgFlags; /* 07h */
  211. U32 MsgContext; /* 08h */
  212. } MSG_PORT_FACTS, MPI_POINTER PTR_MSG_PORT_FACTS,
  213. PortFacts_t, MPI_POINTER pPortFacts_t;
  214. typedef struct _MSG_PORT_FACTS_REPLY
  215. {
  216. U16 Reserved; /* 00h */
  217. U8 MsgLength; /* 02h */
  218. U8 Function; /* 03h */
  219. U16 Reserved1; /* 04h */
  220. U8 PortNumber; /* 06h */
  221. U8 MsgFlags; /* 07h */
  222. U32 MsgContext; /* 08h */
  223. U16 Reserved2; /* 0Ch */
  224. U16 IOCStatus; /* 0Eh */
  225. U32 IOCLogInfo; /* 10h */
  226. U8 Reserved3; /* 14h */
  227. U8 PortType; /* 15h */
  228. U16 MaxDevices; /* 16h */
  229. U16 PortSCSIID; /* 18h */
  230. U16 ProtocolFlags; /* 1Ah */
  231. U16 MaxPostedCmdBuffers; /* 1Ch */
  232. U16 MaxPersistentIDs; /* 1Eh */
  233. U16 MaxLanBuckets; /* 20h */
  234. U16 Reserved4; /* 22h */
  235. U32 Reserved5; /* 24h */
  236. } MSG_PORT_FACTS_REPLY, MPI_POINTER PTR_MSG_PORT_FACTS_REPLY,
  237. PortFactsReply_t, MPI_POINTER pPortFactsReply_t;
  238. /* PortTypes values */
  239. #define MPI_PORTFACTS_PORTTYPE_INACTIVE (0x00)
  240. #define MPI_PORTFACTS_PORTTYPE_SCSI (0x01)
  241. #define MPI_PORTFACTS_PORTTYPE_FC (0x10)
  242. #define MPI_PORTFACTS_PORTTYPE_ISCSI (0x20)
  243. #define MPI_PORTFACTS_PORTTYPE_SAS (0x30)
  244. /* ProtocolFlags values */
  245. #define MPI_PORTFACTS_PROTOCOL_LOGBUSADDR (0x01)
  246. #define MPI_PORTFACTS_PROTOCOL_LAN (0x02)
  247. #define MPI_PORTFACTS_PROTOCOL_TARGET (0x04)
  248. #define MPI_PORTFACTS_PROTOCOL_INITIATOR (0x08)
  249. /****************************************************************************/
  250. /* Port Enable Message */
  251. /****************************************************************************/
  252. typedef struct _MSG_PORT_ENABLE
  253. {
  254. U8 Reserved[2]; /* 00h */
  255. U8 ChainOffset; /* 02h */
  256. U8 Function; /* 03h */
  257. U8 Reserved1[2]; /* 04h */
  258. U8 PortNumber; /* 06h */
  259. U8 MsgFlags; /* 07h */
  260. U32 MsgContext; /* 08h */
  261. } MSG_PORT_ENABLE, MPI_POINTER PTR_MSG_PORT_ENABLE,
  262. PortEnable_t, MPI_POINTER pPortEnable_t;
  263. typedef struct _MSG_PORT_ENABLE_REPLY
  264. {
  265. U8 Reserved[2]; /* 00h */
  266. U8 MsgLength; /* 02h */
  267. U8 Function; /* 03h */
  268. U8 Reserved1[2]; /* 04h */
  269. U8 PortNumber; /* 05h */
  270. U8 MsgFlags; /* 07h */
  271. U32 MsgContext; /* 08h */
  272. U16 Reserved2; /* 0Ch */
  273. U16 IOCStatus; /* 0Eh */
  274. U32 IOCLogInfo; /* 10h */
  275. } MSG_PORT_ENABLE_REPLY, MPI_POINTER PTR_MSG_PORT_ENABLE_REPLY,
  276. PortEnableReply_t, MPI_POINTER pPortEnableReply_t;
  277. /*****************************************************************************
  278. *
  279. * E v e n t M e s s a g e s
  280. *
  281. *****************************************************************************/
  282. /****************************************************************************/
  283. /* Event Notification messages */
  284. /****************************************************************************/
  285. typedef struct _MSG_EVENT_NOTIFY
  286. {
  287. U8 Switch; /* 00h */
  288. U8 Reserved; /* 01h */
  289. U8 ChainOffset; /* 02h */
  290. U8 Function; /* 03h */
  291. U8 Reserved1[3]; /* 04h */
  292. U8 MsgFlags; /* 07h */
  293. U32 MsgContext; /* 08h */
  294. } MSG_EVENT_NOTIFY, MPI_POINTER PTR_MSG_EVENT_NOTIFY,
  295. EventNotification_t, MPI_POINTER pEventNotification_t;
  296. /* Event Notification Reply */
  297. typedef struct _MSG_EVENT_NOTIFY_REPLY
  298. {
  299. U16 EventDataLength; /* 00h */
  300. U8 MsgLength; /* 02h */
  301. U8 Function; /* 03h */
  302. U8 Reserved1[2]; /* 04h */
  303. U8 AckRequired; /* 06h */
  304. U8 MsgFlags; /* 07h */
  305. U32 MsgContext; /* 08h */
  306. U8 Reserved2[2]; /* 0Ch */
  307. U16 IOCStatus; /* 0Eh */
  308. U32 IOCLogInfo; /* 10h */
  309. U32 Event; /* 14h */
  310. U32 EventContext; /* 18h */
  311. U32 Data[1]; /* 1Ch */
  312. } MSG_EVENT_NOTIFY_REPLY, MPI_POINTER PTR_MSG_EVENT_NOTIFY_REPLY,
  313. EventNotificationReply_t, MPI_POINTER pEventNotificationReply_t;
  314. /* Event Acknowledge */
  315. typedef struct _MSG_EVENT_ACK
  316. {
  317. U8 Reserved[2]; /* 00h */
  318. U8 ChainOffset; /* 02h */
  319. U8 Function; /* 03h */
  320. U8 Reserved1[3]; /* 04h */
  321. U8 MsgFlags; /* 07h */
  322. U32 MsgContext; /* 08h */
  323. U32 Event; /* 0Ch */
  324. U32 EventContext; /* 10h */
  325. } MSG_EVENT_ACK, MPI_POINTER PTR_MSG_EVENT_ACK,
  326. EventAck_t, MPI_POINTER pEventAck_t;
  327. typedef struct _MSG_EVENT_ACK_REPLY
  328. {
  329. U8 Reserved[2]; /* 00h */
  330. U8 MsgLength; /* 02h */
  331. U8 Function; /* 03h */
  332. U8 Reserved1[3]; /* 04h */
  333. U8 MsgFlags; /* 07h */
  334. U32 MsgContext; /* 08h */
  335. U16 Reserved2; /* 0Ch */
  336. U16 IOCStatus; /* 0Eh */
  337. U32 IOCLogInfo; /* 10h */
  338. } MSG_EVENT_ACK_REPLY, MPI_POINTER PTR_MSG_EVENT_ACK_REPLY,
  339. EventAckReply_t, MPI_POINTER pEventAckReply_t;
  340. /* Switch */
  341. #define MPI_EVENT_NOTIFICATION_SWITCH_OFF (0x00)
  342. #define MPI_EVENT_NOTIFICATION_SWITCH_ON (0x01)
  343. /* Event */
  344. #define MPI_EVENT_NONE (0x00000000)
  345. #define MPI_EVENT_LOG_DATA (0x00000001)
  346. #define MPI_EVENT_STATE_CHANGE (0x00000002)
  347. #define MPI_EVENT_UNIT_ATTENTION (0x00000003)
  348. #define MPI_EVENT_IOC_BUS_RESET (0x00000004)
  349. #define MPI_EVENT_EXT_BUS_RESET (0x00000005)
  350. #define MPI_EVENT_RESCAN (0x00000006)
  351. #define MPI_EVENT_LINK_STATUS_CHANGE (0x00000007)
  352. #define MPI_EVENT_LOOP_STATE_CHANGE (0x00000008)
  353. #define MPI_EVENT_LOGOUT (0x00000009)
  354. #define MPI_EVENT_EVENT_CHANGE (0x0000000A)
  355. #define MPI_EVENT_INTEGRATED_RAID (0x0000000B)
  356. #define MPI_EVENT_SCSI_DEVICE_STATUS_CHANGE (0x0000000C)
  357. #define MPI_EVENT_ON_BUS_TIMER_EXPIRED (0x0000000D)
  358. #define MPI_EVENT_QUEUE_FULL (0x0000000E)
  359. #define MPI_EVENT_SAS_DEVICE_STATUS_CHANGE (0x0000000F)
  360. #define MPI_EVENT_SAS_SES (0x00000010)
  361. #define MPI_EVENT_PERSISTENT_TABLE_FULL (0x00000011)
  362. /* AckRequired field values */
  363. #define MPI_EVENT_NOTIFICATION_ACK_NOT_REQUIRED (0x00)
  364. #define MPI_EVENT_NOTIFICATION_ACK_REQUIRED (0x01)
  365. /* EventChange Event data */
  366. typedef struct _EVENT_DATA_EVENT_CHANGE
  367. {
  368. U8 EventState; /* 00h */
  369. U8 Reserved; /* 01h */
  370. U16 Reserved1; /* 02h */
  371. } EVENT_DATA_EVENT_CHANGE, MPI_POINTER PTR_EVENT_DATA_EVENT_CHANGE,
  372. EventDataEventChange_t, MPI_POINTER pEventDataEventChange_t;
  373. /* SCSI Event data for Port, Bus and Device forms */
  374. typedef struct _EVENT_DATA_SCSI
  375. {
  376. U8 TargetID; /* 00h */
  377. U8 BusPort; /* 01h */
  378. U16 Reserved; /* 02h */
  379. } EVENT_DATA_SCSI, MPI_POINTER PTR_EVENT_DATA_SCSI,
  380. EventDataScsi_t, MPI_POINTER pEventDataScsi_t;
  381. /* SCSI Device Status Change Event data */
  382. typedef struct _EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE
  383. {
  384. U8 TargetID; /* 00h */
  385. U8 Bus; /* 01h */
  386. U8 ReasonCode; /* 02h */
  387. U8 LUN; /* 03h */
  388. U8 ASC; /* 04h */
  389. U8 ASCQ; /* 05h */
  390. U16 Reserved; /* 06h */
  391. } EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
  392. MPI_POINTER PTR_EVENT_DATA_SCSI_DEVICE_STATUS_CHANGE,
  393. MpiEventDataScsiDeviceStatusChange_t,
  394. MPI_POINTER pMpiEventDataScsiDeviceStatusChange_t;
  395. /* MPI SCSI Device Status Change Event data ReasonCode values */
  396. #define MPI_EVENT_SCSI_DEV_STAT_RC_ADDED (0x03)
  397. #define MPI_EVENT_SCSI_DEV_STAT_RC_NOT_RESPONDING (0x04)
  398. #define MPI_EVENT_SCSI_DEV_STAT_RC_SMART_DATA (0x05)
  399. /* SAS Device Status Change Event data */
  400. typedef struct _EVENT_DATA_SAS_DEVICE_STATUS_CHANGE
  401. {
  402. U8 TargetID; /* 00h */
  403. U8 Bus; /* 01h */
  404. U8 ReasonCode; /* 02h */
  405. U8 Reserved; /* 03h */
  406. U8 ASC; /* 04h */
  407. U8 ASCQ; /* 05h */
  408. U16 DevHandle; /* 06h */
  409. U32 DeviceInfo; /* 08h */
  410. } EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  411. MPI_POINTER PTR_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE,
  412. MpiEventDataSasDeviceStatusChange_t,
  413. MPI_POINTER pMpiEventDataSasDeviceStatusChange_t;
  414. /* MPI SAS Device Status Change Event data ReasonCode values */
  415. #define MPI_EVENT_SAS_DEV_STAT_RC_ADDED (0x03)
  416. #define MPI_EVENT_SAS_DEV_STAT_RC_NOT_RESPONDING (0x04)
  417. #define MPI_EVENT_SAS_DEV_STAT_RC_SMART_DATA (0x05)
  418. #define MPI_EVENT_SAS_DEV_STAT_RC_NO_PERSIST_ADDED (0x06)
  419. /* SCSI Event data for Queue Full event */
  420. typedef struct _EVENT_DATA_QUEUE_FULL
  421. {
  422. U8 TargetID; /* 00h */
  423. U8 Bus; /* 01h */
  424. U16 CurrentDepth; /* 02h */
  425. } EVENT_DATA_QUEUE_FULL, MPI_POINTER PTR_EVENT_DATA_QUEUE_FULL,
  426. EventDataQueueFull_t, MPI_POINTER pEventDataQueueFull_t;
  427. /* MPI Link Status Change Event data */
  428. typedef struct _EVENT_DATA_LINK_STATUS
  429. {
  430. U8 State; /* 00h */
  431. U8 Reserved; /* 01h */
  432. U16 Reserved1; /* 02h */
  433. U8 Reserved2; /* 04h */
  434. U8 Port; /* 05h */
  435. U16 Reserved3; /* 06h */
  436. } EVENT_DATA_LINK_STATUS, MPI_POINTER PTR_EVENT_DATA_LINK_STATUS,
  437. EventDataLinkStatus_t, MPI_POINTER pEventDataLinkStatus_t;
  438. #define MPI_EVENT_LINK_STATUS_FAILURE (0x00000000)
  439. #define MPI_EVENT_LINK_STATUS_ACTIVE (0x00000001)
  440. /* MPI Loop State Change Event data */
  441. typedef struct _EVENT_DATA_LOOP_STATE
  442. {
  443. U8 Character4; /* 00h */
  444. U8 Character3; /* 01h */
  445. U8 Type; /* 02h */
  446. U8 Reserved; /* 03h */
  447. U8 Reserved1; /* 04h */
  448. U8 Port; /* 05h */
  449. U16 Reserved2; /* 06h */
  450. } EVENT_DATA_LOOP_STATE, MPI_POINTER PTR_EVENT_DATA_LOOP_STATE,
  451. EventDataLoopState_t, MPI_POINTER pEventDataLoopState_t;
  452. #define MPI_EVENT_LOOP_STATE_CHANGE_LIP (0x0001)
  453. #define MPI_EVENT_LOOP_STATE_CHANGE_LPE (0x0002)
  454. #define MPI_EVENT_LOOP_STATE_CHANGE_LPB (0x0003)
  455. /* MPI LOGOUT Event data */
  456. typedef struct _EVENT_DATA_LOGOUT
  457. {
  458. U32 NPortID; /* 00h */
  459. U8 AliasIndex; /* 04h */
  460. U8 Port; /* 05h */
  461. U16 Reserved1; /* 06h */
  462. } EVENT_DATA_LOGOUT, MPI_POINTER PTR_EVENT_DATA_LOGOUT,
  463. EventDataLogout_t, MPI_POINTER pEventDataLogout_t;
  464. #define MPI_EVENT_LOGOUT_ALL_ALIASES (0xFF)
  465. /* MPI Integrated RAID Event data */
  466. typedef struct _EVENT_DATA_RAID
  467. {
  468. U8 VolumeID; /* 00h */
  469. U8 VolumeBus; /* 01h */
  470. U8 ReasonCode; /* 02h */
  471. U8 PhysDiskNum; /* 03h */
  472. U8 ASC; /* 04h */
  473. U8 ASCQ; /* 05h */
  474. U16 Reserved; /* 06h */
  475. U32 SettingsStatus; /* 08h */
  476. } EVENT_DATA_RAID, MPI_POINTER PTR_EVENT_DATA_RAID,
  477. MpiEventDataRaid_t, MPI_POINTER pMpiEventDataRaid_t;
  478. /* MPI Integrated RAID Event data ReasonCode values */
  479. #define MPI_EVENT_RAID_RC_VOLUME_CREATED (0x00)
  480. #define MPI_EVENT_RAID_RC_VOLUME_DELETED (0x01)
  481. #define MPI_EVENT_RAID_RC_VOLUME_SETTINGS_CHANGED (0x02)
  482. #define MPI_EVENT_RAID_RC_VOLUME_STATUS_CHANGED (0x03)
  483. #define MPI_EVENT_RAID_RC_VOLUME_PHYSDISK_CHANGED (0x04)
  484. #define MPI_EVENT_RAID_RC_PHYSDISK_CREATED (0x05)
  485. #define MPI_EVENT_RAID_RC_PHYSDISK_DELETED (0x06)
  486. #define MPI_EVENT_RAID_RC_PHYSDISK_SETTINGS_CHANGED (0x07)
  487. #define MPI_EVENT_RAID_RC_PHYSDISK_STATUS_CHANGED (0x08)
  488. #define MPI_EVENT_RAID_RC_DOMAIN_VAL_NEEDED (0x09)
  489. #define MPI_EVENT_RAID_RC_SMART_DATA (0x0A)
  490. #define MPI_EVENT_RAID_RC_REPLACE_ACTION_STARTED (0x0B)
  491. /*****************************************************************************
  492. *
  493. * F i r m w a r e L o a d M e s s a g e s
  494. *
  495. *****************************************************************************/
  496. /****************************************************************************/
  497. /* Firmware Download message and associated structures */
  498. /****************************************************************************/
  499. typedef struct _MSG_FW_DOWNLOAD
  500. {
  501. U8 ImageType; /* 00h */
  502. U8 Reserved; /* 01h */
  503. U8 ChainOffset; /* 02h */
  504. U8 Function; /* 03h */
  505. U8 Reserved1[3]; /* 04h */
  506. U8 MsgFlags; /* 07h */
  507. U32 MsgContext; /* 08h */
  508. SGE_MPI_UNION SGL; /* 0Ch */
  509. } MSG_FW_DOWNLOAD, MPI_POINTER PTR_MSG_FW_DOWNLOAD,
  510. FWDownload_t, MPI_POINTER pFWDownload_t;
  511. #define MPI_FW_DOWNLOAD_ITYPE_RESERVED (0x00)
  512. #define MPI_FW_DOWNLOAD_ITYPE_FW (0x01)
  513. #define MPI_FW_DOWNLOAD_ITYPE_BIOS (0x02)
  514. #define MPI_FW_DOWNLOAD_ITYPE_NVDATA (0x03)
  515. #define MPI_FW_DOWNLOAD_ITYPE_BOOTLOADER (0x04)
  516. typedef struct _FWDownloadTCSGE
  517. {
  518. U8 Reserved; /* 00h */
  519. U8 ContextSize; /* 01h */
  520. U8 DetailsLength; /* 02h */
  521. U8 Flags; /* 03h */
  522. U32 Reserved_0100_Checksum; /* 04h */ /* obsolete Checksum */
  523. U32 ImageOffset; /* 08h */
  524. U32 ImageSize; /* 0Ch */
  525. } FW_DOWNLOAD_TCSGE, MPI_POINTER PTR_FW_DOWNLOAD_TCSGE,
  526. FWDownloadTCSGE_t, MPI_POINTER pFWDownloadTCSGE_t;
  527. /* Firmware Download reply */
  528. typedef struct _MSG_FW_DOWNLOAD_REPLY
  529. {
  530. U8 ImageType; /* 00h */
  531. U8 Reserved; /* 01h */
  532. U8 MsgLength; /* 02h */
  533. U8 Function; /* 03h */
  534. U8 Reserved1[3]; /* 04h */
  535. U8 MsgFlags; /* 07h */
  536. U32 MsgContext; /* 08h */
  537. U16 Reserved2; /* 0Ch */
  538. U16 IOCStatus; /* 0Eh */
  539. U32 IOCLogInfo; /* 10h */
  540. } MSG_FW_DOWNLOAD_REPLY, MPI_POINTER PTR_MSG_FW_DOWNLOAD_REPLY,
  541. FWDownloadReply_t, MPI_POINTER pFWDownloadReply_t;
  542. /****************************************************************************/
  543. /* Firmware Upload message and associated structures */
  544. /****************************************************************************/
  545. typedef struct _MSG_FW_UPLOAD
  546. {
  547. U8 ImageType; /* 00h */
  548. U8 Reserved; /* 01h */
  549. U8 ChainOffset; /* 02h */
  550. U8 Function; /* 03h */
  551. U8 Reserved1[3]; /* 04h */
  552. U8 MsgFlags; /* 07h */
  553. U32 MsgContext; /* 08h */
  554. SGE_MPI_UNION SGL; /* 0Ch */
  555. } MSG_FW_UPLOAD, MPI_POINTER PTR_MSG_FW_UPLOAD,
  556. FWUpload_t, MPI_POINTER pFWUpload_t;
  557. #define MPI_FW_UPLOAD_ITYPE_FW_IOC_MEM (0x00)
  558. #define MPI_FW_UPLOAD_ITYPE_FW_FLASH (0x01)
  559. #define MPI_FW_UPLOAD_ITYPE_BIOS_FLASH (0x02)
  560. #define MPI_FW_UPLOAD_ITYPE_NVDATA (0x03)
  561. #define MPI_FW_UPLOAD_ITYPE_BOOTLOADER (0x04)
  562. typedef struct _FWUploadTCSGE
  563. {
  564. U8 Reserved; /* 00h */
  565. U8 ContextSize; /* 01h */
  566. U8 DetailsLength; /* 02h */
  567. U8 Flags; /* 03h */
  568. U32 Reserved1; /* 04h */
  569. U32 ImageOffset; /* 08h */
  570. U32 ImageSize; /* 0Ch */
  571. } FW_UPLOAD_TCSGE, MPI_POINTER PTR_FW_UPLOAD_TCSGE,
  572. FWUploadTCSGE_t, MPI_POINTER pFWUploadTCSGE_t;
  573. /* Firmware Upload reply */
  574. typedef struct _MSG_FW_UPLOAD_REPLY
  575. {
  576. U8 ImageType; /* 00h */
  577. U8 Reserved; /* 01h */
  578. U8 MsgLength; /* 02h */
  579. U8 Function; /* 03h */
  580. U8 Reserved1[3]; /* 04h */
  581. U8 MsgFlags; /* 07h */
  582. U32 MsgContext; /* 08h */
  583. U16 Reserved2; /* 0Ch */
  584. U16 IOCStatus; /* 0Eh */
  585. U32 IOCLogInfo; /* 10h */
  586. U32 ActualImageSize; /* 14h */
  587. } MSG_FW_UPLOAD_REPLY, MPI_POINTER PTR_MSG_FW_UPLOAD_REPLY,
  588. FWUploadReply_t, MPI_POINTER pFWUploadReply_t;
  589. typedef struct _MPI_FW_HEADER
  590. {
  591. U32 ArmBranchInstruction0; /* 00h */
  592. U32 Signature0; /* 04h */
  593. U32 Signature1; /* 08h */
  594. U32 Signature2; /* 0Ch */
  595. U32 ArmBranchInstruction1; /* 10h */
  596. U32 ArmBranchInstruction2; /* 14h */
  597. U32 Reserved; /* 18h */
  598. U32 Checksum; /* 1Ch */
  599. U16 VendorId; /* 20h */
  600. U16 ProductId; /* 22h */
  601. MPI_FW_VERSION FWVersion; /* 24h */
  602. U32 SeqCodeVersion; /* 28h */
  603. U32 ImageSize; /* 2Ch */
  604. U32 NextImageHeaderOffset; /* 30h */
  605. U32 LoadStartAddress; /* 34h */
  606. U32 IopResetVectorValue; /* 38h */
  607. U32 IopResetRegAddr; /* 3Ch */
  608. U32 VersionNameWhat; /* 40h */
  609. U8 VersionName[32]; /* 44h */
  610. U32 VendorNameWhat; /* 64h */
  611. U8 VendorName[32]; /* 68h */
  612. } MPI_FW_HEADER, MPI_POINTER PTR_MPI_FW_HEADER,
  613. MpiFwHeader_t, MPI_POINTER pMpiFwHeader_t;
  614. #define MPI_FW_HEADER_WHAT_SIGNATURE (0x29232840)
  615. /* defines for using the ProductId field */
  616. #define MPI_FW_HEADER_PID_TYPE_MASK (0xF000)
  617. #define MPI_FW_HEADER_PID_TYPE_SCSI (0x0000)
  618. #define MPI_FW_HEADER_PID_TYPE_FC (0x1000)
  619. #define MPI_FW_HEADER_PID_TYPE_SAS (0x2000)
  620. #define MPI_FW_HEADER_SIGNATURE_0 (0x5AEAA55A)
  621. #define MPI_FW_HEADER_SIGNATURE_1 (0xA55AEAA5)
  622. #define MPI_FW_HEADER_SIGNATURE_2 (0x5AA55AEA)
  623. #define MPI_FW_HEADER_PID_PROD_MASK (0x0F00)
  624. #define MPI_FW_HEADER_PID_PROD_INITIATOR_SCSI (0x0100)
  625. #define MPI_FW_HEADER_PID_PROD_TARGET_INITIATOR_SCSI (0x0200)
  626. #define MPI_FW_HEADER_PID_PROD_TARGET_SCSI (0x0300)
  627. #define MPI_FW_HEADER_PID_PROD_IM_SCSI (0x0400)
  628. #define MPI_FW_HEADER_PID_PROD_IS_SCSI (0x0500)
  629. #define MPI_FW_HEADER_PID_PROD_CTX_SCSI (0x0600)
  630. #define MPI_FW_HEADER_PID_FAMILY_MASK (0x00FF)
  631. /* SCSI */
  632. #define MPI_FW_HEADER_PID_FAMILY_1030A0_SCSI (0x0001)
  633. #define MPI_FW_HEADER_PID_FAMILY_1030B0_SCSI (0x0002)
  634. #define MPI_FW_HEADER_PID_FAMILY_1030B1_SCSI (0x0003)
  635. #define MPI_FW_HEADER_PID_FAMILY_1030C0_SCSI (0x0004)
  636. #define MPI_FW_HEADER_PID_FAMILY_1020A0_SCSI (0x0005)
  637. #define MPI_FW_HEADER_PID_FAMILY_1020B0_SCSI (0x0006)
  638. #define MPI_FW_HEADER_PID_FAMILY_1020B1_SCSI (0x0007)
  639. #define MPI_FW_HEADER_PID_FAMILY_1020C0_SCSI (0x0008)
  640. #define MPI_FW_HEADER_PID_FAMILY_1035A0_SCSI (0x0009)
  641. #define MPI_FW_HEADER_PID_FAMILY_1035B0_SCSI (0x000A)
  642. #define MPI_FW_HEADER_PID_FAMILY_1030TA0_SCSI (0x000B)
  643. #define MPI_FW_HEADER_PID_FAMILY_1020TA0_SCSI (0x000C)
  644. /* Fibre Channel */
  645. #define MPI_FW_HEADER_PID_FAMILY_909_FC (0x0000)
  646. #define MPI_FW_HEADER_PID_FAMILY_919_FC (0x0001)
  647. #define MPI_FW_HEADER_PID_FAMILY_919X_FC (0x0002)
  648. #define MPI_FW_HEADER_PID_FAMILY_919XL_FC (0x0003)
  649. #define MPI_FW_HEADER_PID_FAMILY_949_FC (0x0004)
  650. #define MPI_FW_HEADER_PID_FAMILY_959_FC (0x0005)
  651. /* SAS */
  652. #define MPI_FW_HEADER_PID_FAMILY_1064_SAS (0x0001)
  653. typedef struct _MPI_EXT_IMAGE_HEADER
  654. {
  655. U8 ImageType; /* 00h */
  656. U8 Reserved; /* 01h */
  657. U16 Reserved1; /* 02h */
  658. U32 Checksum; /* 04h */
  659. U32 ImageSize; /* 08h */
  660. U32 NextImageHeaderOffset; /* 0Ch */
  661. U32 LoadStartAddress; /* 10h */
  662. U32 Reserved2; /* 14h */
  663. } MPI_EXT_IMAGE_HEADER, MPI_POINTER PTR_MPI_EXT_IMAGE_HEADER,
  664. MpiExtImageHeader_t, MPI_POINTER pMpiExtImageHeader_t;
  665. /* defines for the ImageType field */
  666. #define MPI_EXT_IMAGE_TYPE_UNSPECIFIED (0x00)
  667. #define MPI_EXT_IMAGE_TYPE_FW (0x01)
  668. #define MPI_EXT_IMAGE_TYPE_NVDATA (0x03)
  669. #define MPI_EXT_IMAGE_TYPE_BOOTLOADER (0x04)
  670. #endif