diff options
author | Sumit Saxena <sumit.saxena@broadcom.com> | 2022-04-29 17:16:40 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-05-02 17:02:42 -0400 |
commit | 7dbd0dd8cde356d2a747d5c87dad7c2233dad8a4 (patch) | |
tree | 2f267532409bd086ef9b6c6905fcd99a32b461c6 /drivers/scsi/mpi3mr/mpi3mr.h | |
parent | 986d6bad2103fb24bd886aad455245ace168c984 (diff) | |
download | linux-7dbd0dd8cde356d2a747d5c87dad7c2233dad8a4.tar.gz linux-7dbd0dd8cde356d2a747d5c87dad7c2233dad8a4.tar.bz2 linux-7dbd0dd8cde356d2a747d5c87dad7c2233dad8a4.zip |
scsi: mpi3mr: Add support for NVMe passthrough
Add support for management applications to send an MPI3 Encapsulated NVMe
passthru command to the NVMe devices attached to an Avenger controller.
Since the NVMe drives are exposed as SCSI devices by the controller, the
standard NVMe applications cannot be used to interact with the drives and
the command sets supported are also limited by the controller firmware.
Special handling is required for MPI3 Encapsulated NVMe passthru commands
for PRP/SGL setup in the commands.
Link: https://lore.kernel.org/r/20220429211641.642010-8-sumit.saxena@broadcom.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Sumit Saxena <sumit.saxena@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpi3mr/mpi3mr.h')
-rw-r--r-- | drivers/scsi/mpi3mr/mpi3mr.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/scsi/mpi3mr/mpi3mr.h b/drivers/scsi/mpi3mr/mpi3mr.h index 0c6efb0eb063..60e129603a77 100644 --- a/drivers/scsi/mpi3mr/mpi3mr.h +++ b/drivers/scsi/mpi3mr/mpi3mr.h @@ -194,6 +194,24 @@ extern atomic64_t event_counter; #define MPI3MR_MAX_APP_XFER_SECTORS (2048 + 512) /** + * struct mpi3mr_nvme_pt_sge - Structure to store SGEs for NVMe + * Encapsulated commands. + * + * @base_addr: Physical address + * @length: SGE length + * @rsvd: Reserved + * @rsvd1: Reserved + * @sgl_type: sgl type + */ +struct mpi3mr_nvme_pt_sge { + u64 base_addr; + u32 length; + u16 rsvd; + u8 rsvd1; + u8 sgl_type; +}; + +/** * struct mpi3mr_buf_map - local structure to * track kernel and user buffers associated with an BSG * structure. @@ -746,6 +764,9 @@ struct scmd_priv { * @reset_waitq: Controller reset wait queue * @prepare_for_reset: Prepare for reset event received * @prepare_for_reset_timeout_counter: Prepare for reset timeout + * @prp_list_virt: NVMe encapsulated PRP list virtual base + * @prp_list_dma: NVMe encapsulated PRP list DMA + * @prp_sz: NVME encapsulated PRP list size * @diagsave_timeout: Diagnostic information save timeout * @logging_level: Controller debug logging level * @flush_io_count: I/O count to flush after reset @@ -901,6 +922,10 @@ struct mpi3mr_ioc { u8 prepare_for_reset; u16 prepare_for_reset_timeout_counter; + void *prp_list_virt; + dma_addr_t prp_list_dma; + u32 prp_sz; + u16 diagsave_timeout; int logging_level; u16 flush_io_count; |