Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: peter.wang@mediatek.com, linux-scsi@vger.kernel.org,
	martin.petersen@oracle.com, avri.altman@sandisk.com,
	alim.akhtar@samsung.com, jejb@linux.ibm.com
Cc: wsd_upstream@mediatek.com, linux-mediatek@lists.infradead.org,
	chun-hung.wu@mediatek.com, alice.chao@mediatek.com,
	cc.chou@mediatek.com, chaotian.jing@mediatek.com,
	tun-yu.yu@mediatek.com, eddie.huang@mediatek.com,
	naomi.chu@mediatek.com, ed.tsai@mediatek.com,
	sh043.lee@samsung.com
Subject: Re: [PATCH v1] ufs: core: Move link recovery for hibern8 exit failure to wl_resume
Date: Mon, 23 Feb 2026 09:23:46 -0800	[thread overview]
Message-ID: <d95704e9-64d2-458f-8a4f-8d6b5f668033@acm.org> (raw)
In-Reply-To: <20260223103906.2533654-1-peter.wang@mediatek.com>

On 2/23/26 2:37 AM, peter.wang@mediatek.com wrote:
> diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
> index 44efb03765b9..9908375b2f98 100644
> --- a/drivers/ufs/core/ufshcd.c
> +++ b/drivers/ufs/core/ufshcd.c
> @@ -4385,14 +4385,6 @@ static int ufshcd_uic_pwr_ctrl(struct ufs_hba *hba, struct uic_command *cmd)
>   	spin_unlock_irqrestore(hba->host->host_lock, flags);
>   	mutex_unlock(&hba->uic_cmd_mutex);
>   
> -	/*
> -	 * If the h8 exit fails during the runtime resume process, it becomes
> -	 * stuck and cannot be recovered through the error handler.  To fix
> -	 * this, use link recovery instead of the error handler.
> -	 */
> -	if (ret && hba->pm_op_in_progress)
> -		ret = ufshcd_link_recovery(hba);
> -
>   	return ret;
>   }
>   
> @@ -10175,7 +10167,15 @@ static int __ufshcd_wl_resume(struct ufs_hba *hba, enum ufs_pm_op pm_op)
>   		} else {
>   			dev_err(hba->dev, "%s: hibern8 exit failed %d\n",
>   					__func__, ret);
> -			goto vendor_suspend;
> +			/*
> +			 * If the h8 exit fails during the runtime resume
> +			 * process, it becomes stuck and cannot be recovered
> +			 * through the error handler. To fix this, use link
> +			 * recovery instead of the error handler.
> +			 */
> +			ret = ufshcd_link_recovery(hba);
> +			if (ret)
> +				goto vendor_suspend;
>   		}
>   	} else if (ufshcd_is_link_off(hba)) {
>   		/*

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

  reply	other threads:[~2026-02-23 17:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-23 10:37 [PATCH v1] ufs: core: Move link recovery for hibern8 exit failure to wl_resume peter.wang
2026-02-23 17:23 ` Bart Van Assche [this message]
2026-02-25  2:08 ` Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d95704e9-64d2-458f-8a4f-8d6b5f668033@acm.org \
    --to=bvanassche@acm.org \
    --cc=alice.chao@mediatek.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@sandisk.com \
    --cc=cc.chou@mediatek.com \
    --cc=chaotian.jing@mediatek.com \
    --cc=chun-hung.wu@mediatek.com \
    --cc=ed.tsai@mediatek.com \
    --cc=eddie.huang@mediatek.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=naomi.chu@mediatek.com \
    --cc=peter.wang@mediatek.com \
    --cc=sh043.lee@samsung.com \
    --cc=tun-yu.yu@mediatek.com \
    --cc=wsd_upstream@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox