Skip to content

Commit f61eb12

Browse files
sreekanthbrcmmartinkpetersen
authored andcommitted
scsi: mpt3sas: Fail reset operation if config request timed out
As part of controller reset operation the driver issues a config request command. If this command gets times out, then fail the controller reset operation instead of retrying it. Link: https://lore.kernel.org/r/20220405120637.20528-1-sreekanth.reddy@broadcom.com Signed-off-by: Sreekanth Reddy <sreekanth.reddy@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 75f5a0c commit f61eb12

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

drivers/scsi/mpt3sas/mpt3sas_config.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -394,10 +394,13 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
394394
retry_count++;
395395
if (ioc->config_cmds.smid == smid)
396396
mpt3sas_base_free_smid(ioc, smid);
397-
if ((ioc->shost_recovery) || (ioc->config_cmds.status &
398-
MPT3_CMD_RESET) || ioc->pci_error_recovery)
397+
if (ioc->config_cmds.status & MPT3_CMD_RESET)
399398
goto retry_config;
400-
issue_host_reset = 1;
399+
if (ioc->shost_recovery || ioc->pci_error_recovery) {
400+
issue_host_reset = 0;
401+
r = -EFAULT;
402+
} else
403+
issue_host_reset = 1;
401404
goto free_mem;
402405
}
403406

0 commit comments

Comments
 (0)