From: Bean Huo <beanhuo@iokpp.de>
To: "Enric Balletbo i Serra" <eballetb@redhat.com>,
"Alim Akhtar" <alim.akhtar@samsung.com>,
"Bart Van Assche" <bvanassche@acm.org>,
"Bean Huo" <beanhuo@micron.com>,
"Stanley Jhu" <stanleyjhu@google.com>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <mkp@kernel.org>,
"Mike Bi" <mikebi@micron.com>,
"Avri Altman" <avri.altman@sandisk.com>,
"Thomas Weißschuh" <linux@weissschuh.net>
Cc: Luca Porzio <lporzio@micron.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
NXP S32 Linux Team <s32@nxp.com>,
linux-arm-kernel@lists.infradead.org,
Frank Li <Frank.Li@nxp.com>,
Larisa Grigore <larisa.grigore@oss.nxp.com>
Subject: Re: [PATCH] scsi: ufs: core: Use ufshcd_query_attr_retry() for RTC update
Date: Mon, 16 Nov 2026 23:27:49 +0100 [thread overview]
Message-ID: <780f3f4ceacd7cf078542c9a8a4c8c8dba9666b0.camel@iokpp.de> (raw)
In-Reply-To: <20261116-ufs-rtc-query-retry-v1-1-4de69b175e8d@redhat.com>
Thanks for the patch. A few comments:
On Mon, 2026-11-16 at 14:39 +0100, Enric Balletbo i Serra wrote:
> ufshcd_update_rtc() uses ufshcd_query_attr() directly to write the
> bSecondsPassed attribute, making it the only query attribute caller in
> the UFS core that does not use the retry variant. All other callers use
> ufshcd_query_attr_retry(), which retries up to three times on transient
> failures before escalating to dev_err.
>
> This causes spurious error messages during boot on some platforms when
> the write-attribute command hits a transient OCS_INVALID_COMMAND_STATUS
> error:
>
> ufs-s32n7 4ac80000.ufs: ufshcd_query_attr: opcode 0x04 for idn 15 failed,
> index 0, err = 15
this is printed by ufshcd_query_attr() itself at dev_err level, so it will still
show up with this patch. Could you share the log with the patch applied?
and err = 15 is OCS_INVALID_COMMAND_STATUS, the value the driver puts in the
UTRD before sending. So the request was completed but the host controller did
not update OCS. This looks like a host side problem? not a transient device
failure, and a retry here would only hide it. Is this SDB or MCQ? Does it only
happen on the first RTC update after probe?
> ufs-s32n7 4ac80000.ufs: ufshcd_update_rtc: Failed to update rtc 15
> Switch to ufshcd_query_attr_retry() to handle transient failures
> gracefully, consistent with every other attribute query in the driver.
>
ufshcd_update_rtc() is not the only caller without retry. ufs-sysfs.c, ufs-
hwmon.c and ufs-txeq.c also call ufshcd_query_attr() directly, so the commit
message is wrong.
> Fixes: 6bf999e0eb41 ("scsi: ufs: core: Add UFS RTC support")
> Signed-off-by: Enric Balletbo i Serra <eballetb@redhat.com>
I would like to understand the root cause first.
Kind regards,
Bean
prev parent reply other threads:[~2026-11-16 22:28 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 13:39 Enric Balletbo i Serra
2026-11-16 14:38 ` Larisa Ileana Grigore
2026-11-16 22:27 ` Bean Huo [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=780f3f4ceacd7cf078542c9a8a4c8c8dba9666b0.camel@iokpp.de \
--to=beanhuo@iokpp.de \
--cc=Frank.Li@nxp.com \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@sandisk.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=eballetb@redhat.com \
--cc=larisa.grigore@oss.nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@weissschuh.net \
--cc=lporzio@micron.com \
--cc=mikebi@micron.com \
--cc=mkp@kernel.org \
--cc=s32@nxp.com \
--cc=stanleyjhu@google.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®