Commit f61eb121 authored by Sreekanth Reddy's avatar Sreekanth Reddy Committed by Martin K. Petersen
Browse files

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: default avatarSreekanth Reddy <sreekanth.reddy@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 75f5a0c4
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -394,9 +394,12 @@ _config_request(struct MPT3SAS_ADAPTER *ioc, Mpi2ConfigRequest_t
		retry_count++;
		if (ioc->config_cmds.smid == smid)
			mpt3sas_base_free_smid(ioc, smid);
		if ((ioc->shost_recovery) || (ioc->config_cmds.status &
		    MPT3_CMD_RESET) || ioc->pci_error_recovery)
		if (ioc->config_cmds.status & MPT3_CMD_RESET)
			goto retry_config;
		if (ioc->shost_recovery || ioc->pci_error_recovery) {
			issue_host_reset = 0;
			r = -EFAULT;
		} else
			issue_host_reset = 1;
		goto free_mem;
	}