1 /* SPDX-License-Identifier: GPL-2.0-or-later */ 2 /* 3 * Copyright 2016-2021 Broadcom Inc. All rights reserved. 4 * 5 */ 6 #ifndef MPI30_PCI_H 7 #define MPI30_PCI_H 1 8 #ifndef MPI3_NVME_ENCAP_CMD_MAX 9 #define MPI3_NVME_ENCAP_CMD_MAX (1) 10 #endif 11 struct mpi3_nvme_encapsulated_request { 12 __le16 host_tag; 13 u8 ioc_use_only02; 14 u8 function; 15 __le16 ioc_use_only04; 16 u8 ioc_use_only06; 17 u8 msg_flags; 18 __le16 change_count; 19 __le16 dev_handle; 20 __le16 encapsulated_command_length; 21 __le16 flags; 22 __le32 data_length; 23 __le32 reserved14[3]; 24 __le32 command[MPI3_NVME_ENCAP_CMD_MAX]; 25 }; 26 27 #define MPI3_NVME_FLAGS_FORCE_ADMIN_ERR_REPLY_MASK (0x0002) 28 #define MPI3_NVME_FLAGS_FORCE_ADMIN_ERR_REPLY_FAIL_ONLY (0x0000) 29 #define MPI3_NVME_FLAGS_FORCE_ADMIN_ERR_REPLY_ALL (0x0002) 30 #define MPI3_NVME_FLAGS_SUBMISSIONQ_MASK (0x0001) 31 #define MPI3_NVME_FLAGS_SUBMISSIONQ_IO (0x0000) 32 #define MPI3_NVME_FLAGS_SUBMISSIONQ_ADMIN (0x0001) 33 struct mpi3_nvme_encapsulated_error_reply { 34 __le16 host_tag; 35 u8 ioc_use_only02; 36 u8 function; 37 __le16 ioc_use_only04; 38 u8 ioc_use_only06; 39 u8 msg_flags; 40 __le16 ioc_use_only08; 41 __le16 ioc_status; 42 __le32 ioc_log_info; 43 __le32 nvme_completion_entry[4]; 44 }; 45 #endif 46