diff mbox

[13/19] lpfc: Disable NPIV support if NVME is enabled

Message ID 20170922061741.12347-14-jsmart2021@gmail.com (mailing list archive)
State Superseded
Headers show

Commit Message

James Smart Sept. 22, 2017, 6:17 a.m. UTC
From: Dick Kennedy <dick.kennedy@broadcom.com>

The initial implementation of NVME didn't merge with NPIV support.
As such, there are several issues if NPIV is used with NVME. For now,
ensure that if NVME is enabled then NPIV is not enabled.

Support for NPIV with NVME will be added in the near future.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
---
 drivers/scsi/lpfc/lpfc_vport.c | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Johannes Thumshirn Sept. 25, 2017, 10:26 a.m. UTC | #1
On Thu, Sep 21, 2017 at 11:17:35PM -0700, James Smart wrote:
> Support for NPIV with NVME will be added in the near future.

Sounds like the future is bright,
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index c714482bf4c5..c9d33b1268cb 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -313,6 +313,15 @@  lpfc_vport_create(struct fc_vport *fc_vport, bool disable)
 		goto error_out;
 	}
 
+	/* NPIV is not supported if HBA has NVME enabled */
+	if (phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME) {
+		lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,
+				"3189 Create VPORT failed: "
+				"NPIV is not supported on NVME\n");
+		rc = VPORT_INVAL;
+		goto error_out;
+	}
+
 	vpi = lpfc_alloc_vpi(phba);
 	if (vpi == 0) {
 		lpfc_printf_log(phba, KERN_ERR, LOG_VPORT,