mpi30_ioc.h 50 KB

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