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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:14:23 +0000 (20:14 +0000)
commitf92ee7113bb70ba3871bc3325b7ade260ee6f37b
tree04c3472b9490b59036b44fb779e69eeb6f6df2df
parent6d38434f427c659e45570dba43d008bea0365d0d
scsi: lpfc: Move determination of vmid_flag after VMID reinitialization completes

[ Upstream commit aba0fb0ef607a71511d23a07406f11130c1a54c5 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/scsi/lpfc/lpfc_els.c
drivers/scsi/lpfc/lpfc_vmid.c