Patch "scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend" has been added to the 5.15-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: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend

to the 5.15-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-ufs-core-fix-i-o-hang-that-occurs-when-bkops-fa.patch
and it can be found in the queue-5.15 subdirectory.

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



commit b628f6e34b9e4279e41d399974779e70275411cf
Author: Keoseong Park <keosung.park@xxxxxxxxxxx>
Date:   Tue Apr 25 12:17:21 2023 +0900

    scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend
    
    [ Upstream commit 1a7edd041f2d252f251523ba3f2eaead076a8f8d ]
    
    Even when urgent BKOPS fails, the consumer will get stuck in runtime
    suspend status. Like commit 1a5665fc8d7a ("scsi: ufs: core: WLUN suspend
    SSU/enter hibern8 fail recovery"), trigger the error handler and return
    -EBUSY to break the suspend.
    
    Fixes: b294ff3e3449 ("scsi: ufs: core: Enable power management for wlun")
    Signed-off-by: Keoseong Park <keosung.park@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230425031721epcms2p5d4de65616478c967d466626e20c42a3a@epcms2p5
    Reviewed-by: Avri Altman <avri.altman@xxxxxxx>
    Signed-off-by: Martin K. Petersen <martin.petersen@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
index bc2b16701a116..d00d263705e15 100644
--- a/drivers/scsi/ufs/ufshcd.c
+++ b/drivers/scsi/ufs/ufshcd.c
@@ -8756,8 +8756,16 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
 			 * that performance might be impacted.
 			 */
 			ret = ufshcd_urgent_bkops(hba);
-			if (ret)
+			if (ret) {
+				/*
+				 * If return err in suspend flow, IO will hang.
+				 * Trigger error handler and break suspend for
+				 * error recovery.
+				 */
+				ufshcd_force_error_recovery(hba);
+				ret = -EBUSY;
 				goto enable_scaling;
+			}
 		} else {
 			/* make sure that auto bkops is disabled */
 			ufshcd_disable_auto_bkops(hba);



[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