summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/mpt3sas
diff options
context:
space:
mode:
authorRanjan Kumar <ranjan.kumar@broadcom.com>2024-02-21 08:17:24 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2024-02-27 02:42:50 +0100
commitee0017c3ed8a8abfa4d40e42f908fb38c31e7515 (patch)
treecdd0b4921f1beb214f07c924ac666131079d956c /drivers/scsi/mpt3sas
parentscsi: mpi3mr: Reduce stack usage in mpi3mr_refresh_sas_ports() (diff)
downloadlinux-ee0017c3ed8a8abfa4d40e42f908fb38c31e7515.tar.xz
linux-ee0017c3ed8a8abfa4d40e42f908fb38c31e7515.zip
scsi: mpt3sas: Prevent sending diag_reset when the controller is ready
If the driver detects that the controller is not ready before sending the first IOC facts command, it will wait for a maximum of 10 seconds for it to become ready. However, even if the controller becomes ready within 10 seconds, the driver will still issue a diagnostic reset. Modify the driver to avoid sending a diag reset if the controller becomes ready within the 10-second wait time. Signed-off-by: Ranjan Kumar <ranjan.kumar@broadcom.com> Link: https://lore.kernel.org/r/20240221071724.14986-1-ranjan.kumar@broadcom.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/mpt3sas')
-rw-r--r--drivers/scsi/mpt3sas/mpt3sas_base.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index 8761bc58d965..b8120ca93c79 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -7378,7 +7378,9 @@ _base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout)
return -EFAULT;
}
- issue_diag_reset:
+ return 0;
+
+issue_diag_reset:
rc = _base_diag_reset(ioc);
return rc;
}