aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/drivers/scsi/lpfc/lpfc_hw4.h
diff options
context:
space:
mode:
authorJames Smart <james.smart@broadcom.com>2020-11-15 11:26:39 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2020-11-17 00:43:55 -0500
commitb101eb27fde072866c6f5bdbcc2c28a6bf2c9bf7 (patch)
treef5cc44c4ead1b656f088bd6ba92d71134c76ef91 /drivers/scsi/lpfc/lpfc_hw4.h
parentscsi: lpfc: Fix NPIV Fabric Node reference counting (diff)
downloadwireguard-linux-b101eb27fde072866c6f5bdbcc2c28a6bf2c9bf7.tar.xz
wireguard-linux-b101eb27fde072866c6f5bdbcc2c28a6bf2c9bf7.zip
scsi: lpfc: Refactor WQE structure definitions for common use
In preparation of reworking the driver to use a native SLI-4 WQE interface for the SCSI and NVMe I/O paths, start by commonizing the WQE exchange type and command type attributes. While adjusting these options also noted the variance in the pbde field. Fix this by setting templates to 0 and in NVMe, which explicitly uses this option, setting the value. Link: https://lore.kernel.org/r/20201115192646.12977-11-james.smart@broadcom.com Co-developed-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw4.h')
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 49f5559f5fed..26a9057fb042 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -4386,9 +4386,11 @@ struct wqe_common {
#define wqe_ebde_cnt_SHIFT 0
#define wqe_ebde_cnt_MASK 0x0000000f
#define wqe_ebde_cnt_WORD word10
-#define wqe_nvme_SHIFT 4
-#define wqe_nvme_MASK 0x00000001
-#define wqe_nvme_WORD word10
+#define wqe_xchg_SHIFT 4
+#define wqe_xchg_MASK 0x00000001
+#define wqe_xchg_WORD word10
+#define LPFC_SCSI_XCHG 0x0
+#define LPFC_NVME_XCHG 0x1
#define wqe_oas_SHIFT 6
#define wqe_oas_MASK 0x00000001
#define wqe_oas_WORD word10
@@ -4886,6 +4888,8 @@ struct lpfc_grp_hdr {
#define NVME_READ_CMD 0x0
#define FCP_COMMAND_DATA_OUT 0x1
#define NVME_WRITE_CMD 0x1
+#define COMMAND_DATA_IN 0x0
+#define COMMAND_DATA_OUT 0x1
#define FCP_COMMAND_TRECEIVE 0x2
#define FCP_COMMAND_TRSP 0x3
#define FCP_COMMAND_TSEND 0x7