scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes
authorJustin Tee <justin.tee@broadcom.com>
Thu, 7 Dec 2023 22:40:38 +0000 (14:40 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 14 Dec 2023 03:17:57 +0000 (22:17 -0500)
commitaba0fb0ef607a71511d23a07406f11130c1a54c5
treeecac18000a3d763904ccd3b3a64eae1136975b88
parent8dc8eb89f4df74593ba4bf30c3d31a0fc6d3ea47
scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes

If priority tagging is set in the service parameters of a FLOGI cmpl, then
we update the vmid_flag.  In the current logic, if a follow up FLOGI cmpl
updates its service parameters such that priority tagging is no longer set,
then the vmid_flag ends up keeping stale data.

Fix by ensuring we clear the vmid_flag member during lpfc_reinit_vmid, and
check the priority tagging service parameter after reinitialization of the
vmid data structures.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20231207224039.35466-4-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_vmid.c