mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "quic_cang@quicinc.com" <quic_cang@quicinc.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"quic_nguyenb@quicinc.com" <quic_nguyenb@quicinc.com>,
	"quic_nitirawa@quicinc.com" <quic_nitirawa@quicinc.com>,
	"avri.altman@wdc.com" <avri.altman@wdc.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"neil.armstrong@linaro.org" <neil.armstrong@linaro.org>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"ebiggers@kernel.org" <ebiggers@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v2 2/2] scsi: ufs: core: Replace hard coded vcc-off delay with a variable
Date: Mon, 13 Oct 2025 03:58:32 +0000	[thread overview]
Message-ID: <714110b991f9ced2c8d496afc767d8666ad8332a.camel@mediatek.com> (raw)
In-Reply-To: <7df97c5bf49d7e53435725062bcff2ccd77a6959.1760039554.git.quic_nguyenb@quicinc.com>

On Thu, 2025-10-09 at 13:10 -0700, Bao D. Nguyen wrote:
> 
> +       /*
> +        * Most ufs devices require 1ms delay after vcc is powered
> off before
> +        * it can be powered on again. Set the default to 5ms. The
> platform
> +        * drivers can override this setting as needed.
> +        */
> +       hba->sleep_post_vcc_off = 5000;
> +
> 

Hi Bao,

Since 2ms is sufficient for most devices, wouldn't it make
sense to set the default value to 2ms?


>         init_completion(&hba->dev_cmd.complete);
> 
>         err = ufshcd_hba_init(hba);
> diff --git a/include/ufs/ufshcd.h b/include/ufs/ufshcd.h
> index 1d39437..ad49979 100644
> --- a/include/ufs/ufshcd.h
> +++ b/include/ufs/ufshcd.h
> @@ -1140,6 +1140,8 @@ struct ufs_hba {
>         int critical_health_count;
>         atomic_t dev_lvl_exception_count;
>         u64 dev_lvl_exception_id;
> +
> +       u32 sleep_post_vcc_off;
> 

The name sleep_post_vcc_off might be misunderstood as a 
status or a flag. I suggest changing it to a more explicit 
name, such as vcc_off_delay_ms.


Thanks
Peter



  reply	other threads:[~2025-10-13  3:58 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09 20:10 [PATCH v2 0/2] *** Remove UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk *** Bao D. Nguyen
2025-10-09 20:10 ` [PATCH v2 1/2] scsi: ufs: core: Remove UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk Bao D. Nguyen
2025-10-13  3:56   ` Peter Wang (王信友)
2025-10-09 20:10 ` [PATCH v2 2/2] scsi: ufs: core: Replace hard coded vcc-off delay with a variable Bao D. Nguyen
2025-10-13  3:58   ` Peter Wang (王信友) [this message]
2025-10-13 19:34     ` Bao D. Nguyen
2025-10-13 16:25 ` [PATCH v2 0/2] *** Remove UFS_DEVICE_QUIRK_DELAY_AFTER_LPM quirk *** Bart Van Assche

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=714110b991f9ced2c8d496afc767d8666ad8332a.camel@mediatek.com \
    --to=peter.wang@mediatek.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=adrian.hunter@intel.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=ebiggers@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_cang@quicinc.com \
    --cc=quic_nguyenb@quicinc.com \
    --cc=quic_nitirawa@quicinc.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®