diff mbox series

[v1] ufs: core: bypass quick recovery if need force reset

Message ID 20240712094506.11284-1-peter.wang@mediatek.com (mailing list archive)
State Accepted
Headers show
Series [v1] ufs: core: bypass quick recovery if need force reset | expand

Commit Message

Peter Wang (王信友) July 12, 2024, 9:45 a.m. UTC
From: Peter Wang <peter.wang@mediatek.com>

If force_reset is true, bypass quick recovery.
This will shorten error recovery time.

Signed-off-by: Peter Wang <peter.wang@mediatek.com>
---
 drivers/ufs/core/ufshcd.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Bean Huo July 12, 2024, 9:58 a.m. UTC | #1
On Fri, 2024-07-12 at 17:45 +0800, peter.wang@mediatek.com wrote:
> From: Peter Wang <peter.wang@mediatek.com>
> 
> If force_reset is true, bypass quick recovery.
> This will shorten error recovery time.
Reviewed-by: Bean Huo <beanhuo@micron.com>
Bart Van Assche July 12, 2024, 5:43 p.m. UTC | #2
On 7/12/24 2:45 AM, peter.wang@mediatek.com wrote:
> If force_reset is true, bypass quick recovery.
> This will shorten error recovery time.

Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Martin K. Petersen July 16, 2024, 2:53 a.m. UTC | #3
> If force_reset is true, bypass quick recovery. This will shorten error
> recovery time.

Applied to 6.11/scsi-staging, thanks!
Martin K. Petersen July 23, 2024, 1:23 a.m. UTC | #4
On Fri, 12 Jul 2024 17:45:06 +0800, peter.wang@mediatek.com wrote:

> If force_reset is true, bypass quick recovery.
> This will shorten error recovery time.
> 
> 

Applied to 6.11/scsi-queue, thanks!

[1/1] ufs: core: bypass quick recovery if need force reset
      https://git.kernel.org/mkp/scsi/c/022587d8aec3
diff mbox series

Patch

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 46433ecf0c4d..357379ddd79a 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -6545,7 +6545,8 @@  static void ufshcd_err_handler(struct work_struct *work)
 	if (ufshcd_err_handling_should_stop(hba))
 		goto skip_err_handling;
 
-	if (hba->dev_quirks & UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS) {
+	if ((hba->dev_quirks & UFS_DEVICE_QUIRK_RECOVERY_FROM_DL_NAC_ERRORS) &&
+	    !hba->force_reset) {
 		bool ret;
 
 		spin_unlock_irqrestore(hba->host->host_lock, flags);