Skip to content

Commit 046206b

Browse files
committed
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fix from James Bottomley: "A single small fix for the UFS driver to fix a power management failure" * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: ufs: core: Fix I/O hang that occurs when BKOPS fails in W-LUN suspend
2 parents d4d5894 + 1a7edd0 commit 046206b

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

drivers/ufs/core/ufshcd.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9459,8 +9459,16 @@ static int __ufshcd_wl_suspend(struct ufs_hba *hba, enum ufs_pm_op pm_op)
94599459
* that performance might be impacted.
94609460
*/
94619461
ret = ufshcd_urgent_bkops(hba);
9462-
if (ret)
9462+
if (ret) {
9463+
/*
9464+
* If return err in suspend flow, IO will hang.
9465+
* Trigger error handler and break suspend for
9466+
* error recovery.
9467+
*/
9468+
ufshcd_force_error_recovery(hba);
9469+
ret = -EBUSY;
94639470
goto enable_scaling;
9471+
}
94649472
} else {
94659473
/* make sure that auto bkops is disabled */
94669474
ufshcd_disable_auto_bkops(hba);

0 commit comments

Comments
 (0)