diff options
author | Justin Tee <justin.tee@broadcom.com> | 2024-01-31 10:51:02 -0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2024-02-05 20:51:35 -0500 |
commit | 7bb6cb7bb21c01cda4425efc935eb8f187832eb6 (patch) | |
tree | ae090c4c6bdc5f5ea8a74987fc2e3c8c159da60c /drivers | |
parent | a801d57a110d68aacf8f8b9bb85ef2164c800461 (diff) | |
download | linux-stable-7bb6cb7bb21c01cda4425efc935eb8f187832eb6.tar.gz linux-stable-7bb6cb7bb21c01cda4425efc935eb8f187832eb6.tar.bz2 linux-stable-7bb6cb7bb21c01cda4425efc935eb8f187832eb6.zip |
scsi: lpfc: Fix failure to delete vports when discovery is in progress
Requests to delete an NPIV port may fail repeatedly if the initial request
is received during discovery.
If the FC_UNLOADING load_flag is set, then skip CT response processing for
the physical port. This allows discovery processing for other lpfc_vport
objects to reach their cmpl routines before deleting the vport.
Signed-off-by: Justin Tee <justin.tee@broadcom.com>
Link: https://lore.kernel.org/r/20240131185112.149731-8-justintee8345@gmail.com
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_ct.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/scsi/lpfc/lpfc_ct.c b/drivers/scsi/lpfc/lpfc_ct.c index baae1f8279e0..315db836404a 100644 --- a/drivers/scsi/lpfc/lpfc_ct.c +++ b/drivers/scsi/lpfc/lpfc_ct.c @@ -943,8 +943,8 @@ lpfc_cmpl_ct_cmd_gid_ft(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, goto out; } - /* Don't bother processing response if vport is being torn down. */ - if (vport->load_flag & FC_UNLOADING) { + /* Skip processing response on pport if unloading */ + if (vport == phba->pport && vport->load_flag & FC_UNLOADING) { if (vport->fc_flag & FC_RSCN_MODE) lpfc_els_flush_rscn(vport); goto out; @@ -1166,8 +1166,8 @@ lpfc_cmpl_ct_cmd_gid_pt(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, goto out; } - /* Don't bother processing response if vport is being torn down. */ - if (vport->load_flag & FC_UNLOADING) { + /* Skip processing response on pport if unloading */ + if (vport == phba->pport && vport->load_flag & FC_UNLOADING) { if (vport->fc_flag & FC_RSCN_MODE) lpfc_els_flush_rscn(vport); goto out; |