mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: Nitin Rawat <nitin.rawat@oss.qualcomm.com>,
	mani@kernel.org, James.Bottomley@HansenPartnership.com,
	alim.akhtar@samsung.com, avri.altman@wdc.com,
	martin.petersen@oracle.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH V1 2/2] scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk
Date: Mon, 1 Jun 2026 09:17:14 -0700	[thread overview]
Message-ID: <81e31b3a-a14a-413e-b6a7-0dae99b16bd2@acm.org> (raw)
In-Reply-To: <20260531235011.1052706-3-nitin.rawat@oss.qualcomm.com>

On 5/31/26 4:50 PM, Nitin Rawat wrote:
> -
> -	/* reset the connected UFS device during power down */
> -	if (ufs_qcom_is_link_off(hba) && host->device_reset) {
> +	/*
> +	 * For some UFS vendors, skip asserting device reset here.
> +	 * These vendor parts keep drawing larger current after reset
> +	 * is asserted until it is deasserted, and the 10ms delay is
> +	 * not sufficient to prevent OCP (Over Current Protection)
> +	 * on the regulator. This is for the powerdown case, so
> +	 * the device reset can be asserted later as part of the
> +	 * platform shutdown sequence.
> +	 */
> +	if (ufs_qcom_is_link_off(hba) && host->device_reset &&
> +	    !(hba->quirks & UFSHCD_QUIRK_SKIP_DEVICE_RESET)) {
>   		ufs_qcom_device_reset_ctrl(hba, true);
>   		/*
>   		 * After sending the SSU command, asserting the rst_n
> @@ -1288,6 +1296,19 @@ static struct ufs_dev_quirk ufs_qcom_dev_fixups[] = {
>   static void ufs_qcom_fixup_dev_quirks(struct ufs_hba *hba)
>   {
>   	ufshcd_fixup_dev_quirks(hba, ufs_qcom_dev_fixups);
> +
> +	/*
> +	 * Some UFS parts keep drawing larger current after reset is asserted
> +	 * until it is deasserted. The 10ms delay added after asserting HWRST
> +	 * (as done for other vendors) is not sufficient for these parts.
> +	 *
> +	 * Skip asserting device reset during UFS power down for these parts
> +	 * to prevent OCP (Over Current Protection) fault on the regulator.
> +	 * This is handled only in shutdown; the device reset will be asserted
> +	 * as part of the platform shutdown sequence.
> +	 */
> +	if (hba->dev_info.wmanufacturerid == UFS_VENDOR_MICRON)
> +		hba->quirks |= UFSHCD_QUIRK_SKIP_DEVICE_RESET;
>   }

Why has this fix been implemented in the ufs-qcom.c source file? Isn't
this an issue that affects all host controllers?

Thanks,

Bart.

      reply	other threads:[~2026-06-01 16:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-31 23:50 [PATCH V1 0/2] scsi: ufs: ufs-qcom: Fix OCP issue during powerdown Nitin Rawat
2026-05-31 23:50 ` [PATCH V1 1/2] scsi: ufs: core: Add UFSHCD_QUIRK_SKIP_DEVICE_RESET quirk Nitin Rawat
2026-06-08  9:33   ` Konrad Dybcio
2026-05-31 23:50 ` [PATCH V1 2/2] scsi: ufs: ufs-qcom: Enable SKIP DEVICE RESET Quirk Nitin Rawat
2026-06-01 16:17   ` Bart Van Assche [this message]

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=81e31b3a-a14a-413e-b6a7-0dae99b16bd2@acm.org \
    --to=bvanassche@acm.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=nitin.rawat@oss.qualcomm.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

all inboxes | Powered by JetHome®