public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: "Peter Wang (王信友)" <peter.wang@mediatek.com>
To: "avri.altman@wdc.com" <avri.altman@wdc.com>,
	"beanhuo@micron.com" <beanhuo@micron.com>,
	"wangshuaiwei1@xiaomi.com" <wangshuaiwei1@xiaomi.com>,
	"bvanassche@acm.org" <bvanassche@acm.org>,
	"adrian.hunter@intel.com" <adrian.hunter@intel.com>,
	"alim.akhtar@samsung.com" <alim.akhtar@samsung.com>,
	"James.Bottomley@HansenPartnership.com"
	<James.Bottomley@HansenPartnership.com>,
	"martin.petersen@oracle.com" <martin.petersen@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"wanghui33@xiaomi.com" <wanghui33@xiaomi.com>
Subject: Re: [PATCH v2] scsi: ufs: core: Fix bRefClkFreq write failure in HS-LSS mode
Date: Wed, 15 Apr 2026 02:40:11 +0000	[thread overview]
Message-ID: <d72f1e542e1a3fa4cea13cf0a9fd5fcd73cbad58.camel@mediatek.com> (raw)
In-Reply-To: <1776153767068194.12.seg@mailgw02.mediatek.com>

On Tue, 2026-04-14 at 11:37 +0800, Wang Shuaiwei wrote:
> According to the UFS spec, the bRefClkFreq attribute can only be
> written
> when both sub-links are in LS-MODE. However, in HS LSS mode with
> resetmode = HS_MODE, if the UFS device's default bRefClkFreq value
> differs from the host controller's dev_ref_clk_freq setting, the
> write operation will fail.
> 
> To fix this issue, introduce ufshcd_get_op_mode() function to detect
> the current link operational mode. Call ufshcd_set_dev_ref_clk() only
> when both sub-links are in LS-MODE to ensure the attribute can be
> written successfully.
> 
> Signed-off-by: Wang Shuaiwei <wangshuaiwei1@xiaomi.com>

Reviewed-by: Peter Wang <peter.wang@mediatek.com>


       reply	other threads:[~2026-04-15  2:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1776153767068194.12.seg@mailgw02.mediatek.com>
2026-04-15  2:40 ` Peter Wang (王信友) [this message]
2026-04-14  3:37 [PATCH v2] scsi: ufs: core: Fix bRefClkFreq write failure in HS-LSS mode Wang Shuaiwei

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=d72f1e542e1a3fa4cea13cf0a9fd5fcd73cbad58.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=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=wanghui33@xiaomi.com \
    --cc=wangshuaiwei1@xiaomi.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