scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
Subsystems (2)
PATCH 1/1 scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
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.
---
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(-)
drivers/ufs/core/ufs-rpmb.c +2 -1
@@ -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
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog
Quoted 19 lines · Stanley Jhu
A merge conflict resolution dropped
SCMD_FAILURE_ASCQ_ANYfrom the retry added by commita8a34238e5e6("scsi: ufs: rpmb: Retry power-on UNIT ATTENTION on the RPMB WLUN"), so only 29h/00h is retried, not the other 29h ASCQs.Signed-off-by Stanley Jhu <[email protected]>---
Tested in QEMU on top of "scsi: ufs: rpmb: Drop the unregisteredufs_rpmbbus" (RPMB v5 3/3).drivers/ufs/core/ufs-rpmb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/ufs/core/ufs-rpmb.c +0
-0
drivers/ufs/core/ufs-rpmb.c static int ufs_sec_submit(struct ufs_hba *hba, u16 spsp, void *buffer, size_t le · line 51
Quoted 6 lines
drivers/ufs/core/ufs-rpmb.c +2
-1@@ -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),
Quoted 5 lines
drivers/ufs/core/ufs-rpmb.c +0
-0.allowed = UFS_RPMB_UA_RETRIES, .result = SAM_STAT_CHECK_CONDITION, },base-commit:
f09d2c7485b32adb82336d0d748935c8237a649e
Signature · 2 lines
Damien Le Moal Western Digital Research
PATCH v2 1/1 scsi: ufs: rpmb: Fix power-on UNIT ATTENTION retry
In reply to Stanley JhuA 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.
---
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(-)
drivers/ufs/core/ufs-rpmb.c +2 -1
@@ -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
Signature · 1 line
2.56.0.rc1.315.gc6ed9934b7-goog
Quoted 7 lines · Stanley Jhu
A merge conflict resolution dropped
SCMD_FAILURE_ASCQ_ANYfrom the retry added by commita8a34238e5e6("scsi: ufs: rpmb: Retry power-on UNIT ATTENTION on the RPMB WLUN"), so only 29h/00h is retried, not the other 29h ASCQs.
Signature · 2 lines
Damien Le Moal Western Digital Research
Stanley,
Quoted 4 lines
A merge conflict resolution dropped
SCMD_FAILURE_ASCQ_ANYfrom the retry added by commita8a34238e5e6("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!
Signature · 1 line
Martin K. Petersen
Quoted 4 lines · Stanley Jhu
A merge conflict resolution dropped
SCMD_FAILURE_ASCQ_ANYfrom the retry added by commita8a34238e5e6("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
Signature · 1 line
Martin K. Petersen