scsi_bsg_mpi3mr.h 15 KB

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