On 9/29/26 05:29, Stanley Jhu wrote:
On Fri, Sep 18, 2026 at 10:06:35PM +0200, Jorge Ramirez-Ortiz wrote:
+ /*
+ * A power-on or reset UNIT ATTENTION is a transient
+ * condition the device clears once it has been reported,
+ * so retry it. Any other failure is final: stop and
+ * report it.
+ */
+ if (ufs_rpmb_sense_key(&pccb) != SENSE_UNIT_ATTENTION)
+ break;
This retries on any UNIT ATTENTION, e.g. 2Ah/01h (MODE PARAMETERS
CHANGED), not only the power-on/reset one the comment describes.
Would it be cleaner to also check for ASC 29h, as the Linux driver
does? Commit a8a34238e5e6 ("scsi: ufs: rpmb: Retry power-on UNIT
ATTENTION on the RPMB WLUN") in the SCSI tree retries on ASC 29h with
any ASCQ.
Probably, Jorge can you look at this and check that we only retry with ASC 29h ?
Neil