From: James Smart Date: Tue, 12 Apr 2022 22:19:59 +0000 (-0700) Subject: scsi: lpfc: Remove false FDMI NVMe FC-4 support for NPIV ports X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=6c8a3ce64b2cb36e4006a61533aedc998723b41b;p=linux.git scsi: lpfc: Remove false FDMI NVMe FC-4 support for NPIV ports FDMI FC-4 Active Type for vports mistakenly shows NVMe support. Add a check to only set the NVMe support bit for the physical port. Link: https://lore.kernel.org/r/20220412222008.126521-18-jsmart2021@gmail.com Co-developed-by: Justin Tee Signed-off-by: Justin Tee Signed-off-by: James Smart Signed-off-by: Martin K. Petersen --- diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index 5f2b2d8eacbf3..8df5ba3ed482e 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -3153,6 +3153,7 @@ static int lpfc_fdmi_port_attr_active_fc4type(struct lpfc_vport *vport, struct lpfc_fdmi_attr_def *ad) { + struct lpfc_hba *phba = vport->phba; struct lpfc_fdmi_attr_entry *ae; uint32_t size; @@ -3163,7 +3164,8 @@ lpfc_fdmi_port_attr_active_fc4type(struct lpfc_vport *vport, ae->un.AttrTypes[7] = 0x01; /* Type 0x20 - CT */ /* Check to see if NVME is configured or not */ - if (vport->phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME) + if (vport == phba->pport && + phba->cfg_enable_fc4_type & LPFC_ENABLE_NVME) ae->un.AttrTypes[6] = 0x1; /* Type 0x28 - NVME */ size = FOURBYTES + 32;