Skip to content

Commit

Permalink
scsi: lpfc: Remove false FDMI NVMe FC-4 support for NPIV ports
Browse files Browse the repository at this point in the history
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 <justin.tee@broadcom.com>
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
  • Loading branch information
James Smart authored and Martin K. Petersen committed Apr 19, 2022
1 parent c364c45 commit 6c8a3ce
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/scsi/lpfc/lpfc_ct.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand Down

0 comments on commit 6c8a3ce

Please sign in to comment.