* [PATCH] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
@ 2026-09-29 3:13 Stanley Jhu
2026-09-29 13:22 ` Damien Le Moal
2026-09-29 14:08 ` [PATCH v2] " Stanley Jhu
0 siblings, 2 replies; 6+ messages in thread
From: Stanley Jhu @ 2026-09-29 3:13 UTC (permalink / raw)
To: Martin K . Petersen
Cc: James E . J . Bottomley, Alim Akhtar, Avri Altman,
Bart Van Assche, Bean Huo, Damien Le Moal, Jorge Ramirez-Ortiz,
linux-scsi, linux-kernel, Stanley Jhu
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,
.allowed = UFS_RPMB_UA_RETRIES,
.result = SAM_STAT_CHECK_CONDITION,
},
base-commit: f09d2c7485b32adb82336d0d748935c8237a649e
--
2.56.0.rc1.315.gc6ed9934b7-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
2026-09-29 3:13 [PATCH] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry Stanley Jhu
@ 2026-09-29 13:22 ` Damien Le Moal
2026-09-29 14:08 ` [PATCH v2] " Stanley Jhu
1 sibling, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2026-09-29 13:22 UTC (permalink / raw)
To: Stanley Jhu, Martin K . Petersen
Cc: James E . J . Bottomley, Alim Akhtar, Avri Altman,
Bart Van Assche, Bean Huo, Jorge Ramirez-Ortiz, linux-scsi,
linux-kernel
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
^ permalink raw reply [flat|nested] 6+ messages in thread* [PATCH v2] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
2026-09-29 3:13 [PATCH] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry Stanley Jhu
2026-09-29 13:22 ` Damien Le Moal
@ 2026-09-29 14:08 ` Stanley Jhu
2026-09-30 7:46 ` Damien Le Moal
` (2 more replies)
1 sibling, 3 replies; 6+ messages in thread
From: Stanley Jhu @ 2026-09-29 14:08 UTC (permalink / raw)
To: Martin K . Petersen
Cc: James E . J . Bottomley, Alim Akhtar, Avri Altman,
Bart Van Assche, Bean Huo, Damien Le Moal, Jorge Ramirez-Ortiz,
linux-scsi, linux-kernel
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>
---
v2: Use scsi_sense_code() (Damien)
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..65f2d71cf073 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,
+ 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
--
2.56.0.rc1.315.gc6ed9934b7-goog
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH v2] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
2026-09-29 14:08 ` [PATCH v2] " Stanley Jhu
@ 2026-09-30 7:46 ` Damien Le Moal
2026-10-06 2:09 ` Martin K. Petersen
2026-10-14 3:56 ` Martin K. Petersen (Oracle)
2 siblings, 0 replies; 6+ messages in thread
From: Damien Le Moal @ 2026-09-30 7:46 UTC (permalink / raw)
To: Stanley Jhu, Martin K . Petersen
Cc: James E . J . Bottomley, Alim Akhtar, Avri Altman,
Bart Van Assche, Bean Huo, Jorge Ramirez-Ortiz, linux-scsi,
linux-kernel
On 2026/09/29 16:08, 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>
Reviewed-by: Damien Le Moal <dlemoal@kernel.org>
--
Damien Le Moal
Western Digital Research
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
2026-09-29 14:08 ` [PATCH v2] " Stanley Jhu
2026-09-30 7:46 ` Damien Le Moal
@ 2026-10-06 2:09 ` Martin K. Petersen
2026-10-14 3:56 ` Martin K. Petersen (Oracle)
2 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen @ 2026-10-06 2:09 UTC (permalink / raw)
To: Stanley Jhu
Cc: Martin K . Petersen, James E . J . Bottomley, Alim Akhtar,
Avri Altman, Bart Van Assche, Bean Huo, Damien Le Moal,
Jorge Ramirez-Ortiz, linux-scsi, linux-kernel
Stanley,
> 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.
Applied to 7.4/scsi-staging, thanks!
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH v2] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
2026-09-29 14:08 ` [PATCH v2] " Stanley Jhu
2026-09-30 7:46 ` Damien Le Moal
2026-10-06 2:09 ` Martin K. Petersen
@ 2026-10-14 3:56 ` Martin K. Petersen (Oracle)
2 siblings, 0 replies; 6+ messages in thread
From: Martin K. Petersen (Oracle) @ 2026-10-14 3:56 UTC (permalink / raw)
To: Martin K. Petersen, Stanley Jhu
Cc: James E . J . Bottomley, Alim Akhtar, Avri Altman,
Bart Van Assche, Bean Huo, Damien Le Moal, Jorge Ramirez-Ortiz,
linux-scsi, linux-kernel
On Tue, 29 Sep 2026 22:08:06 +0800, 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.
Applied to 7.4/scsi-queue, thanks!
[1/1] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
https://git.kernel.org/mkp/scsi/c/2f4880c22e83
--
Martin K. Petersen
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-10-14 3:57 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-29 3:13 [PATCH] scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry Stanley Jhu
2026-09-29 13:22 ` Damien Le Moal
2026-09-29 14:08 ` [PATCH v2] " Stanley Jhu
2026-09-30 7:46 ` Damien Le Moal
2026-10-06 2:09 ` Martin K. Petersen
2026-10-14 3:56 ` Martin K. Petersen (Oracle)
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.