From: Damien Le Moal <dlemoal@kernel.org>
To: Stanley Jhu <stanleyjhu@google.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: "James E . J . Bottomley" <James.Bottomley@HansenPartnership.com>,
Alim Akhtar <alim.akhtar@samsung.com>,
Avri Altman <avri.altman@wdc.com>,
Bart Van Assche <bvanassche@acm.org>,
Bean Huo <beanhuo@micron.com>,
Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
Date: Tue, 29 Sep 2026 15:22:17 +0200 [thread overview]
Message-ID: <898ed3e7-1636-4f17-bb5d-fcb9f6de1d24@kernel.org> (raw)
In-Reply-To: <20260929031352.1355691-1-stanleyjhu@google.com>
On 2026/09/29 5:13, Stanley Jhu wrote:
> A merge conflict resolution dropped SCMD_FAILURE_ASCQ_ANY from the
> retry added by commit a8a34238e5e6 ("scsi: ufs: rpmb: Retry power-on
> UNIT ATTENTION on the RPMB WLUN"), so only 29h/00h is retried, not
> the other 29h ASCQs.
>
> Link: https://lore.kernel.org/linux-scsi/yq1jyo4onqe.fsf@mail.kernel.org/
> Signed-off-by: Stanley Jhu <stanleyjhu@google.com>
> ---
> Tested in QEMU on top of "scsi: ufs: rpmb: Drop the unregistered
> ufs_rpmb bus" (RPMB v5 3/3).
>
> drivers/ufs/core/ufs-rpmb.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/ufs/core/ufs-rpmb.c b/drivers/ufs/core/ufs-rpmb.c
> index 50ef63afd528..7b9b59c9e968 100644
> --- a/drivers/ufs/core/ufs-rpmb.c
> +++ b/drivers/ufs/core/ufs-rpmb.c
> @@ -47,7 +47,8 @@ static int ufs_sec_submit(struct ufs_hba *hba, u16 spsp, void *buffer, size_t le
> {
> .sense_key = UNIT_ATTENTION,
> .sense_code =
> - POWER_ON_RESET_OR_BUS_DEVICE_RESET_OCCURRED,
> + POWER_ON_RESET_OR_BUS_DEVICE_RESET_OCCURRED |
> + SCMD_FAILURE_ASCQ_ANY,
While that leads to the correct value, I think it is better to use:
.sense_code =
scsi_sense_code(ASC_POWER_ON_RESET_OR_BUS_DEVICE_RESET_OCCURRED,
SCMD_FAILURE_ASCQ_ANY),
> .allowed = UFS_RPMB_UA_RETRIES,
> .result = SAM_STAT_CHECK_CONDITION,
> },
>
> base-commit: f09d2c7485b32adb82336d0d748935c8237a649e
--
Damien Le Moal
Western Digital Research
next prev parent reply other threads:[~2026-09-29 13:22 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-29 3:13 Stanley Jhu
2026-09-29 13:22 ` Damien Le Moal [this message]
2026-09-29 14:08 ` [PATCH v2] " Stanley Jhu
2026-09-30 7:46 ` Damien Le Moal
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=898ed3e7-1636-4f17-bb5d-fcb9f6de1d24@kernel.org \
--to=dlemoal@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=alim.akhtar@samsung.com \
--cc=avri.altman@wdc.com \
--cc=beanhuo@micron.com \
--cc=bvanassche@acm.org \
--cc=jorge.ramirez@oss.qualcomm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.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®