mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bean Huo <beanhuo@iokpp.de>
To: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>,
	 James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com,  alim.akhtar@samsung.com,
	avri.altman@wdc.com, bvanassche@acm.org,  beanhuo@micron.com,
	can.guo@oss.qualcomm.com
Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
	 op-tee@lists.trustedfirmware.org, jenswi@kernel.org,
	sumit.garg@oss.qualcomm.com
Subject: Re: [PATCH v3 1/2] ufs: rpmb: retry power-on UNIT ATTENTION on the RPMB WLUN
Date: Wed, 26 Aug 2026 22:59:07 +0200	[thread overview]
Message-ID: <6ae9f526476cfce73c118c946f005753dd2d00b0.camel@iokpp.de> (raw)
In-Reply-To: <20260821150612.3944782-2-jorge.ramirez@oss.qualcomm.com>

On Fri, 2026-08-21 at 17:06 +0200, Jorge Ramirez-Ortiz wrote:
> diff --git a/drivers/ufs/core/ufs-rpmb.c b/drivers/ufs/core/ufs-rpmb.c
> index ffad049872b9..d0c7ea7a36f4 100644
> --- a/drivers/ufs/core/ufs-rpmb.c
> +++ b/drivers/ufs/core/ufs-rpmb.c
> @@ -40,6 +40,23 @@ struct ufs_rpmb_dev {
>  static int ufs_sec_submit(struct ufs_hba *hba, u16 spsp, void *buffer, size_t
> len, bool send)
>  {
>         struct scsi_device *sdev = hba->ufs_rpmb_wlun;
> +       /* Retry the power-on UNIT ATTENTION (ASC 0x29); the SCSI core does
> not. */
> +       struct scsi_failure failure_defs[] = {
> +               {
> +                       .sense = UNIT_ATTENTION,
> +                       .asc = 0x29,
> +                       .ascq = SCMD_FAILURE_ASCQ_ANY,
> +                       .allowed = 3,


.allowed = 3 is a fine value, I checked ch.c +197 uses 3, and sd.c uses 5, so no
complaint about the number itself. But the other asc = 0x29 users give it a
meaningful name:

for example, ses.c has SES_RETRIES and sd.c has READ_CAPACITY_RETRIES_ON_RESET.
a UFS_RPMB_UA_RETRIES (or other) would match that meaningful.


others look good to me.

Kind regards,
Bean


  reply	other threads:[~2026-08-26 20:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-21 15:06 [PATCH v3 0/2] ufs: rpmb: make RPMB usable with OP-TEE key derivation Jorge Ramirez-Ortiz
2026-08-21 15:06 ` [PATCH v3 1/2] ufs: rpmb: retry power-on UNIT ATTENTION on the RPMB WLUN Jorge Ramirez-Ortiz
2026-08-26 20:59   ` Bean Huo [this message]
2026-08-21 15:06 ` [PATCH v3 2/2] ufs: rpmb: use a fixed-length RPMB dev_id Jorge Ramirez-Ortiz
2026-08-26  6:38   ` Jorge Ramirez
2026-08-26 14:32   ` Bean Huo

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=6ae9f526476cfce73c118c946f005753dd2d00b0.camel@iokpp.de \
    --to=beanhuo@iokpp.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=alim.akhtar@samsung.com \
    --cc=avri.altman@wdc.com \
    --cc=beanhuo@micron.com \
    --cc=bvanassche@acm.org \
    --cc=can.guo@oss.qualcomm.com \
    --cc=jenswi@kernel.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=op-tee@lists.trustedfirmware.org \
    --cc=sumit.garg@oss.qualcomm.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®