scsi: aacraid: Improve code readability
Subsystems (2)
PATCH v2 1/1 scsi: aacraid: Improve code readability
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.
---
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(-)
drivers/scsi/aacraid/linit.c +1 -1
@@ -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 ; }/**
Quoted 9 lines · Bart Van Assche
aac_queuecommand()is ascsi_host_template.queuecommand()implementation. Any value returned by this function other than one of the following values is translated intoSCSI_MLQUEUE_HOST_BUSY:
* 0
*SCSI_MLQUEUE_HOST_BUSY
*SCSI_MLQUEUE_DEVICE_BUSY
*SCSI_MLQUEUE_EH_RETRY
*SCSI_MLQUEUE_TARGET_BUSY
Quoted 7 lines
Improve readability of
aac_queuecommand()by returningSCSI_MLQUEUE_HOST_BUSYinstead of FAILED.Cc Gilbert Wu <[email protected]>Cc Sagar Biradar <[email protected]>Cc John Garry <[email protected]>Signed-off-by Bart Van Assche <[email protected]>
Quoted 21 lines
---
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(-)drivers/scsi/aacraid/linit.c +1
-1@@ -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 ; }/**
Martin K. Petersen
AppliedBart,
Quoted 3 lines
aac_queuecommand()is ascsi_host_template.queuecommand()implementation. Any value returned by this function other than one of the following values is translated intoSCSI_MLQUEUE_HOST_BUSY:
Applied to 6.19/scsi-staging, thanks!
Signature · 1 line
Martin K. Petersen
Martin K. Petersen
AppliedQuoted 10 lines · Bart Van Assche
aac_queuecommand()is ascsi_host_template.queuecommand()implementation. Any value returned by this function other than one of the following values is translated intoSCSI_MLQUEUE_HOST_BUSY:
* 0
*SCSI_MLQUEUE_HOST_BUSY
*SCSI_MLQUEUE_DEVICE_BUSY
*SCSI_MLQUEUE_EH_RETRY
*SCSI_MLQUEUE_TARGET_BUSY[...]
Applied to 6.19/scsi-queue, thanks!
[1/1] scsi: aacraid: Improve code readability
https://git.kernel.org/mkp/scsi/c/e414748b7e83
Signature · 1 line
Martin K. Petersen