scsi_bsg_mpi3mr.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597
  1. //
  2. // Copyright 2026 Aarav Ravindra Kharade
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. /* SPDX-License-Identifier: GPL-2.0-or-later WITH Linux-syscall-note */
  17. /*
  18. * Driver for Broadcom MPI3 Storage Controllers
  19. *
  20. * Copyright (C) 2017-2022 Broadcom Inc.
  21. * (mailto: mpi3mr-linuxdrv.pdl@broadcom.com)
  22. *
  23. */
  24. #ifndef SCSI_BSG_MPI3MR_H_INCLUDED
  25. #define SCSI_BSG_MPI3MR_H_INCLUDED
  26. #include <linux/types.h>
  27. /* Definitions for BSG commands */
  28. #define MPI3MR_IOCTL_VERSION 0x06
  29. #define MPI3MR_APP_DEFAULT_TIMEOUT (60) /*seconds*/
  30. #define MPI3MR_BSG_ADPTYPE_UNKNOWN 0
  31. #define MPI3MR_BSG_ADPTYPE_AVGFAMILY 1
  32. #define MPI3MR_BSG_ADPSTATE_UNKNOWN 0
  33. #define MPI3MR_BSG_ADPSTATE_OPERATIONAL 1
  34. #define MPI3MR_BSG_ADPSTATE_FAULT 2
  35. #define MPI3MR_BSG_ADPSTATE_IN_RESET 3
  36. #define MPI3MR_BSG_ADPSTATE_UNRECOVERABLE 4
  37. #define MPI3MR_BSG_ADPRESET_UNKNOWN 0
  38. #define MPI3MR_BSG_ADPRESET_SOFT 1
  39. #define MPI3MR_BSG_ADPRESET_DIAG_FAULT 2
  40. #define MPI3MR_BSG_LOGDATA_MAX_ENTRIES 400
  41. #define MPI3MR_BSG_LOGDATA_ENTRY_HEADER_SZ 4
  42. #define MPI3MR_DRVBSG_OPCODE_UNKNOWN 0
  43. #define MPI3MR_DRVBSG_OPCODE_ADPINFO 1
  44. #define MPI3MR_DRVBSG_OPCODE_ADPRESET 2
  45. #define MPI3MR_DRVBSG_OPCODE_ALLTGTDEVINFO 4
  46. #define MPI3MR_DRVBSG_OPCODE_GETCHGCNT 5
  47. #define MPI3MR_DRVBSG_OPCODE_LOGDATAENABLE 6
  48. #define MPI3MR_DRVBSG_OPCODE_PELENABLE 7
  49. #define MPI3MR_DRVBSG_OPCODE_GETLOGDATA 8
  50. #define MPI3MR_DRVBSG_OPCODE_QUERY_HDB 9
  51. #define MPI3MR_DRVBSG_OPCODE_REPOST_HDB 10
  52. #define MPI3MR_DRVBSG_OPCODE_UPLOAD_HDB 11
  53. #define MPI3MR_DRVBSG_OPCODE_REFRESH_HDB_TRIGGERS 12
  54. #define MPI3MR_BSG_BUFTYPE_UNKNOWN 0
  55. #define MPI3MR_BSG_BUFTYPE_RAIDMGMT_CMD 1
  56. #define MPI3MR_BSG_BUFTYPE_RAIDMGMT_RESP 2
  57. #define MPI3MR_BSG_BUFTYPE_DATA_IN 3
  58. #define MPI3MR_BSG_BUFTYPE_DATA_OUT 4
  59. #define MPI3MR_BSG_BUFTYPE_MPI_REPLY 5
  60. #define MPI3MR_BSG_BUFTYPE_ERR_RESPONSE 6
  61. #define MPI3MR_BSG_BUFTYPE_MPI_REQUEST 0xFE
  62. #define MPI3MR_BSG_MPI_REPLY_BUFTYPE_UNKNOWN 0
  63. #define MPI3MR_BSG_MPI_REPLY_BUFTYPE_STATUS 1
  64. #define MPI3MR_BSG_MPI_REPLY_BUFTYPE_ADDRESS 2
  65. #define MPI3MR_HDB_BUFTYPE_UNKNOWN 0
  66. #define MPI3MR_HDB_BUFTYPE_TRACE 1
  67. #define MPI3MR_HDB_BUFTYPE_FIRMWARE 2
  68. #define MPI3MR_HDB_BUFTYPE_RESERVED 3
  69. #define MPI3MR_HDB_BUFSTATUS_UNKNOWN 0
  70. #define MPI3MR_HDB_BUFSTATUS_NOT_ALLOCATED 1
  71. #define MPI3MR_HDB_BUFSTATUS_POSTED_UNPAUSED 2
  72. #define MPI3MR_HDB_BUFSTATUS_POSTED_PAUSED 3
  73. #define MPI3MR_HDB_BUFSTATUS_RELEASED 4
  74. #define MPI3MR_HDB_TRIGGER_TYPE_UNKNOWN 0
  75. #define MPI3MR_HDB_TRIGGER_TYPE_DIAGFAULT 1
  76. #define MPI3MR_HDB_TRIGGER_TYPE_ELEMENT 2
  77. #define MPI3MR_HDB_TRIGGER_TYPE_MASTER 3
  78. /* Supported BSG commands */
  79. enum command {
  80. MPI3MR_DRV_CMD = 1,
  81. MPI3MR_MPT_CMD = 2,
  82. };
  83. /**
  84. * struct mpi3_driver_info_layout - Information about driver
  85. *
  86. * @information_length: Length of this structure in bytes
  87. * @driver_signature: Driver Vendor name
  88. * @os_name: Operating System Name
  89. * @driver_name: Driver name
  90. * @driver_version: Driver version
  91. * @driver_release_date: Driver release date
  92. * @driver_capabilities: Driver capabilities
  93. */
  94. struct mpi3_driver_info_layout {
  95. __le32 information_length;
  96. __u8 driver_signature[12];
  97. __u8 os_name[16];
  98. __u8 os_version[12];
  99. __u8 driver_name[20];
  100. __u8 driver_version[32];
  101. __u8 driver_release_date[20];
  102. __le32 driver_capabilities;
  103. };
  104. /**
  105. * struct mpi3mr_bsg_in_adpinfo - Adapter information request
  106. * data returned by the driver.
  107. *
  108. * @adp_type: Adapter type
  109. * @rsvd1: Reserved
  110. * @pci_dev_id: PCI device ID of the adapter
  111. * @pci_dev_hw_rev: PCI revision of the adapter
  112. * @pci_subsys_dev_id: PCI subsystem device ID of the adapter
  113. * @pci_subsys_ven_id: PCI subsystem vendor ID of the adapter
  114. * @pci_dev: PCI device
  115. * @pci_func: PCI function
  116. * @pci_bus: PCI bus
  117. * @rsvd2: Reserved
  118. * @pci_seg_id: PCI segment ID
  119. * @app_intfc_ver: version of the application interface definition
  120. * @rsvd3: Reserved
  121. * @rsvd4: Reserved
  122. * @rsvd5: Reserved
  123. * @driver_info: Driver Information (Version/Name)
  124. */
  125. struct mpi3mr_bsg_in_adpinfo {
  126. __u32 adp_type;
  127. __u32 rsvd1;
  128. __u32 pci_dev_id;
  129. __u32 pci_dev_hw_rev;
  130. __u32 pci_subsys_dev_id;
  131. __u32 pci_subsys_ven_id;
  132. __u32 pci_dev:5;
  133. __u32 pci_func:3;
  134. __u32 pci_bus:8;
  135. __u16 rsvd2;
  136. __u32 pci_seg_id;
  137. __u32 app_intfc_ver;
  138. __u8 adp_state;
  139. __u8 rsvd3;
  140. __u16 rsvd4;
  141. __u32 rsvd5[2];
  142. struct mpi3_driver_info_layout driver_info;
  143. };
  144. /**
  145. * struct mpi3mr_bsg_adp_reset - Adapter reset request
  146. * payload data to the driver.
  147. *
  148. * @reset_type: Reset type
  149. * @rsvd1: Reserved
  150. * @rsvd2: Reserved
  151. */
  152. struct mpi3mr_bsg_adp_reset {
  153. __u8 reset_type;
  154. __u8 rsvd1;
  155. __u16 rsvd2;
  156. };
  157. /**
  158. * struct mpi3mr_change_count - Topology change count
  159. * returned by the driver.
  160. *
  161. * @change_count: Topology change count
  162. * @rsvd: Reserved
  163. */
  164. struct mpi3mr_change_count {
  165. __u16 change_count;
  166. __u16 rsvd;
  167. };
  168. /**
  169. * struct mpi3mr_device_map_info - Target device mapping
  170. * information
  171. *
  172. * @handle: Firmware device handle
  173. * @perst_id: Persistent ID assigned by the firmware
  174. * @target_id: Target ID assigned by the driver
  175. * @bus_id: Bus ID assigned by the driver
  176. * @rsvd1: Reserved
  177. * @rsvd2: Reserved
  178. */
  179. struct mpi3mr_device_map_info {
  180. __u16 handle;
  181. __u16 perst_id;
  182. __u32 target_id;
  183. __u8 bus_id;
  184. __u8 rsvd1;
  185. __u16 rsvd2;
  186. };
  187. /**
  188. * struct mpi3mr_all_tgt_info - Target device mapping
  189. * information returned by the driver
  190. *
  191. * @num_devices: The number of devices in driver's inventory
  192. * @rsvd1: Reserved
  193. * @rsvd2: Reserved
  194. * @dmi: Variable length array of mapping information of targets
  195. */
  196. struct mpi3mr_all_tgt_info {
  197. __u16 num_devices;
  198. __u16 rsvd1;
  199. __u32 rsvd2;
  200. struct mpi3mr_device_map_info dmi[1];
  201. };
  202. /**
  203. * struct mpi3mr_logdata_enable - Number of log data
  204. * entries saved by the driver returned as payload data for
  205. * enable logdata BSG request by the driver.
  206. *
  207. * @max_entries: Number of log data entries cached by the driver
  208. * @rsvd: Reserved
  209. */
  210. struct mpi3mr_logdata_enable {
  211. __u16 max_entries;
  212. __u16 rsvd;
  213. };
  214. /**
  215. * struct mpi3mr_bsg_out_pel_enable - PEL enable request payload
  216. * data to the driver.
  217. *
  218. * @pel_locale: PEL locale to the firmware
  219. * @pel_class: PEL class to the firmware
  220. * @rsvd: Reserved
  221. */
  222. struct mpi3mr_bsg_out_pel_enable {
  223. __u16 pel_locale;
  224. __u8 pel_class;
  225. __u8 rsvd;
  226. };
  227. /**
  228. * struct mpi3mr_logdata_entry - Log data entry cached by the
  229. * driver.
  230. *
  231. * @valid_entry: Is the entry valid
  232. * @rsvd1: Reserved
  233. * @rsvd2: Reserved
  234. * @data: Variable length Log entry data
  235. */
  236. struct mpi3mr_logdata_entry {
  237. __u8 valid_entry;
  238. __u8 rsvd1;
  239. __u16 rsvd2;
  240. __u8 data[1]; /* Variable length Array */
  241. };
  242. /**
  243. * struct mpi3mr_bsg_in_log_data - Log data entries saved by
  244. * the driver returned as payload data for Get logdata request
  245. * by the driver.
  246. *
  247. * @entry: Variable length Log data entry array
  248. */
  249. struct mpi3mr_bsg_in_log_data {
  250. struct mpi3mr_logdata_entry entry[1];
  251. };
  252. /**
  253. * struct mpi3mr_hdb_entry - host diag buffer entry.
  254. *
  255. * @buf_type: Buffer type
  256. * @status: Buffer status
  257. * @trigger_type: Trigger type
  258. * @rsvd1: Reserved
  259. * @size: Buffer size
  260. * @rsvd2: Reserved
  261. * @trigger_data: Trigger specific data
  262. * @rsvd3: Reserved
  263. * @rsvd4: Reserved
  264. */
  265. struct mpi3mr_hdb_entry {
  266. __u8 buf_type;
  267. __u8 status;
  268. __u8 trigger_type;
  269. __u8 rsvd1;
  270. __u16 size;
  271. __u16 rsvd2;
  272. __u64 trigger_data;
  273. __u32 rsvd3;
  274. __u32 rsvd4;
  275. };
  276. /**
  277. * struct mpi3mr_bsg_in_hdb_status - This structure contains
  278. * return data for the BSG request to retrieve the number of host
  279. * diagnostic buffers supported by the driver and their current
  280. * status and additional status specific data if any in forms of
  281. * multiple hdb entries.
  282. *
  283. * @num_hdb_types: Number of host diag buffer types supported
  284. * @element_trigger_format: Element trigger format
  285. * @rsvd1: Reserved
  286. * @rsvd2: Reserved
  287. * @rsvd3: Reserved
  288. * @entry: Variable length Diag buffer status entry array
  289. */
  290. struct mpi3mr_bsg_in_hdb_status {
  291. __u8 num_hdb_types;
  292. __u8 element_trigger_format;
  293. __u16 rsvd2;
  294. __u32 rsvd3;
  295. struct mpi3mr_hdb_entry entry[1];
  296. };
  297. /**
  298. * struct mpi3mr_bsg_out_repost_hdb - Repost host diagnostic
  299. * buffer request payload data to the driver.
  300. *
  301. * @buf_type: Buffer type
  302. * @rsvd1: Reserved
  303. * @rsvd2: Reserved
  304. */
  305. struct mpi3mr_bsg_out_repost_hdb {
  306. __u8 buf_type;
  307. __u8 rsvd1;
  308. __u16 rsvd2;
  309. };
  310. /**
  311. * struct mpi3mr_bsg_out_upload_hdb - Upload host diagnostic
  312. * buffer request payload data to the driver.
  313. *
  314. * @buf_type: Buffer type
  315. * @rsvd1: Reserved
  316. * @rsvd2: Reserved
  317. * @start_offset: Start offset of the buffer from where to copy
  318. * @length: Length of the buffer to copy
  319. */
  320. struct mpi3mr_bsg_out_upload_hdb {
  321. __u8 buf_type;
  322. __u8 rsvd1;
  323. __u16 rsvd2;
  324. __u32 start_offset;
  325. __u32 length;
  326. };
  327. /**
  328. * struct mpi3mr_bsg_out_refresh_hdb_triggers - Refresh host
  329. * diagnostic buffer triggers request payload data to the driver.
  330. *
  331. * @page_type: Page type
  332. * @rsvd1: Reserved
  333. * @rsvd2: Reserved
  334. */
  335. struct mpi3mr_bsg_out_refresh_hdb_triggers {
  336. __u8 page_type;
  337. __u8 rsvd1;
  338. __u16 rsvd2;
  339. };
  340. /**
  341. * struct mpi3mr_bsg_drv_cmd - Generic bsg data
  342. * structure for all driver specific requests.
  343. *
  344. * @mrioc_id: Controller ID
  345. * @opcode: Driver specific opcode
  346. * @rsvd1: Reserved
  347. * @rsvd2: Reserved
  348. */
  349. struct mpi3mr_bsg_drv_cmd {
  350. __u8 mrioc_id;
  351. __u8 opcode;
  352. __u16 rsvd1;
  353. __u32 rsvd2[4];
  354. };
  355. /**
  356. * struct mpi3mr_bsg_in_reply_buf - MPI reply buffer returned
  357. * for MPI Passthrough request .
  358. *
  359. * @mpi_reply_type: Type of MPI reply
  360. * @rsvd1: Reserved
  361. * @rsvd2: Reserved
  362. * @reply_buf: Variable Length buffer based on mpirep type
  363. */
  364. struct mpi3mr_bsg_in_reply_buf {
  365. __u8 mpi_reply_type;
  366. __u8 rsvd1;
  367. __u16 rsvd2;
  368. __u8 reply_buf[];
  369. };
  370. /**
  371. * struct mpi3mr_buf_entry - User buffer descriptor for MPI
  372. * Passthrough requests.
  373. *
  374. * @buf_type: Buffer type
  375. * @rsvd1: Reserved
  376. * @rsvd2: Reserved
  377. * @buf_len: Buffer length
  378. */
  379. struct mpi3mr_buf_entry {
  380. __u8 buf_type;
  381. __u8 rsvd1;
  382. __u16 rsvd2;
  383. __u32 buf_len;
  384. };
  385. /**
  386. * struct mpi3mr_buf_entry_list - list of user buffer
  387. * descriptor for MPI Passthrough requests.
  388. *
  389. * @num_of_entries: Number of buffer descriptors
  390. * @rsvd1: Reserved
  391. * @rsvd2: Reserved
  392. * @rsvd3: Reserved
  393. * @buf_entry: Variable length array of buffer descriptors
  394. */
  395. struct mpi3mr_buf_entry_list {
  396. __u8 num_of_entries;
  397. __u8 rsvd1;
  398. __u16 rsvd2;
  399. __u32 rsvd3;
  400. struct mpi3mr_buf_entry buf_entry[1];
  401. };
  402. /**
  403. * struct mpi3mr_bsg_mptcmd - Generic bsg data
  404. * structure for all MPI Passthrough requests .
  405. *
  406. * @mrioc_id: Controller ID
  407. * @rsvd1: Reserved
  408. * @timeout: MPI request timeout
  409. * @rsvd2: Reserved
  410. * @buf_entry_list: Buffer descriptor list
  411. */
  412. struct mpi3mr_bsg_mptcmd {
  413. __u8 mrioc_id;
  414. __u8 rsvd1;
  415. __u16 timeout;
  416. __u32 rsvd2;
  417. struct mpi3mr_buf_entry_list buf_entry_list;
  418. };
  419. /**
  420. * struct mpi3mr_bsg_packet - Generic bsg data
  421. * structure for all supported requests .
  422. *
  423. * @cmd_type: represents drvrcmd or mptcmd
  424. * @rsvd1: Reserved
  425. * @rsvd2: Reserved
  426. * @rsvd3: Reserved
  427. * @cmd.drvrcmd: driver request structure
  428. * @cmd.mptcmd: mpt request structure
  429. */
  430. struct mpi3mr_bsg_packet {
  431. __u8 cmd_type;
  432. __u8 rsvd1;
  433. __u16 rsvd2;
  434. __u32 rsvd3;
  435. union {
  436. struct mpi3mr_bsg_drv_cmd drvrcmd;
  437. struct mpi3mr_bsg_mptcmd mptcmd;
  438. } cmd;
  439. };
  440. struct mpi3_nvme_encapsulated_request {
  441. __le16 host_tag;
  442. __u8 ioc_use_only02;
  443. __u8 function;
  444. __le16 ioc_use_only04;
  445. __u8 ioc_use_only06;
  446. __u8 msg_flags;
  447. __le16 change_count;
  448. __le16 dev_handle;
  449. __le16 encapsulated_command_length;
  450. __le16 flags;
  451. __le32 data_length;
  452. __le32 reserved14[3];
  453. __le32 command[];
  454. };
  455. struct mpi3_nvme_encapsulated_error_reply {
  456. __le16 host_tag;
  457. __u8 ioc_use_only02;
  458. __u8 function;
  459. __le16 ioc_use_only04;
  460. __u8 ioc_use_only06;
  461. __u8 msg_flags;
  462. __le16 ioc_use_only08;
  463. __le16 ioc_status;
  464. __le32 ioc_log_info;
  465. __le32 nvme_completion_entry[4];
  466. };
  467. #define MPI3MR_NVME_PRP_SIZE 8 /* PRP size */
  468. #define MPI3MR_NVME_CMD_PRP1_OFFSET 24 /* PRP1 offset in NVMe cmd */
  469. #define MPI3MR_NVME_CMD_PRP2_OFFSET 32 /* PRP2 offset in NVMe cmd */
  470. #define MPI3MR_NVME_CMD_SGL_OFFSET 24 /* SGL offset in NVMe cmd */
  471. #define MPI3MR_NVME_DATA_FORMAT_PRP 0
  472. #define MPI3MR_NVME_DATA_FORMAT_SGL1 1
  473. #define MPI3MR_NVME_DATA_FORMAT_SGL2 2
  474. #define MPI3MR_NVMESGL_DATA_SEGMENT 0x00
  475. #define MPI3MR_NVMESGL_LAST_SEGMENT 0x03
  476. /* MPI3: task management related definitions */
  477. struct mpi3_scsi_task_mgmt_request {
  478. __le16 host_tag;
  479. __u8 ioc_use_only02;
  480. __u8 function;
  481. __le16 ioc_use_only04;
  482. __u8 ioc_use_only06;
  483. __u8 msg_flags;
  484. __le16 change_count;
  485. __le16 dev_handle;
  486. __le16 task_host_tag;
  487. __u8 task_type;
  488. __u8 reserved0f;
  489. __le16 task_request_queue_id;
  490. __le16 reserved12;
  491. __le32 reserved14;
  492. __u8 lun[8];
  493. };
  494. #define MPI3_SCSITASKMGMT_MSGFLAGS_DO_NOT_SEND_TASK_IU (0x08)
  495. #define MPI3_SCSITASKMGMT_TASKTYPE_ABORT_TASK (0x01)
  496. #define MPI3_SCSITASKMGMT_TASKTYPE_ABORT_TASK_SET (0x02)
  497. #define MPI3_SCSITASKMGMT_TASKTYPE_TARGET_RESET (0x03)
  498. #define MPI3_SCSITASKMGMT_TASKTYPE_LOGICAL_UNIT_RESET (0x05)
  499. #define MPI3_SCSITASKMGMT_TASKTYPE_CLEAR_TASK_SET (0x06)
  500. #define MPI3_SCSITASKMGMT_TASKTYPE_QUERY_TASK (0x07)
  501. #define MPI3_SCSITASKMGMT_TASKTYPE_CLEAR_ACA (0x08)
  502. #define MPI3_SCSITASKMGMT_TASKTYPE_QUERY_TASK_SET (0x09)
  503. #define MPI3_SCSITASKMGMT_TASKTYPE_QUERY_ASYNC_EVENT (0x0a)
  504. #define MPI3_SCSITASKMGMT_TASKTYPE_I_T_NEXUS_RESET (0x0b)
  505. struct mpi3_scsi_task_mgmt_reply {
  506. __le16 host_tag;
  507. __u8 ioc_use_only02;
  508. __u8 function;
  509. __le16 ioc_use_only04;
  510. __u8 ioc_use_only06;
  511. __u8 msg_flags;
  512. __le16 ioc_use_only08;
  513. __le16 ioc_status;
  514. __le32 ioc_log_info;
  515. __le32 termination_count;
  516. __le32 response_data;
  517. __le32 reserved18;
  518. };
  519. #define MPI3_SCSITASKMGMT_RSPCODE_TM_COMPLETE (0x00)
  520. #define MPI3_SCSITASKMGMT_RSPCODE_INVALID_FRAME (0x02)
  521. #define MPI3_SCSITASKMGMT_RSPCODE_TM_FUNCTION_NOT_SUPPORTED (0x04)
  522. #define MPI3_SCSITASKMGMT_RSPCODE_TM_FAILED (0x05)
  523. #define MPI3_SCSITASKMGMT_RSPCODE_TM_SUCCEEDED (0x08)
  524. #define MPI3_SCSITASKMGMT_RSPCODE_TM_INVALID_LUN (0x09)
  525. #define MPI3_SCSITASKMGMT_RSPCODE_TM_OVERLAPPED_TAG (0x0a)
  526. #define MPI3_SCSITASKMGMT_RSPCODE_IO_QUEUED_ON_IOC (0x80)
  527. #define MPI3_SCSITASKMGMT_RSPCODE_TM_NVME_DENIED (0x81)
  528. /* MPI3: PEL related definitions */
  529. #define MPI3_PEL_LOCALE_FLAGS_NON_BLOCKING_BOOT_EVENT (0x0200)
  530. #define MPI3_PEL_LOCALE_FLAGS_BLOCKING_BOOT_EVENT (0x0100)
  531. #define MPI3_PEL_LOCALE_FLAGS_PCIE (0x0080)
  532. #define MPI3_PEL_LOCALE_FLAGS_CONFIGURATION (0x0040)
  533. #define MPI3_PEL_LOCALE_FLAGS_CONTROLER (0x0020)
  534. #define MPI3_PEL_LOCALE_FLAGS_SAS (0x0010)
  535. #define MPI3_PEL_LOCALE_FLAGS_EPACK (0x0008)
  536. #define MPI3_PEL_LOCALE_FLAGS_ENCLOSURE (0x0004)
  537. #define MPI3_PEL_LOCALE_FLAGS_PD (0x0002)
  538. #define MPI3_PEL_LOCALE_FLAGS_VD (0x0001)
  539. #define MPI3_PEL_CLASS_DEBUG (0x00)
  540. #define MPI3_PEL_CLASS_PROGRESS (0x01)
  541. #define MPI3_PEL_CLASS_INFORMATIONAL (0x02)
  542. #define MPI3_PEL_CLASS_WARNING (0x03)
  543. #define MPI3_PEL_CLASS_CRITICAL (0x04)
  544. #define MPI3_PEL_CLASS_FATAL (0x05)
  545. #define MPI3_PEL_CLASS_FAULT (0x06)
  546. /* MPI3: Function definitions */
  547. #define MPI3_BSG_FUNCTION_MGMT_PASSTHROUGH (0x0a)
  548. #define MPI3_BSG_FUNCTION_SCSI_IO (0x20)
  549. #define MPI3_BSG_FUNCTION_SCSI_TASK_MGMT (0x21)
  550. #define MPI3_BSG_FUNCTION_SMP_PASSTHROUGH (0x22)
  551. #define MPI3_BSG_FUNCTION_NVME_ENCAPSULATED (0x24)
  552. #endif