Linux SCSI subsystem development
 help / color / mirror / Atom feed
From: John Garry <john.g.garry@oracle.com>
To: Bart Van Assche <bvanassche@acm.org>,
	"Martin K . Petersen" <martin.petersen@oracle.com>
Cc: linux-scsi@vger.kernel.org, Gilbert Wu <gilbert.wu@microchip.com>,
	Sagar Biradar <Sagar.Biradar@microchip.com>,
	Adaptec OEM Raid Solutions <aacraid@microsemi.com>,
	"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
Subject: Re: [PATCH v2] scsi: aacraid: Improve code readability
Date: Wed, 22 Oct 2025 09:00:33 +0100	[thread overview]
Message-ID: <e51a6615-91fe-48d7-995a-7fb84007ff5d@oracle.com> (raw)
In-Reply-To: <20251021201743.3539900-1-bvanassche@acm.org>

On 21/10/2025 21:17, Bart Van Assche wrote:
> aac_queuecommand() is a scsi_host_template.queuecommand() implementation.
> Any value returned by this function other than one of the following values
> is translated into SCSI_MLQUEUE_HOST_BUSY:
> * 0
> * SCSI_MLQUEUE_HOST_BUSY
> * SCSI_MLQUEUE_DEVICE_BUSY
> * SCSI_MLQUEUE_EH_RETRY
> * SCSI_MLQUEUE_TARGET_BUSY
> 
> Improve readability of aac_queuecommand() by returning
> SCSI_MLQUEUE_HOST_BUSY instead of FAILED.
> 
> Cc: Gilbert Wu <gilbert.wu@microchip.com>
> Cc: Sagar Biradar <Sagar.Biradar@microchip.com>
> Cc: John Garry <john.g.garry@oracle.com>
> Signed-off-by: Bart Van Assche <bvanassche@acm.org>

Reviewed-by: John Garry <john.g.garry@oracle.com>

> ---
> 
> Changes compared to v1: instead of failing a SCSI command if aac_scsi_cmd()
>    returns a value that is not zero, let the SCSI core retry the command.
> 
>   drivers/scsi/aacraid/linit.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
> index ea66196ef7c7..82c6e7c7cdaf 100644
> --- a/drivers/scsi/aacraid/linit.c
> +++ b/drivers/scsi/aacraid/linit.c
> @@ -242,7 +242,7 @@ static int aac_queuecommand(struct Scsi_Host *shost,
>   {
>   	aac_priv(cmd)->owner = AAC_OWNER_LOWLEVEL;
>   
> -	return aac_scsi_cmd(cmd) ? FAILED : 0;
> +	return aac_scsi_cmd(cmd) ? SCSI_MLQUEUE_HOST_BUSY : 0;
>   }
>   
>   /**


  reply	other threads:[~2025-10-22  8:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-21 20:17 [PATCH v2] scsi: aacraid: Improve code readability Bart Van Assche
2025-10-22  8:00 ` John Garry [this message]
2025-10-24  3:01 ` Martin K. Petersen
2025-10-30  3:33 ` Martin K. Petersen

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=e51a6615-91fe-48d7-995a-7fb84007ff5d@oracle.com \
    --to=john.g.garry@oracle.com \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=Sagar.Biradar@microchip.com \
    --cc=aacraid@microsemi.com \
    --cc=bvanassche@acm.org \
    --cc=gilbert.wu@microchip.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@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