Patch "scsi: lpfc: Move NPIV's transport unregistration to after resource clean up" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    scsi: lpfc: Move NPIV's transport unregistration to after resource clean up

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     scsi-lpfc-move-npiv-s-transport-unregistration-to-af.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 3501c7f147e18a6fbca2491bdf743f8acc6f6544
Author: Justin Tee <justin.tee@xxxxxxxxxxxx>
Date:   Tue Mar 5 12:04:53 2024 -0800

    scsi: lpfc: Move NPIV's transport unregistration to after resource clean up
    
    [ Upstream commit 4ddf01f2f1504fa08b766e8cfeec558e9f8eef6c ]
    
    There are cases after NPIV deletion where the fabric switch still believes
    the NPIV is logged into the fabric.  This occurs when a vport is
    unregistered before the Remove All DA_ID CT and LOGO ELS are sent to the
    fabric.
    
    Currently fc_remove_host(), which calls dev_loss_tmo for all D_IDs including
    the fabric D_ID, removes the last ndlp reference and frees the ndlp rport
    object.  This sometimes causes the race condition where the final DA_ID and
    LOGO are skipped from being sent to the fabric switch.
    
    Fix by moving the fc_remove_host() and scsi_remove_host() calls after DA_ID
    and LOGO are sent.
    
    Signed-off-by: Justin Tee <justin.tee@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20240305200503.57317-3-justintee8345@xxxxxxxxx
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/lpfc/lpfc_vport.c b/drivers/scsi/lpfc/lpfc_vport.c
index 4d171f5c213f7..6b4259894584f 100644
--- a/drivers/scsi/lpfc/lpfc_vport.c
+++ b/drivers/scsi/lpfc/lpfc_vport.c
@@ -693,10 +693,6 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
 	lpfc_free_sysfs_attr(vport);
 	lpfc_debugfs_terminate(vport);
 
-	/* Remove FC host to break driver binding. */
-	fc_remove_host(shost);
-	scsi_remove_host(shost);
-
 	/* Send the DA_ID and Fabric LOGO to cleanup Nameserver entries. */
 	ndlp = lpfc_findnode_did(vport, Fabric_DID);
 	if (!ndlp)
@@ -740,6 +736,10 @@ lpfc_vport_delete(struct fc_vport *fc_vport)
 
 skip_logo:
 
+	/* Remove FC host to break driver binding. */
+	fc_remove_host(shost);
+	scsi_remove_host(shost);
+
 	lpfc_cleanup(vport);
 
 	/* Remove scsi host now.  The nodes are cleaned up. */




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux