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 reserved10[4]; 23 __le32 command[MPI3_NVME_ENCAP_CMD_MAX]; 24 }; 25 26 #define MPI3_NVME_FLAGS_FORCE_ADMIN_ERR_REPLY_MASK (0x0002) 27 #define MPI3_NVME_FLAGS_FORCE_ADMIN_ERR_REPLY_FAIL_ONLY (0x0000) 28 #define MPI3_NVME_FLAGS_FORCE_ADMIN_ERR_REPLY_ALL (0x0002) 29 #define MPI3_NVME_FLAGS_SUBMISSIONQ_MASK (0x0001) 30 #define MPI3_NVME_FLAGS_SUBMISSIONQ_IO (0x0000) 31 #define MPI3_NVME_FLAGS_SUBMISSIONQ_ADMIN (0x0001) 32 struct mpi3_nvme_encapsulated_error_reply { 33 __le16 host_tag; 34 u8 ioc_use_only02; 35 u8 function; 36 __le16 ioc_use_only04; 37 u8 ioc_use_only06; 38 u8 msg_flags; 39 __le16 ioc_use_only08; 40 __le16 ioc_status; 41 __le32 ioc_log_info; 42 __le32 nvme_completion_entry[4]; 43 }; 44 #endif 45