]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
scsi: lpfc: Disable NPIV support if NVME is enabled
authorDick Kennedy <dick.kennedy@broadcom.com>
Sat, 30 Sep 2017 00:34:40 +0000 (17:34 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 3 Oct 2017 02:46:39 +0000 (22:46 -0400)
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>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_vport.c

index c714482bf4c5587b90b607c8d5ec4f62cf5b628e..c9d33b1268cb66c57fb2e8c0246a944586ada4c3 100644 (file)
@@ -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,