From a784911099b1602db1074377dd2ac9c76296b5e3 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Thu, 15 Jan 2026 13:03:39 -0800 Subject: [PATCH] scsi: megaraid_sas: Return SCSI_MLQUEUE_HOST_BUSY instead of 1 .queuecommand() implementations are expected to return a SCSI_MLQUEUE_* value. Return SCSI_MLQUEUE_HOST_BUSY from megaraid_queue_command_lck() instead of 1. This patch doesn't change any functionality since scsi_dispatch_cmd() converts all return values other than SCSI_MLQUEUE_* into SCSI_MLQUEUE_HOST_BUSY. Cc: Kashyap Desai Cc: Sumit Saxena Cc: Shivasharan S Cc: Chandrakanth patil Cc: megaraidlinux.pdl@broadcom.com Signed-off-by: Bart Van Assche Link: https://patch.msgid.link/20260115210357.2501991-4-bvanassche@acm.org Signed-off-by: Martin K. Petersen --- drivers/scsi/megaraid/megaraid_mbox.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/megaraid/megaraid_mbox.c b/drivers/scsi/megaraid/megaraid_mbox.c index b610cad83321d..722d3b5acea36 100644 --- a/drivers/scsi/megaraid/megaraid_mbox.c +++ b/drivers/scsi/megaraid/megaraid_mbox.c @@ -1516,7 +1516,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) if (!(scb = megaraid_alloc_scb(adapter, scp))) { scp->result = (DID_ERROR << 16); - *busy = 1; + *busy = SCSI_MLQUEUE_HOST_BUSY; return NULL; } @@ -1599,7 +1599,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) /* Allocate a SCB and initialize passthru */ if (!(scb = megaraid_alloc_scb(adapter, scp))) { scp->result = (DID_ERROR << 16); - *busy = 1; + *busy = SCSI_MLQUEUE_HOST_BUSY; return NULL; } @@ -1644,7 +1644,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) */ if (!(scb = megaraid_alloc_scb(adapter, scp))) { scp->result = (DID_ERROR << 16); - *busy = 1; + *busy = SCSI_MLQUEUE_HOST_BUSY; return NULL; } ccb = (mbox_ccb_t *)scb->ccb; @@ -1740,7 +1740,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) */ if (!(scb = megaraid_alloc_scb(adapter, scp))) { scp->result = (DID_ERROR << 16); - *busy = 1; + *busy = SCSI_MLQUEUE_HOST_BUSY; return NULL; } @@ -1808,7 +1808,7 @@ megaraid_mbox_build_cmd(adapter_t *adapter, struct scsi_cmnd *scp, int *busy) // Allocate a SCB and initialize passthru if (!(scb = megaraid_alloc_scb(adapter, scp))) { scp->result = (DID_ERROR << 16); - *busy = 1; + *busy = SCSI_MLQUEUE_HOST_BUSY; return NULL; } -- 2.47.3