summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorRanjan Kumar <ranjan.kumar@broadcom.com>2024-11-10 18:33:40 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2024-12-04 18:04:44 +0100
commit3f5eb062e8aa335643181c480e6c590c6cedfd22 (patch)
treee426c8213457a04197fa8be9c09a210dd7e4598f /drivers/scsi
parentMerge branch '6.13/scsi-queue' into 6.13/scsi-fixes (diff)
downloadlinux-3f5eb062e8aa335643181c480e6c590c6cedfd22.tar.xz
linux-3f5eb062e8aa335643181c480e6c590c6cedfd22.zip
scsi: mpt3sas: Diag-Reset when Doorbell-In-Use bit is set during driver load time
Issue a Diag-Reset when the "Doorbell-In-Use" bit is set during the driver load/initialization. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20241110173341.11595-2-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index ed5046593fda..16ac2267c71e 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -7041,11 +7041,12 @@ _base_handshake_req_reply_wait(struct MPT3SAS_ADAPTER *ioc, int request_bytes,
int i;
u8 failed;
__le32 *mfp;
+ int ret_val;
/* make sure doorbell is not in use */
if ((ioc->base_readl_ext_retry(&ioc->chip->Doorbell) & MPI2_DOORBELL_USED)) {
ioc_err(ioc, "doorbell is in use (line=%d)\n", __LINE__);
- return -EFAULT;
+ goto doorbell_diag_reset;
}
/* clear pending doorbell interrupts from previous state changes */
@@ -7135,6 +7136,10 @@ _base_handshake_req_reply_wait(struct MPT3SAS_ADAPTER *ioc, int request_bytes,
le32_to_cpu(mfp[i]));
}
return 0;
+
+doorbell_diag_reset:
+ ret_val = _base_diag_reset(ioc);
+ return ret_val;
}
/**