Skip to content

Commit ee0017c

Browse files
Ranjan Kumarmartinkpetersen
authored andcommitted
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>
1 parent 5cc2da0 commit ee0017c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

drivers/scsi/mpt3sas/mpt3sas_base.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7378,7 +7378,9 @@ _base_wait_for_iocstate(struct MPT3SAS_ADAPTER *ioc, int timeout)
73787378
return -EFAULT;
73797379
}
73807380

7381-
issue_diag_reset:
7381+
return 0;
7382+
7383+
issue_diag_reset:
73827384
rc = _base_diag_reset(ioc);
73837385
return rc;
73847386
}

0 commit comments

Comments
 (0)