mpi30_ioc.h 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Copyright 2016-2022 Broadcom Inc. All rights reserved.
  4. */
  5. #ifndef MPI30_IOC_H
  6. #define MPI30_IOC_H 1
  7. struct mpi3_ioc_init_request {
  8. __le16 host_tag;
  9. u8 ioc_use_only02;
  10. u8 function;
  11. __le16 ioc_use_only04;
  12. u8 ioc_use_only06;
  13. u8 msg_flags;
  14. __le16 change_count;
  15. __le16 reserved0a;
  16. union mpi3_version_union mpi_version;
  17. __le64 time_stamp;
  18. u8 reserved18;
  19. u8 who_init;
  20. __le16 reserved1a;
  21. __le16 reply_free_queue_depth;
  22. __le16 reserved1e;
  23. __le64 reply_free_queue_address;
  24. __le32 reserved28;
  25. __le16 sense_buffer_free_queue_depth;
  26. __le16 sense_buffer_length;
  27. __le64 sense_buffer_free_queue_address;
  28. __le64 driver_information_address;
  29. };
  30. #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_MASK (0x03)
  31. #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_NOT_USED (0x00)
  32. #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_SEPARATED (0x01)
  33. #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_INLINE (0x02)
  34. #define MPI3_IOCINIT_MSGFLAGS_HOSTMETADATA_BOTH (0x03)
  35. #define MPI3_WHOINIT_NOT_INITIALIZED (0x00)
  36. #define MPI3_WHOINIT_ROM_BIOS (0x02)
  37. #define MPI3_WHOINIT_HOST_DRIVER (0x03)
  38. #define MPI3_WHOINIT_MANUFACTURER (0x04)
  39. struct mpi3_ioc_facts_request {
  40. __le16 host_tag;
  41. u8 ioc_use_only02;
  42. u8 function;
  43. __le16 ioc_use_only04;
  44. u8 ioc_use_only06;
  45. u8 msg_flags;
  46. __le16 change_count;
  47. __le16 reserved0a;
  48. __le32 reserved0c;
  49. union mpi3_sge_union sgl;
  50. };
  51. struct mpi3_ioc_facts_data {
  52. __le16 ioc_facts_data_length;
  53. __le16 reserved02;
  54. union mpi3_version_union mpi_version;
  55. struct mpi3_comp_image_version fw_version;
  56. __le32 ioc_capabilities;
  57. u8 ioc_number;
  58. u8 who_init;
  59. __le16 max_msix_vectors;
  60. __le16 max_outstanding_requests;
  61. __le16 product_id;
  62. __le16 ioc_request_frame_size;
  63. __le16 reply_frame_size;
  64. __le16 ioc_exceptions;
  65. __le16 max_persistent_id;
  66. u8 sge_modifier_mask;
  67. u8 sge_modifier_value;
  68. u8 sge_modifier_shift;
  69. u8 protocol_flags;
  70. __le16 max_sas_initiators;
  71. __le16 max_data_length;
  72. __le16 max_sas_expanders;
  73. __le16 max_enclosures;
  74. __le16 min_dev_handle;
  75. __le16 max_dev_handle;
  76. __le16 max_pcie_switches;
  77. __le16 max_nvme;
  78. __le16 reserved38;
  79. __le16 max_vds;
  80. __le16 max_host_pds;
  81. __le16 max_adv_host_pds;
  82. __le16 max_raid_pds;
  83. __le16 max_posted_cmd_buffers;
  84. __le32 flags;
  85. __le16 max_operational_request_queues;
  86. __le16 max_operational_reply_queues;
  87. __le16 shutdown_timeout;
  88. __le16 reserved4e;
  89. __le32 diag_trace_size;
  90. __le32 diag_fw_size;
  91. __le32 diag_driver_size;
  92. u8 max_host_pd_ns_count;
  93. u8 max_adv_host_pd_ns_count;
  94. u8 max_raidpd_ns_count;
  95. u8 max_devices_per_throttle_group;
  96. __le16 io_throttle_data_length;
  97. __le16 max_io_throttle_group;
  98. __le16 io_throttle_low;
  99. __le16 io_throttle_high;
  100. };
  101. #define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_MASK (0x80000000)
  102. #define MPI3_IOCFACTS_CAPABILITY_SUPERVISOR_IOC (0x00000000)
  103. #define MPI3_IOCFACTS_CAPABILITY_NON_SUPERVISOR_IOC (0x80000000)
  104. #define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_MASK (0x00000600)
  105. #define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_FIXED_THRESHOLD (0x00000000)
  106. #define MPI3_IOCFACTS_CAPABILITY_INT_COALESCE_OUTSTANDING_IO (0x00000200)
  107. #define MPI3_IOCFACTS_CAPABILITY_COMPLETE_RESET_CAPABLE (0x00000100)
  108. #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_TRACE_ENABLED (0x00000080)
  109. #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_FW_ENABLED (0x00000040)
  110. #define MPI3_IOCFACTS_CAPABILITY_SEG_DIAG_DRIVER_ENABLED (0x00000020)
  111. #define MPI3_IOCFACTS_CAPABILITY_ADVANCED_HOST_PD_ENABLED (0x00000010)
  112. #define MPI3_IOCFACTS_CAPABILITY_RAID_CAPABLE (0x00000008)
  113. #define MPI3_IOCFACTS_CAPABILITY_MULTIPATH_ENABLED (0x00000002)
  114. #define MPI3_IOCFACTS_CAPABILITY_COALESCE_CTRL_SUPPORTED (0x00000001)
  115. #define MPI3_IOCFACTS_PID_TYPE_MASK (0xf000)
  116. #define MPI3_IOCFACTS_PID_TYPE_SHIFT (12)
  117. #define MPI3_IOCFACTS_PID_PRODUCT_MASK (0x0f00)
  118. #define MPI3_IOCFACTS_PID_PRODUCT_SHIFT (8)
  119. #define MPI3_IOCFACTS_PID_FAMILY_MASK (0x00ff)
  120. #define MPI3_IOCFACTS_PID_FAMILY_SHIFT (0)
  121. #define MPI3_IOCFACTS_EXCEPT_SECURITY_REKEY (0x2000)
  122. #define MPI3_IOCFACTS_EXCEPT_SAS_DISABLED (0x1000)
  123. #define MPI3_IOCFACTS_EXCEPT_SAFE_MODE (0x0800)
  124. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_MASK (0x0700)
  125. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_NONE (0x0000)
  126. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_LOCAL_VIA_MGMT (0x0100)
  127. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_EXT_VIA_MGMT (0x0200)
  128. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_DRIVE_EXT_VIA_MGMT (0x0300)
  129. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_LOCAL_VIA_OOB (0x0400)
  130. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_EXT_VIA_OOB (0x0500)
  131. #define MPI3_IOCFACTS_EXCEPT_SECURITY_KEY_DRIVE_EXT_VIA_OOB (0x0600)
  132. #define MPI3_IOCFACTS_EXCEPT_PCIE_DISABLED (0x0080)
  133. #define MPI3_IOCFACTS_EXCEPT_PARTIAL_MEMORY_FAILURE (0x0040)
  134. #define MPI3_IOCFACTS_EXCEPT_MANUFACT_CHECKSUM_FAIL (0x0020)
  135. #define MPI3_IOCFACTS_EXCEPT_FW_CHECKSUM_FAIL (0x0010)
  136. #define MPI3_IOCFACTS_EXCEPT_CONFIG_CHECKSUM_FAIL (0x0008)
  137. #define MPI3_IOCFACTS_EXCEPT_BOOTSTAT_MASK (0x0001)
  138. #define MPI3_IOCFACTS_EXCEPT_BOOTSTAT_PRIMARY (0x0000)
  139. #define MPI3_IOCFACTS_EXCEPT_BOOTSTAT_SECONDARY (0x0001)
  140. #define MPI3_IOCFACTS_PROTOCOL_SAS (0x0010)
  141. #define MPI3_IOCFACTS_PROTOCOL_SATA (0x0008)
  142. #define MPI3_IOCFACTS_PROTOCOL_NVME (0x0004)
  143. #define MPI3_IOCFACTS_PROTOCOL_SCSI_INITIATOR (0x0002)
  144. #define MPI3_IOCFACTS_PROTOCOL_SCSI_TARGET (0x0001)
  145. #define MPI3_IOCFACTS_MAX_DATA_LENGTH_NOT_REPORTED (0x0000)
  146. #define MPI3_IOCFACTS_FLAGS_SIGNED_NVDATA_REQUIRED (0x00010000)
  147. #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_MASK (0x0000ff00)
  148. #define MPI3_IOCFACTS_FLAGS_DMA_ADDRESS_WIDTH_SHIFT (8)
  149. #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_MASK (0x00000030)
  150. #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_NOT_STARTED (0x00000000)
  151. #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_IN_PROGRESS (0x00000010)
  152. #define MPI3_IOCFACTS_FLAGS_INITIAL_PORT_ENABLE_COMPLETE (0x00000020)
  153. #define MPI3_IOCFACTS_FLAGS_PERSONALITY_MASK (0x0000000f)
  154. #define MPI3_IOCFACTS_FLAGS_PERSONALITY_EHBA (0x00000000)
  155. #define MPI3_IOCFACTS_FLAGS_PERSONALITY_RAID_DDR (0x00000002)
  156. #define MPI3_IOCFACTS_IO_THROTTLE_DATA_LENGTH_NOT_REQUIRED (0x0000)
  157. #define MPI3_IOCFACTS_MAX_IO_THROTTLE_GROUP_NOT_REQUIRED (0x0000)
  158. struct mpi3_mgmt_passthrough_request {
  159. __le16 host_tag;
  160. u8 ioc_use_only02;
  161. u8 function;
  162. __le16 ioc_use_only04;
  163. u8 ioc_use_only06;
  164. u8 msg_flags;
  165. __le16 change_count;
  166. __le16 reserved0a;
  167. __le32 reserved0c[5];
  168. union mpi3_sge_union command_sgl;
  169. union mpi3_sge_union response_sgl;
  170. };
  171. struct mpi3_create_request_queue_request {
  172. __le16 host_tag;
  173. u8 ioc_use_only02;
  174. u8 function;
  175. __le16 ioc_use_only04;
  176. u8 ioc_use_only06;
  177. u8 msg_flags;
  178. __le16 change_count;
  179. u8 flags;
  180. u8 burst;
  181. __le16 size;
  182. __le16 queue_id;
  183. __le16 reply_queue_id;
  184. __le16 reserved12;
  185. __le32 reserved14;
  186. __le64 base_address;
  187. };
  188. #define MPI3_CREATE_REQUEST_QUEUE_FLAGS_SEGMENTED_MASK (0x80)
  189. #define MPI3_CREATE_REQUEST_QUEUE_FLAGS_SEGMENTED_SEGMENTED (0x80)
  190. #define MPI3_CREATE_REQUEST_QUEUE_FLAGS_SEGMENTED_CONTIGUOUS (0x00)
  191. #define MPI3_CREATE_REQUEST_QUEUE_SIZE_MINIMUM (2)
  192. struct mpi3_delete_request_queue_request {
  193. __le16 host_tag;
  194. u8 ioc_use_only02;
  195. u8 function;
  196. __le16 ioc_use_only04;
  197. u8 ioc_use_only06;
  198. u8 msg_flags;
  199. __le16 change_count;
  200. __le16 queue_id;
  201. };
  202. struct mpi3_create_reply_queue_request {
  203. __le16 host_tag;
  204. u8 ioc_use_only02;
  205. u8 function;
  206. __le16 ioc_use_only04;
  207. u8 ioc_use_only06;
  208. u8 msg_flags;
  209. __le16 change_count;
  210. u8 flags;
  211. u8 reserved0b;
  212. __le16 size;
  213. __le16 queue_id;
  214. __le16 msix_index;
  215. __le16 reserved12;
  216. __le32 reserved14;
  217. __le64 base_address;
  218. };
  219. #define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_MASK (0x80)
  220. #define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_SEGMENTED (0x80)
  221. #define MPI3_CREATE_REPLY_QUEUE_FLAGS_SEGMENTED_CONTIGUOUS (0x00)
  222. #define MPI3_CREATE_REPLY_QUEUE_FLAGS_COALESCE_DISABLE (0x02)
  223. #define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_MASK (0x01)
  224. #define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_DISABLE (0x00)
  225. #define MPI3_CREATE_REPLY_QUEUE_FLAGS_INT_ENABLE_ENABLE (0x01)
  226. #define MPI3_CREATE_REPLY_QUEUE_SIZE_MINIMUM (2)
  227. struct mpi3_delete_reply_queue_request {
  228. __le16 host_tag;
  229. u8 ioc_use_only02;
  230. u8 function;
  231. __le16 ioc_use_only04;
  232. u8 ioc_use_only06;
  233. u8 msg_flags;
  234. __le16 change_count;
  235. __le16 queue_id;
  236. };
  237. struct mpi3_port_enable_request {
  238. __le16 host_tag;
  239. u8 ioc_use_only02;
  240. u8 function;
  241. __le16 ioc_use_only04;
  242. u8 ioc_use_only06;
  243. u8 msg_flags;
  244. __le16 change_count;
  245. __le16 reserved0a;
  246. };
  247. #define MPI3_EVENT_LOG_DATA (0x01)
  248. #define MPI3_EVENT_CHANGE (0x02)
  249. #define MPI3_EVENT_GPIO_INTERRUPT (0x04)
  250. #define MPI3_EVENT_CABLE_MGMT (0x06)
  251. #define MPI3_EVENT_DEVICE_ADDED (0x07)
  252. #define MPI3_EVENT_DEVICE_INFO_CHANGED (0x08)
  253. #define MPI3_EVENT_PREPARE_FOR_RESET (0x09)
  254. #define MPI3_EVENT_COMP_IMAGE_ACT_START (0x0a)
  255. #define MPI3_EVENT_ENCL_DEVICE_ADDED (0x0b)
  256. #define MPI3_EVENT_ENCL_DEVICE_STATUS_CHANGE (0x0c)
  257. #define MPI3_EVENT_DEVICE_STATUS_CHANGE (0x0d)
  258. #define MPI3_EVENT_ENERGY_PACK_CHANGE (0x0e)
  259. #define MPI3_EVENT_SAS_DISCOVERY (0x11)
  260. #define MPI3_EVENT_SAS_BROADCAST_PRIMITIVE (0x12)
  261. #define MPI3_EVENT_SAS_NOTIFY_PRIMITIVE (0x13)
  262. #define MPI3_EVENT_SAS_INIT_DEVICE_STATUS_CHANGE (0x14)
  263. #define MPI3_EVENT_SAS_INIT_TABLE_OVERFLOW (0x15)
  264. #define MPI3_EVENT_SAS_TOPOLOGY_CHANGE_LIST (0x16)
  265. #define MPI3_EVENT_SAS_PHY_COUNTER (0x18)
  266. #define MPI3_EVENT_SAS_DEVICE_DISCOVERY_ERROR (0x19)
  267. #define MPI3_EVENT_PCIE_TOPOLOGY_CHANGE_LIST (0x20)
  268. #define MPI3_EVENT_PCIE_ENUMERATION (0x22)
  269. #define MPI3_EVENT_PCIE_ERROR_THRESHOLD (0x23)
  270. #define MPI3_EVENT_HARD_RESET_RECEIVED (0x40)
  271. #define MPI3_EVENT_DIAGNOSTIC_BUFFER_STATUS_CHANGE (0x50)
  272. #define MPI3_EVENT_MIN_PRODUCT_SPECIFIC (0x60)
  273. #define MPI3_EVENT_MAX_PRODUCT_SPECIFIC (0x7f)
  274. #define MPI3_EVENT_NOTIFY_EVENTMASK_WORDS (4)
  275. struct mpi3_event_notification_request {
  276. __le16 host_tag;
  277. u8 ioc_use_only02;
  278. u8 function;
  279. __le16 ioc_use_only04;
  280. u8 ioc_use_only06;
  281. u8 msg_flags;
  282. __le16 change_count;
  283. __le16 reserved0a;
  284. __le16 sas_broadcast_primitive_masks;
  285. __le16 sas_notify_primitive_masks;
  286. __le32 event_masks[MPI3_EVENT_NOTIFY_EVENTMASK_WORDS];
  287. };
  288. struct mpi3_event_notification_reply {
  289. __le16 host_tag;
  290. u8 ioc_use_only02;
  291. u8 function;
  292. __le16 ioc_use_only04;
  293. u8 ioc_use_only06;
  294. u8 msg_flags;
  295. __le16 ioc_use_only08;
  296. __le16 ioc_status;
  297. __le32 ioc_log_info;
  298. u8 event_data_length;
  299. u8 event;
  300. __le16 ioc_change_count;
  301. __le32 event_context;
  302. __le32 event_data[1];
  303. };
  304. #define MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_MASK (0x01)
  305. #define MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_REQUIRED (0x01)
  306. #define MPI3_EVENT_NOTIFY_MSGFLAGS_ACK_NOT_REQUIRED (0x00)
  307. #define MPI3_EVENT_NOTIFY_MSGFLAGS_EVENT_ORIGINALITY_MASK (0x02)
  308. #define MPI3_EVENT_NOTIFY_MSGFLAGS_EVENT_ORIGINALITY_ORIGINAL (0x00)
  309. #define MPI3_EVENT_NOTIFY_MSGFLAGS_EVENT_ORIGINALITY_REPLAY (0x02)
  310. struct mpi3_event_data_gpio_interrupt {
  311. u8 gpio_num;
  312. u8 reserved01[3];
  313. };
  314. struct mpi3_event_data_cable_management {
  315. __le32 active_cable_power_requirement;
  316. u8 status;
  317. u8 receptacle_id;
  318. __le16 reserved06;
  319. };
  320. #define MPI3_EVENT_CABLE_MGMT_ACT_CABLE_PWR_INVALID (0xffffffff)
  321. #define MPI3_EVENT_CABLE_MGMT_STATUS_INSUFFICIENT_POWER (0x00)
  322. #define MPI3_EVENT_CABLE_MGMT_STATUS_PRESENT (0x01)
  323. #define MPI3_EVENT_CABLE_MGMT_STATUS_DEGRADED (0x02)
  324. struct mpi3_event_ack_request {
  325. __le16 host_tag;
  326. u8 ioc_use_only02;
  327. u8 function;
  328. __le16 ioc_use_only04;
  329. u8 ioc_use_only06;
  330. u8 msg_flags;
  331. __le16 change_count;
  332. __le16 reserved0a;
  333. u8 event;
  334. u8 reserved0d[3];
  335. __le32 event_context;
  336. };
  337. struct mpi3_event_data_prepare_for_reset {
  338. u8 reason_code;
  339. u8 reserved01;
  340. __le16 reserved02;
  341. };
  342. #define MPI3_EVENT_PREPARE_RESET_RC_START (0x01)
  343. #define MPI3_EVENT_PREPARE_RESET_RC_ABORT (0x02)
  344. struct mpi3_event_data_comp_image_activation {
  345. __le32 reserved00;
  346. };
  347. struct mpi3_event_data_device_status_change {
  348. __le16 task_tag;
  349. u8 reason_code;
  350. u8 io_unit_port;
  351. __le16 parent_dev_handle;
  352. __le16 dev_handle;
  353. __le64 wwid;
  354. u8 lun[8];
  355. };
  356. #define MPI3_EVENT_DEV_STAT_RC_MOVED (0x01)
  357. #define MPI3_EVENT_DEV_STAT_RC_HIDDEN (0x02)
  358. #define MPI3_EVENT_DEV_STAT_RC_NOT_HIDDEN (0x03)
  359. #define MPI3_EVENT_DEV_STAT_RC_ASYNC_NOTIFICATION (0x04)
  360. #define MPI3_EVENT_DEV_STAT_RC_INT_DEVICE_RESET_STRT (0x20)
  361. #define MPI3_EVENT_DEV_STAT_RC_INT_DEVICE_RESET_CMP (0x21)
  362. #define MPI3_EVENT_DEV_STAT_RC_INT_TASK_ABORT_STRT (0x22)
  363. #define MPI3_EVENT_DEV_STAT_RC_INT_TASK_ABORT_CMP (0x23)
  364. #define MPI3_EVENT_DEV_STAT_RC_INT_IT_NEXUS_RESET_STRT (0x24)
  365. #define MPI3_EVENT_DEV_STAT_RC_INT_IT_NEXUS_RESET_CMP (0x25)
  366. #define MPI3_EVENT_DEV_STAT_RC_PCIE_HOT_RESET_FAILED (0x30)
  367. #define MPI3_EVENT_DEV_STAT_RC_EXPANDER_REDUCED_FUNC_STRT (0x40)
  368. #define MPI3_EVENT_DEV_STAT_RC_EXPANDER_REDUCED_FUNC_CMP (0x41)
  369. #define MPI3_EVENT_DEV_STAT_RC_VD_NOT_RESPONDING (0x50)
  370. struct mpi3_event_data_energy_pack_change {
  371. __le32 reserved00;
  372. __le16 shutdown_timeout;
  373. __le16 reserved06;
  374. };
  375. struct mpi3_event_data_sas_discovery {
  376. u8 flags;
  377. u8 reason_code;
  378. u8 io_unit_port;
  379. u8 reserved03;
  380. __le32 discovery_status;
  381. };
  382. #define MPI3_EVENT_SAS_DISC_FLAGS_DEVICE_CHANGE (0x02)
  383. #define MPI3_EVENT_SAS_DISC_FLAGS_IN_PROGRESS (0x01)
  384. #define MPI3_EVENT_SAS_DISC_RC_STARTED (0x01)
  385. #define MPI3_EVENT_SAS_DISC_RC_COMPLETED (0x02)
  386. #define MPI3_SAS_DISC_STATUS_MAX_ENCLOSURES_EXCEED (0x80000000)
  387. #define MPI3_SAS_DISC_STATUS_MAX_EXPANDERS_EXCEED (0x40000000)
  388. #define MPI3_SAS_DISC_STATUS_MAX_DEVICES_EXCEED (0x20000000)
  389. #define MPI3_SAS_DISC_STATUS_MAX_TOPO_PHYS_EXCEED (0x10000000)
  390. #define MPI3_SAS_DISC_STATUS_INVALID_CEI (0x00010000)
  391. #define MPI3_SAS_DISC_STATUS_FECEI_MISMATCH (0x00008000)
  392. #define MPI3_SAS_DISC_STATUS_MULTIPLE_DEVICES_IN_SLOT (0x00004000)
  393. #define MPI3_SAS_DISC_STATUS_NECEI_MISMATCH (0x00002000)
  394. #define MPI3_SAS_DISC_STATUS_TOO_MANY_SLOTS (0x00001000)
  395. #define MPI3_SAS_DISC_STATUS_EXP_MULTI_SUBTRACTIVE (0x00000800)
  396. #define MPI3_SAS_DISC_STATUS_MULTI_PORT_DOMAIN (0x00000400)
  397. #define MPI3_SAS_DISC_STATUS_TABLE_TO_SUBTRACTIVE_LINK (0x00000200)
  398. #define MPI3_SAS_DISC_STATUS_UNSUPPORTED_DEVICE (0x00000100)
  399. #define MPI3_SAS_DISC_STATUS_TABLE_LINK (0x00000080)
  400. #define MPI3_SAS_DISC_STATUS_SUBTRACTIVE_LINK (0x00000040)
  401. #define MPI3_SAS_DISC_STATUS_SMP_CRC_ERROR (0x00000020)
  402. #define MPI3_SAS_DISC_STATUS_SMP_FUNCTION_FAILED (0x00000010)
  403. #define MPI3_SAS_DISC_STATUS_SMP_TIMEOUT (0x00000008)
  404. #define MPI3_SAS_DISC_STATUS_MULTIPLE_PORTS (0x00000004)
  405. #define MPI3_SAS_DISC_STATUS_INVALID_SAS_ADDRESS (0x00000002)
  406. #define MPI3_SAS_DISC_STATUS_LOOP_DETECTED (0x00000001)
  407. struct mpi3_event_data_sas_broadcast_primitive {
  408. u8 phy_num;
  409. u8 io_unit_port;
  410. u8 port_width;
  411. u8 primitive;
  412. };
  413. #define MPI3_EVENT_BROADCAST_PRIMITIVE_CHANGE (0x01)
  414. #define MPI3_EVENT_BROADCAST_PRIMITIVE_SES (0x02)
  415. #define MPI3_EVENT_BROADCAST_PRIMITIVE_EXPANDER (0x03)
  416. #define MPI3_EVENT_BROADCAST_PRIMITIVE_ASYNCHRONOUS_EVENT (0x04)
  417. #define MPI3_EVENT_BROADCAST_PRIMITIVE_RESERVED3 (0x05)
  418. #define MPI3_EVENT_BROADCAST_PRIMITIVE_RESERVED4 (0x06)
  419. #define MPI3_EVENT_BROADCAST_PRIMITIVE_CHANGE0_RESERVED (0x07)
  420. #define MPI3_EVENT_BROADCAST_PRIMITIVE_CHANGE1_RESERVED (0x08)
  421. struct mpi3_event_data_sas_notify_primitive {
  422. u8 phy_num;
  423. u8 io_unit_port;
  424. u8 reserved02;
  425. u8 primitive;
  426. };
  427. #define MPI3_EVENT_NOTIFY_PRIMITIVE_ENABLE_SPINUP (0x01)
  428. #define MPI3_EVENT_NOTIFY_PRIMITIVE_POWER_LOSS_EXPECTED (0x02)
  429. #define MPI3_EVENT_NOTIFY_PRIMITIVE_RESERVED1 (0x03)
  430. #define MPI3_EVENT_NOTIFY_PRIMITIVE_RESERVED2 (0x04)
  431. #ifndef MPI3_EVENT_SAS_TOPO_PHY_COUNT
  432. #define MPI3_EVENT_SAS_TOPO_PHY_COUNT (1)
  433. #endif
  434. struct mpi3_event_sas_topo_phy_entry {
  435. __le16 attached_dev_handle;
  436. u8 link_rate;
  437. u8 status;
  438. };
  439. #define MPI3_EVENT_SAS_TOPO_LR_CURRENT_MASK (0xf0)
  440. #define MPI3_EVENT_SAS_TOPO_LR_CURRENT_SHIFT (4)
  441. #define MPI3_EVENT_SAS_TOPO_LR_PREV_MASK (0x0f)
  442. #define MPI3_EVENT_SAS_TOPO_LR_PREV_SHIFT (0)
  443. #define MPI3_EVENT_SAS_TOPO_LR_UNKNOWN_LINK_RATE (0x00)
  444. #define MPI3_EVENT_SAS_TOPO_LR_PHY_DISABLED (0x01)
  445. #define MPI3_EVENT_SAS_TOPO_LR_NEGOTIATION_FAILED (0x02)
  446. #define MPI3_EVENT_SAS_TOPO_LR_SATA_OOB_COMPLETE (0x03)
  447. #define MPI3_EVENT_SAS_TOPO_LR_PORT_SELECTOR (0x04)
  448. #define MPI3_EVENT_SAS_TOPO_LR_SMP_RESET_IN_PROGRESS (0x05)
  449. #define MPI3_EVENT_SAS_TOPO_LR_UNSUPPORTED_PHY (0x06)
  450. #define MPI3_EVENT_SAS_TOPO_LR_RATE_6_0 (0x0a)
  451. #define MPI3_EVENT_SAS_TOPO_LR_RATE_12_0 (0x0b)
  452. #define MPI3_EVENT_SAS_TOPO_LR_RATE_22_5 (0x0c)
  453. #define MPI3_EVENT_SAS_TOPO_PHY_STATUS_MASK (0xc0)
  454. #define MPI3_EVENT_SAS_TOPO_PHY_STATUS_SHIFT (6)
  455. #define MPI3_EVENT_SAS_TOPO_PHY_STATUS_ACCESSIBLE (0x00)
  456. #define MPI3_EVENT_SAS_TOPO_PHY_STATUS_NO_EXIST (0x40)
  457. #define MPI3_EVENT_SAS_TOPO_PHY_STATUS_VACANT (0x80)
  458. #define MPI3_EVENT_SAS_TOPO_PHY_RC_MASK (0x0f)
  459. #define MPI3_EVENT_SAS_TOPO_PHY_RC_TARG_NOT_RESPONDING (0x02)
  460. #define MPI3_EVENT_SAS_TOPO_PHY_RC_PHY_CHANGED (0x03)
  461. #define MPI3_EVENT_SAS_TOPO_PHY_RC_NO_CHANGE (0x04)
  462. #define MPI3_EVENT_SAS_TOPO_PHY_RC_DELAY_NOT_RESPONDING (0x05)
  463. #define MPI3_EVENT_SAS_TOPO_PHY_RC_RESPONDING (0x06)
  464. struct mpi3_event_data_sas_topology_change_list {
  465. __le16 enclosure_handle;
  466. __le16 expander_dev_handle;
  467. u8 num_phys;
  468. u8 reserved05[3];
  469. u8 num_entries;
  470. u8 start_phy_num;
  471. u8 exp_status;
  472. u8 io_unit_port;
  473. struct mpi3_event_sas_topo_phy_entry phy_entry[MPI3_EVENT_SAS_TOPO_PHY_COUNT];
  474. };
  475. #define MPI3_EVENT_SAS_TOPO_ES_NO_EXPANDER (0x00)
  476. #define MPI3_EVENT_SAS_TOPO_ES_NOT_RESPONDING (0x02)
  477. #define MPI3_EVENT_SAS_TOPO_ES_RESPONDING (0x03)
  478. #define MPI3_EVENT_SAS_TOPO_ES_DELAY_NOT_RESPONDING (0x04)
  479. struct mpi3_event_data_sas_phy_counter {
  480. __le64 time_stamp;
  481. __le32 reserved08;
  482. u8 phy_event_code;
  483. u8 phy_num;
  484. __le16 reserved0e;
  485. __le32 phy_event_info;
  486. u8 counter_type;
  487. u8 threshold_window;
  488. u8 time_units;
  489. u8 reserved17;
  490. __le32 event_threshold;
  491. __le16 threshold_flags;
  492. __le16 reserved1e;
  493. };
  494. struct mpi3_event_data_sas_device_disc_err {
  495. __le16 dev_handle;
  496. u8 reason_code;
  497. u8 io_unit_port;
  498. __le32 reserved04;
  499. __le64 sas_address;
  500. };
  501. #define MPI3_EVENT_SAS_DISC_ERR_RC_SMP_FAILED (0x01)
  502. #define MPI3_EVENT_SAS_DISC_ERR_RC_SMP_TIMEOUT (0x02)
  503. struct mpi3_event_data_pcie_enumeration {
  504. u8 flags;
  505. u8 reason_code;
  506. u8 io_unit_port;
  507. u8 reserved03;
  508. __le32 enumeration_status;
  509. };
  510. #define MPI3_EVENT_PCIE_ENUM_FLAGS_DEVICE_CHANGE (0x02)
  511. #define MPI3_EVENT_PCIE_ENUM_FLAGS_IN_PROGRESS (0x01)
  512. #define MPI3_EVENT_PCIE_ENUM_RC_STARTED (0x01)
  513. #define MPI3_EVENT_PCIE_ENUM_RC_COMPLETED (0x02)
  514. #define MPI3_EVENT_PCIE_ENUM_ES_MAX_SWITCH_DEPTH_EXCEED (0x80000000)
  515. #define MPI3_EVENT_PCIE_ENUM_ES_MAX_SWITCHES_EXCEED (0x40000000)
  516. #define MPI3_EVENT_PCIE_ENUM_ES_MAX_DEVICES_EXCEED (0x20000000)
  517. #define MPI3_EVENT_PCIE_ENUM_ES_RESOURCES_EXHAUSTED (0x10000000)
  518. #ifndef MPI3_EVENT_PCIE_TOPO_PORT_COUNT
  519. #define MPI3_EVENT_PCIE_TOPO_PORT_COUNT (1)
  520. #endif
  521. struct mpi3_event_pcie_topo_port_entry {
  522. __le16 attached_dev_handle;
  523. u8 port_status;
  524. u8 reserved03;
  525. u8 current_port_info;
  526. u8 reserved05;
  527. u8 previous_port_info;
  528. u8 reserved07;
  529. };
  530. #define MPI3_EVENT_PCIE_TOPO_PS_NOT_RESPONDING (0x02)
  531. #define MPI3_EVENT_PCIE_TOPO_PS_PORT_CHANGED (0x03)
  532. #define MPI3_EVENT_PCIE_TOPO_PS_NO_CHANGE (0x04)
  533. #define MPI3_EVENT_PCIE_TOPO_PS_DELAY_NOT_RESPONDING (0x05)
  534. #define MPI3_EVENT_PCIE_TOPO_PS_RESPONDING (0x06)
  535. #define MPI3_EVENT_PCIE_TOPO_PI_LANES_MASK (0xf0)
  536. #define MPI3_EVENT_PCIE_TOPO_PI_LANES_UNKNOWN (0x00)
  537. #define MPI3_EVENT_PCIE_TOPO_PI_LANES_1 (0x10)
  538. #define MPI3_EVENT_PCIE_TOPO_PI_LANES_2 (0x20)
  539. #define MPI3_EVENT_PCIE_TOPO_PI_LANES_4 (0x30)
  540. #define MPI3_EVENT_PCIE_TOPO_PI_LANES_8 (0x40)
  541. #define MPI3_EVENT_PCIE_TOPO_PI_LANES_16 (0x50)
  542. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_MASK (0x0f)
  543. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_UNKNOWN (0x00)
  544. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_DISABLED (0x01)
  545. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_2_5 (0x02)
  546. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_5_0 (0x03)
  547. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_8_0 (0x04)
  548. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_16_0 (0x05)
  549. #define MPI3_EVENT_PCIE_TOPO_PI_RATE_32_0 (0x06)
  550. struct mpi3_event_data_pcie_topology_change_list {
  551. __le16 enclosure_handle;
  552. __le16 switch_dev_handle;
  553. u8 num_ports;
  554. u8 reserved05[3];
  555. u8 num_entries;
  556. u8 start_port_num;
  557. u8 switch_status;
  558. u8 io_unit_port;
  559. __le32 reserved0c;
  560. struct mpi3_event_pcie_topo_port_entry port_entry[MPI3_EVENT_PCIE_TOPO_PORT_COUNT];
  561. };
  562. #define MPI3_EVENT_PCIE_TOPO_SS_NO_PCIE_SWITCH (0x00)
  563. #define MPI3_EVENT_PCIE_TOPO_SS_NOT_RESPONDING (0x02)
  564. #define MPI3_EVENT_PCIE_TOPO_SS_RESPONDING (0x03)
  565. #define MPI3_EVENT_PCIE_TOPO_SS_DELAY_NOT_RESPONDING (0x04)
  566. struct mpi3_event_data_pcie_error_threshold {
  567. __le64 timestamp;
  568. u8 reason_code;
  569. u8 port;
  570. __le16 switch_dev_handle;
  571. u8 error;
  572. u8 action;
  573. __le16 threshold_count;
  574. __le16 attached_dev_handle;
  575. __le16 reserved12;
  576. };
  577. #define MPI3_EVENT_PCI_ERROR_RC_THRESHOLD_EXCEEDED (0x00)
  578. #define MPI3_EVENT_PCI_ERROR_RC_ESCALATION (0x01)
  579. struct mpi3_event_data_sas_init_dev_status_change {
  580. u8 reason_code;
  581. u8 io_unit_port;
  582. __le16 dev_handle;
  583. __le32 reserved04;
  584. __le64 sas_address;
  585. };
  586. #define MPI3_EVENT_SAS_INIT_RC_ADDED (0x01)
  587. #define MPI3_EVENT_SAS_INIT_RC_NOT_RESPONDING (0x02)
  588. struct mpi3_event_data_sas_init_table_overflow {
  589. __le16 max_init;
  590. __le16 current_init;
  591. __le32 reserved04;
  592. __le64 sas_address;
  593. };
  594. struct mpi3_event_data_hard_reset_received {
  595. u8 reserved00;
  596. u8 io_unit_port;
  597. __le16 reserved02;
  598. };
  599. struct mpi3_event_data_diag_buffer_status_change {
  600. u8 type;
  601. u8 reason_code;
  602. __le16 reserved02;
  603. __le32 reserved04;
  604. };
  605. #define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_RELEASED (0x01)
  606. #define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_PAUSED (0x02)
  607. #define MPI3_EVENT_DIAG_BUFFER_STATUS_CHANGE_RC_RESUMED (0x03)
  608. #define MPI3_PEL_LOCALE_FLAGS_NON_BLOCKING_BOOT_EVENT (0x0200)
  609. #define MPI3_PEL_LOCALE_FLAGS_BLOCKING_BOOT_EVENT (0x0100)
  610. #define MPI3_PEL_LOCALE_FLAGS_PCIE (0x0080)
  611. #define MPI3_PEL_LOCALE_FLAGS_CONFIGURATION (0x0040)
  612. #define MPI3_PEL_LOCALE_FLAGS_CONTROLER (0x0020)
  613. #define MPI3_PEL_LOCALE_FLAGS_SAS (0x0010)
  614. #define MPI3_PEL_LOCALE_FLAGS_EPACK (0x0008)
  615. #define MPI3_PEL_LOCALE_FLAGS_ENCLOSURE (0x0004)
  616. #define MPI3_PEL_LOCALE_FLAGS_PD (0x0002)
  617. #define MPI3_PEL_LOCALE_FLAGS_VD (0x0001)
  618. #define MPI3_PEL_CLASS_DEBUG (0x00)
  619. #define MPI3_PEL_CLASS_PROGRESS (0x01)
  620. #define MPI3_PEL_CLASS_INFORMATIONAL (0x02)
  621. #define MPI3_PEL_CLASS_WARNING (0x03)
  622. #define MPI3_PEL_CLASS_CRITICAL (0x04)
  623. #define MPI3_PEL_CLASS_FATAL (0x05)
  624. #define MPI3_PEL_CLASS_FAULT (0x06)
  625. #define MPI3_PEL_CLEARTYPE_CLEAR (0x00)
  626. #define MPI3_PEL_WAITTIME_INFINITE_WAIT (0x00)
  627. #define MPI3_PEL_ACTION_GET_SEQNUM (0x01)
  628. #define MPI3_PEL_ACTION_MARK_CLEAR (0x02)
  629. #define MPI3_PEL_ACTION_GET_LOG (0x03)
  630. #define MPI3_PEL_ACTION_GET_COUNT (0x04)
  631. #define MPI3_PEL_ACTION_WAIT (0x05)
  632. #define MPI3_PEL_ACTION_ABORT (0x06)
  633. #define MPI3_PEL_ACTION_GET_PRINT_STRINGS (0x07)
  634. #define MPI3_PEL_ACTION_ACKNOWLEDGE (0x08)
  635. #define MPI3_PEL_STATUS_SUCCESS (0x00)
  636. #define MPI3_PEL_STATUS_NOT_FOUND (0x01)
  637. #define MPI3_PEL_STATUS_ABORTED (0x02)
  638. #define MPI3_PEL_STATUS_NOT_READY (0x03)
  639. struct mpi3_pel_seq {
  640. __le32 newest;
  641. __le32 oldest;
  642. __le32 clear;
  643. __le32 shutdown;
  644. __le32 boot;
  645. __le32 last_acknowledged;
  646. };
  647. struct mpi3_pel_entry {
  648. __le64 time_stamp;
  649. __le32 sequence_number;
  650. __le16 log_code;
  651. __le16 arg_type;
  652. __le16 locale;
  653. u8 class;
  654. u8 flags;
  655. u8 ext_num;
  656. u8 num_exts;
  657. u8 arg_data_size;
  658. u8 fixed_format_strings_size;
  659. __le32 reserved18[2];
  660. __le32 pel_info[24];
  661. };
  662. #define MPI3_PEL_FLAGS_COMPLETE_RESET_NEEDED (0x02)
  663. #define MPI3_PEL_FLAGS_ACK_NEEDED (0x01)
  664. struct mpi3_pel_list {
  665. __le32 log_count;
  666. __le32 reserved04;
  667. struct mpi3_pel_entry entry[1];
  668. };
  669. struct mpi3_pel_arg_map {
  670. u8 arg_type;
  671. u8 length;
  672. __le16 start_location;
  673. };
  674. #define MPI3_PEL_ARG_MAP_ARG_TYPE_APPEND_STRING (0x00)
  675. #define MPI3_PEL_ARG_MAP_ARG_TYPE_INTEGER (0x01)
  676. #define MPI3_PEL_ARG_MAP_ARG_TYPE_STRING (0x02)
  677. #define MPI3_PEL_ARG_MAP_ARG_TYPE_BIT_FIELD (0x03)
  678. struct mpi3_pel_print_string {
  679. __le16 log_code;
  680. __le16 string_length;
  681. u8 num_arg_map;
  682. u8 reserved05[3];
  683. struct mpi3_pel_arg_map arg_map[1];
  684. };
  685. struct mpi3_pel_print_string_list {
  686. __le32 num_print_strings;
  687. __le32 residual_bytes_remain;
  688. __le32 reserved08[2];
  689. struct mpi3_pel_print_string print_string[1];
  690. };
  691. #ifndef MPI3_PEL_ACTION_SPECIFIC_MAX
  692. #define MPI3_PEL_ACTION_SPECIFIC_MAX (1)
  693. #endif
  694. struct mpi3_pel_request {
  695. __le16 host_tag;
  696. u8 ioc_use_only02;
  697. u8 function;
  698. __le16 ioc_use_only04;
  699. u8 ioc_use_only06;
  700. u8 msg_flags;
  701. __le16 change_count;
  702. u8 action;
  703. u8 reserved0b;
  704. __le32 action_specific[MPI3_PEL_ACTION_SPECIFIC_MAX];
  705. };
  706. struct mpi3_pel_req_action_get_sequence_numbers {
  707. __le16 host_tag;
  708. u8 ioc_use_only02;
  709. u8 function;
  710. __le16 ioc_use_only04;
  711. u8 ioc_use_only06;
  712. u8 msg_flags;
  713. __le16 change_count;
  714. u8 action;
  715. u8 reserved0b;
  716. __le32 reserved0c[5];
  717. union mpi3_sge_union sgl;
  718. };
  719. struct mpi3_pel_req_action_clear_log_marker {
  720. __le16 host_tag;
  721. u8 ioc_use_only02;
  722. u8 function;
  723. __le16 ioc_use_only04;
  724. u8 ioc_use_only06;
  725. u8 msg_flags;
  726. __le16 change_count;
  727. u8 action;
  728. u8 reserved0b;
  729. u8 clear_type;
  730. u8 reserved0d[3];
  731. };
  732. struct mpi3_pel_req_action_get_log {
  733. __le16 host_tag;
  734. u8 ioc_use_only02;
  735. u8 function;
  736. __le16 ioc_use_only04;
  737. u8 ioc_use_only06;
  738. u8 msg_flags;
  739. __le16 change_count;
  740. u8 action;
  741. u8 reserved0b;
  742. __le32 starting_sequence_number;
  743. __le16 locale;
  744. u8 class;
  745. u8 reserved13;
  746. __le32 reserved14[3];
  747. union mpi3_sge_union sgl;
  748. };
  749. struct mpi3_pel_req_action_get_count {
  750. __le16 host_tag;
  751. u8 ioc_use_only02;
  752. u8 function;
  753. __le16 ioc_use_only04;
  754. u8 ioc_use_only06;
  755. u8 msg_flags;
  756. __le16 change_count;
  757. u8 action;
  758. u8 reserved0b;
  759. __le32 starting_sequence_number;
  760. __le16 locale;
  761. u8 class;
  762. u8 reserved13;
  763. __le32 reserved14[3];
  764. union mpi3_sge_union sgl;
  765. };
  766. struct mpi3_pel_req_action_wait {
  767. __le16 host_tag;
  768. u8 ioc_use_only02;
  769. u8 function;
  770. __le16 ioc_use_only04;
  771. u8 ioc_use_only06;
  772. u8 msg_flags;
  773. __le16 change_count;
  774. u8 action;
  775. u8 reserved0b;
  776. __le32 starting_sequence_number;
  777. __le16 locale;
  778. u8 class;
  779. u8 reserved13;
  780. __le16 wait_time;
  781. __le16 reserved16;
  782. __le32 reserved18[2];
  783. };
  784. struct mpi3_pel_req_action_abort {
  785. __le16 host_tag;
  786. u8 ioc_use_only02;
  787. u8 function;
  788. __le16 ioc_use_only04;
  789. u8 ioc_use_only06;
  790. u8 msg_flags;
  791. __le16 change_count;
  792. u8 action;
  793. u8 reserved0b;
  794. __le32 reserved0c;
  795. __le16 abort_host_tag;
  796. __le16 reserved12;
  797. __le32 reserved14;
  798. };
  799. struct mpi3_pel_req_action_get_print_strings {
  800. __le16 host_tag;
  801. u8 ioc_use_only02;
  802. u8 function;
  803. __le16 ioc_use_only04;
  804. u8 ioc_use_only06;
  805. u8 msg_flags;
  806. __le16 change_count;
  807. u8 action;
  808. u8 reserved0b;
  809. __le32 reserved0c;
  810. __le16 start_log_code;
  811. __le16 reserved12;
  812. __le32 reserved14[3];
  813. union mpi3_sge_union sgl;
  814. };
  815. struct mpi3_pel_req_action_acknowledge {
  816. __le16 host_tag;
  817. u8 ioc_use_only02;
  818. u8 function;
  819. __le16 ioc_use_only04;
  820. u8 ioc_use_only06;
  821. u8 msg_flags;
  822. __le16 change_count;
  823. u8 action;
  824. u8 reserved0b;
  825. __le32 sequence_number;
  826. __le32 reserved10;
  827. };
  828. #define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_MASK (0x03)
  829. #define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_NO_GUIDANCE (0x00)
  830. #define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_CONTINUE_OP (0x01)
  831. #define MPI3_PELACKNOWLEDGE_MSGFLAGS_SAFE_MODE_EXIT_TRANSITION_TO_FAULT (0x02)
  832. struct mpi3_pel_reply {
  833. __le16 host_tag;
  834. u8 ioc_use_only02;
  835. u8 function;
  836. __le16 ioc_use_only04;
  837. u8 ioc_use_only06;
  838. u8 msg_flags;
  839. __le16 ioc_use_only08;
  840. __le16 ioc_status;
  841. __le32 ioc_log_info;
  842. u8 action;
  843. u8 reserved11;
  844. __le16 reserved12;
  845. __le16 pe_log_status;
  846. __le16 reserved16;
  847. __le32 transfer_length;
  848. };
  849. struct mpi3_ci_download_request {
  850. __le16 host_tag;
  851. u8 ioc_use_only02;
  852. u8 function;
  853. __le16 ioc_use_only04;
  854. u8 ioc_use_only06;
  855. u8 msg_flags;
  856. __le16 change_count;
  857. u8 action;
  858. u8 reserved0b;
  859. __le32 signature1;
  860. __le32 total_image_size;
  861. __le32 image_offset;
  862. __le32 segment_size;
  863. __le32 reserved1c;
  864. union mpi3_sge_union sgl;
  865. };
  866. #define MPI3_CI_DOWNLOAD_MSGFLAGS_LAST_SEGMENT (0x80)
  867. #define MPI3_CI_DOWNLOAD_MSGFLAGS_FORCE_FMC_ENABLE (0x40)
  868. #define MPI3_CI_DOWNLOAD_MSGFLAGS_SIGNED_NVDATA (0x20)
  869. #define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_MASK (0x03)
  870. #define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_FAST (0x00)
  871. #define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_MEDIUM (0x01)
  872. #define MPI3_CI_DOWNLOAD_MSGFLAGS_WRITE_CACHE_FLUSH_SLOW (0x02)
  873. #define MPI3_CI_DOWNLOAD_ACTION_DOWNLOAD (0x01)
  874. #define MPI3_CI_DOWNLOAD_ACTION_ONLINE_ACTIVATION (0x02)
  875. #define MPI3_CI_DOWNLOAD_ACTION_OFFLINE_ACTIVATION (0x03)
  876. #define MPI3_CI_DOWNLOAD_ACTION_GET_STATUS (0x04)
  877. #define MPI3_CI_DOWNLOAD_ACTION_CANCEL_OFFLINE_ACTIVATION (0x05)
  878. struct mpi3_ci_download_reply {
  879. __le16 host_tag;
  880. u8 ioc_use_only02;
  881. u8 function;
  882. __le16 ioc_use_only04;
  883. u8 ioc_use_only06;
  884. u8 msg_flags;
  885. __le16 ioc_use_only08;
  886. __le16 ioc_status;
  887. __le32 ioc_log_info;
  888. u8 flags;
  889. u8 cache_dirty;
  890. u8 pending_count;
  891. u8 reserved13;
  892. };
  893. #define MPI3_CI_DOWNLOAD_FLAGS_DOWNLOAD_IN_PROGRESS (0x80)
  894. #define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_FAILURE (0x40)
  895. #define MPI3_CI_DOWNLOAD_FLAGS_OFFLINE_ACTIVATION_REQUIRED (0x20)
  896. #define MPI3_CI_DOWNLOAD_FLAGS_KEY_UPDATE_PENDING (0x10)
  897. #define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_MASK (0x0e)
  898. #define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_NOT_NEEDED (0x00)
  899. #define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_AWAITING (0x02)
  900. #define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_ONLINE_PENDING (0x04)
  901. #define MPI3_CI_DOWNLOAD_FLAGS_ACTIVATION_STATUS_OFFLINE_PENDING (0x06)
  902. #define MPI3_CI_DOWNLOAD_FLAGS_COMPATIBLE (0x01)
  903. struct mpi3_ci_upload_request {
  904. __le16 host_tag;
  905. u8 ioc_use_only02;
  906. u8 function;
  907. __le16 ioc_use_only04;
  908. u8 ioc_use_only06;
  909. u8 msg_flags;
  910. __le16 change_count;
  911. __le16 reserved0a;
  912. __le32 signature1;
  913. __le32 reserved10;
  914. __le32 image_offset;
  915. __le32 segment_size;
  916. __le32 reserved1c;
  917. union mpi3_sge_union sgl;
  918. };
  919. #define MPI3_CI_UPLOAD_MSGFLAGS_LOCATION_MASK (0x01)
  920. #define MPI3_CI_UPLOAD_MSGFLAGS_LOCATION_PRIMARY (0x00)
  921. #define MPI3_CI_UPLOAD_MSGFLAGS_LOCATION_SECONDARY (0x01)
  922. #define MPI3_CI_UPLOAD_MSGFLAGS_FORMAT_MASK (0x02)
  923. #define MPI3_CI_UPLOAD_MSGFLAGS_FORMAT_FLASH (0x00)
  924. #define MPI3_CI_UPLOAD_MSGFLAGS_FORMAT_EXECUTABLE (0x02)
  925. #define MPI3_CTRL_OP_FORCE_FULL_DISCOVERY (0x01)
  926. #define MPI3_CTRL_OP_LOOKUP_MAPPING (0x02)
  927. #define MPI3_CTRL_OP_UPDATE_TIMESTAMP (0x04)
  928. #define MPI3_CTRL_OP_GET_TIMESTAMP (0x05)
  929. #define MPI3_CTRL_OP_GET_IOC_CHANGE_COUNT (0x06)
  930. #define MPI3_CTRL_OP_CHANGE_PROFILE (0x07)
  931. #define MPI3_CTRL_OP_REMOVE_DEVICE (0x10)
  932. #define MPI3_CTRL_OP_CLOSE_PERSISTENT_CONNECTION (0x11)
  933. #define MPI3_CTRL_OP_HIDDEN_ACK (0x12)
  934. #define MPI3_CTRL_OP_CLEAR_DEVICE_COUNTERS (0x13)
  935. #define MPI3_CTRL_OP_SEND_SAS_PRIMITIVE (0x20)
  936. #define MPI3_CTRL_OP_SAS_PHY_CONTROL (0x21)
  937. #define MPI3_CTRL_OP_READ_INTERNAL_BUS (0x23)
  938. #define MPI3_CTRL_OP_WRITE_INTERNAL_BUS (0x24)
  939. #define MPI3_CTRL_OP_PCIE_LINK_CONTROL (0x30)
  940. #define MPI3_CTRL_OP_LOOKUP_MAPPING_PARAM8_LOOKUP_METHOD_INDEX (0x00)
  941. #define MPI3_CTRL_OP_UPDATE_TIMESTAMP_PARAM64_TIMESTAMP_INDEX (0x00)
  942. #define MPI3_CTRL_OP_CHANGE_PROFILE_PARAM8_PROFILE_ID_INDEX (0x00)
  943. #define MPI3_CTRL_OP_REMOVE_DEVICE_PARAM16_DEVHANDLE_INDEX (0x00)
  944. #define MPI3_CTRL_OP_CLOSE_PERSIST_CONN_PARAM16_DEVHANDLE_INDEX (0x00)
  945. #define MPI3_CTRL_OP_HIDDEN_ACK_PARAM16_DEVHANDLE_INDEX (0x00)
  946. #define MPI3_CTRL_OP_CLEAR_DEVICE_COUNTERS_PARAM16_DEVHANDLE_INDEX (0x00)
  947. #define MPI3_CTRL_OP_SEND_SAS_PRIM_PARAM8_PHY_INDEX (0x00)
  948. #define MPI3_CTRL_OP_SEND_SAS_PRIM_PARAM8_PRIMSEQ_INDEX (0x01)
  949. #define MPI3_CTRL_OP_SEND_SAS_PRIM_PARAM32_PRIMITIVE_INDEX (0x00)
  950. #define MPI3_CTRL_OP_SAS_PHY_CONTROL_PARAM8_ACTION_INDEX (0x00)
  951. #define MPI3_CTRL_OP_SAS_PHY_CONTROL_PARAM8_PHY_INDEX (0x01)
  952. #define MPI3_CTRL_OP_READ_INTERNAL_BUS_PARAM64_ADDRESS_INDEX (0x00)
  953. #define MPI3_CTRL_OP_WRITE_INTERNAL_BUS_PARAM64_ADDRESS_INDEX (0x00)
  954. #define MPI3_CTRL_OP_WRITE_INTERNAL_BUS_PARAM32_VALUE_INDEX (0x00)
  955. #define MPI3_CTRL_OP_PCIE_LINK_CONTROL_PARAM8_ACTION_INDEX (0x00)
  956. #define MPI3_CTRL_OP_PCIE_LINK_CONTROL_PARAM8_LINK_INDEX (0x01)
  957. #define MPI3_CTRL_LOOKUP_METHOD_WWID_ADDRESS (0x01)
  958. #define MPI3_CTRL_LOOKUP_METHOD_ENCLOSURE_SLOT (0x02)
  959. #define MPI3_CTRL_LOOKUP_METHOD_SAS_DEVICE_NAME (0x03)
  960. #define MPI3_CTRL_LOOKUP_METHOD_PERSISTENT_ID (0x04)
  961. #define MPI3_CTRL_LOOKUP_METHOD_WWIDADDR_PARAM16_DEVH_INDEX (0)
  962. #define MPI3_CTRL_LOOKUP_METHOD_WWIDADDR_PARAM64_WWID_INDEX (0)
  963. #define MPI3_CTRL_LOOKUP_METHOD_ENCLSLOT_PARAM16_SLOTNUM_INDEX (0)
  964. #define MPI3_CTRL_LOOKUP_METHOD_ENCLSLOT_PARAM64_ENCLOSURELID_INDEX (0)
  965. #define MPI3_CTRL_LOOKUP_METHOD_SASDEVNAME_PARAM16_DEVH_INDEX (0)
  966. #define MPI3_CTRL_LOOKUP_METHOD_SASDEVNAME_PARAM64_DEVNAME_INDEX (0)
  967. #define MPI3_CTRL_LOOKUP_METHOD_PERSISTID_PARAM16_DEVH_INDEX (0)
  968. #define MPI3_CTRL_LOOKUP_METHOD_PERSISTID_PARAM16_PERSISTENT_ID_INDEX (1)
  969. #define MPI3_CTRL_LOOKUP_METHOD_VALUE16_DEVH_INDEX (0)
  970. #define MPI3_CTRL_GET_TIMESTAMP_VALUE64_TIMESTAMP_INDEX (0)
  971. #define MPI3_CTRL_GET_IOC_CHANGE_COUNT_VALUE16_CHANGECOUNT_INDEX (0)
  972. #define MPI3_CTRL_READ_INTERNAL_BUS_VALUE32_VALUE_INDEX (0)
  973. #define MPI3_CTRL_PRIMFLAGS_SINGLE (0x01)
  974. #define MPI3_CTRL_PRIMFLAGS_TRIPLE (0x03)
  975. #define MPI3_CTRL_PRIMFLAGS_REDUNDANT (0x06)
  976. #define MPI3_CTRL_ACTION_NOP (0x00)
  977. #define MPI3_CTRL_ACTION_LINK_RESET (0x01)
  978. #define MPI3_CTRL_ACTION_HARD_RESET (0x02)
  979. #define MPI3_CTRL_ACTION_CLEAR_ERROR_LOG (0x05)
  980. struct mpi3_iounit_control_request {
  981. __le16 host_tag;
  982. u8 ioc_use_only02;
  983. u8 function;
  984. __le16 ioc_use_only04;
  985. u8 ioc_use_only06;
  986. u8 msg_flags;
  987. __le16 change_count;
  988. u8 reserved0a;
  989. u8 operation;
  990. __le32 reserved0c;
  991. __le64 param64[2];
  992. __le32 param32[4];
  993. __le16 param16[4];
  994. u8 param8[8];
  995. };
  996. struct mpi3_iounit_control_reply {
  997. __le16 host_tag;
  998. u8 ioc_use_only02;
  999. u8 function;
  1000. __le16 ioc_use_only04;
  1001. u8 ioc_use_only06;
  1002. u8 msg_flags;
  1003. __le16 ioc_use_only08;
  1004. __le16 ioc_status;
  1005. __le32 ioc_log_info;
  1006. __le64 value64[2];
  1007. __le32 value32[4];
  1008. __le16 value16[4];
  1009. u8 value8[8];
  1010. };
  1011. #endif