linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bart Van Assche <bvanassche@acm.org>
To: "Ewan D. Milne" <emilne@redhat.com>, linux-scsi@vger.kernel.org
Cc: michael.christie@oracle.com, dgilbert@interlog.com, dlemoal@kernel.org
Subject: Re: [PATCH v3 2/8] scsi: sd: Explicitly specify .ascq = SCMD_FAILURE_ASCQ_ANY for ASC 0x3a
Date: Tue, 19 Aug 2025 12:34:44 -0700	[thread overview]
Message-ID: <a0049c01-3bae-46bd-a5b9-57dc9c537ae9@acm.org> (raw)
In-Reply-To: <20250815211525.1524254-3-emilne@redhat.com>

On 8/15/25 2:15 PM, Ewan D. Milne wrote:
> This makes the handling in read_capacity_10() consistent with other
> cases, e.g. sd_spinup_disk().  Omitting .ascq in scsi_failure did not
> result in wildcard matching, it only handled ASCQ 0x00.  This patch
> changes the retry behavior, we no longer retry 3 times on ASC 0x3a
> if a nonzero ASCQ is ever returned.
> 
> Signed-off-by: Ewan D. Milne <emilne@redhat.com>
> ---
>   drivers/scsi/sd.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
> index 78f5903cc8d0..e3b802b26f0e 100644
> --- a/drivers/scsi/sd.c
> +++ b/drivers/scsi/sd.c
> @@ -2729,11 +2729,13 @@ static int read_capacity_10(struct scsi_disk *sdkp, struct scsi_device *sdp,
>   		{
>   			.sense = UNIT_ATTENTION,
>   			.asc = 0x3A,
> +			.ascq = SCMD_FAILURE_ASCQ_ANY,
>   			.result = SAM_STAT_CHECK_CONDITION,
>   		},
>   		{
>   			.sense = NOT_READY,
>   			.asc = 0x3A,
> +			.ascq = SCMD_FAILURE_ASCQ_ANY,
>   			.result = SAM_STAT_CHECK_CONDITION,
>   		},
>   		 /* Device reset might occur several times so retry a lot */

If this patch is reposted, please consider shortening the title of this 
patch to e.g. "Do not retry ASC 0x3a". Anyway:

Reviewed-by: Bart Van Assche <bvanassche@acm.org>

  parent reply	other threads:[~2025-08-19 19:34 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-08-15 21:15 [PATCH v3 0/8] Retry READ CAPACITY(10)/(16) with good status but no data Ewan D. Milne
2025-08-15 21:15 ` [PATCH v3 1/8] scsi: Explicitly specify .ascq = 0x00 for ASC 0x28/0x29 scsi_failures Ewan D. Milne
2025-08-16  0:36   ` Damien Le Moal
2025-08-19 19:28   ` Bart Van Assche
2025-08-20 11:39   ` Hannes Reinecke
2025-08-15 21:15 ` [PATCH v3 2/8] scsi: sd: Explicitly specify .ascq = SCMD_FAILURE_ASCQ_ANY for ASC 0x3a Ewan D. Milne
2025-08-16  0:37   ` Damien Le Moal
2025-08-19 19:34   ` Bart Van Assche [this message]
2025-08-20 11:39   ` Hannes Reinecke
2025-08-15 21:15 ` [PATCH v3 3/8] scsi: sd: Have scsi-ml retry read_capacity_16 errors Ewan D. Milne
2025-08-16  0:42   ` Damien Le Moal
2025-08-19 19:37   ` Bart Van Assche
2025-08-20 11:40   ` Hannes Reinecke
2025-08-15 21:15 ` [PATCH v3 4/8] scsi: sd: Avoid passing potentially uninitialized "sense_valid" to read_capacity_error() Ewan D. Milne
2025-08-16  0:44   ` Damien Le Moal
2025-08-19 19:38   ` Bart Van Assche
2025-08-20 11:41   ` Hannes Reinecke
2025-08-15 21:15 ` [PATCH v3 5/8] scsi: sd: Remove checks for -EOVERFLOW in sd_read_capacity() Ewan D. Milne
2025-08-16  0:45   ` Damien Le Moal
2025-08-19 19:38   ` Bart Van Assche
2025-08-20 11:41   ` Hannes Reinecke
2025-08-15 21:15 ` [PATCH v3 6/8] scsi: sd: Check for and retry in case of READ_CAPCITY(10)/(16) returning no data Ewan D. Milne
2025-08-16  0:53   ` Damien Le Moal
2025-08-19 19:40     ` Bart Van Assche
2025-08-20 11:44   ` Hannes Reinecke
2025-08-15 21:15 ` [PATCH v3 7/8] scsi: Simplify nested if conditional in scsi_probe_lun() Ewan D. Milne
2025-08-16  0:56   ` Damien Le Moal
2025-08-20 11:44   ` Hannes Reinecke
2025-08-15 21:15 ` [PATCH v3 8/8] scsi: scsi_debug: Add option to suppress returned data but return good status Ewan D. Milne
2025-08-16  0:59   ` Damien Le Moal
2025-08-20 11:45     ` Hannes Reinecke

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=a0049c01-3bae-46bd-a5b9-57dc9c537ae9@acm.org \
    --to=bvanassche@acm.org \
    --cc=dgilbert@interlog.com \
    --cc=dlemoal@kernel.org \
    --cc=emilne@redhat.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=michael.christie@oracle.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;
as well as URLs for NNTP newsgroup(s).