History

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.

Sumit Saxena committed 4 years ago

Commit 7dbd0dd1 parent 986d6ba3 files · +378 −3Browse files

Showing the changes to include/uapi (1 of 3 files). Show all

Unified · Split

include/uapi/scsi/scsi_bsg_mpi3mr.h+8−0
@@ -490,6 +490,14 @@ struct mpi3_nvme_encapsulated_error_reply { · 489 unmodified lines
490490 __le32 nvme_completion_entry[4];
491491 };
492492
493+#define MPI3MR_NVME_PRP_SIZE 8 /* PRP size */
494+#define MPI3MR_NVME_CMD_PRP1_OFFSET 24 /* PRP1 offset in NVMe cmd */
495+#define MPI3MR_NVME_CMD_PRP2_OFFSET 32 /* PRP2 offset in NVMe cmd */
496+#define MPI3MR_NVME_CMD_SGL_OFFSET 24 /* SGL offset in NVMe cmd */
497+#define MPI3MR_NVME_DATA_FORMAT_PRP 0
498+#define MPI3MR_NVME_DATA_FORMAT_SGL1 1
499+#define MPI3MR_NVME_DATA_FORMAT_SGL2 2
500+
493501 /* MPI3: task management related definitions */
494502 struct mpi3_scsi_task_mgmt_request {
495503 __le16 host_tag;