Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: lpfc: Reinitialize an NPIV's VMID data structures after FDISC

After a follow up FDISC cmpl, an NPIV's VMID data structures are not
updated.

Fix by calling lpfc_reinit_vmid and copying the physical port's vmid_flag
to the NPIV's vmid_flag in the NPIV registration cmpl code path.

Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20231207224039.35466-3-justintee8345@gmail.com
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Justin Tee and committed by
Martin K. Petersen
8dc8eb89 0653d409

+8
+8
drivers/scsi/lpfc/lpfc_els.c
··· 11143 11143 lpfc_nlp_put(ndlp); 11144 11144 11145 11145 mempool_free(pmb, phba->mbox_mem_pool); 11146 + 11147 + /* reinitialize the VMID datastructure before returning. 11148 + * this is specifically for vport 11149 + */ 11150 + if (lpfc_is_vmid_enabled(phba)) 11151 + lpfc_reinit_vmid(vport); 11152 + vport->vmid_flag = vport->phba->pport->vmid_flag; 11153 + 11146 11154 return; 11147 11155 } 11148 11156