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

2017-09-25 Thread Johannes Thumshirn
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 

-- 
Johannes Thumshirn  Storage
jthumsh...@suse.de+49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850


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

2017-09-22 Thread James Smart
From: Dick Kennedy 

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 
Signed-off-by: James Smart 
---
 drivers/scsi/lpfc/lpfc_vport.c | 9 +
 1 file changed, 9 insertions(+)

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,
-- 
2.13.1