diff options
author | Sreekanth Reddy <Sreekanth.Reddy@lsi.com> | 2013-06-28 18:21:19 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-07-09 03:39:03 -0400 |
commit | b453ff84de6caf3ad3a988da8444c13b71e3f507 (patch) | |
tree | 5cd8322595cd3935c9f49db405507fb09f061d47 | |
parent | 48e3b9855d6e1b408ec4a808f243e858a78f4482 (diff) |
[SCSI] mpt3sas: Updated the Hardware timing requirements
Hardware timing requirements is updated in order to comply with firmware
requirement.
Signed-off-by: Sreekanth Reddy <Sreekanth.Reddy@lsi.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r-- | drivers/scsi/mpt3sas/mpt3sas_base.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c index 673a1b53a23f..5dc280c75325 100644 --- a/drivers/scsi/mpt3sas/mpt3sas_base.c +++ b/drivers/scsi/mpt3sas/mpt3sas_base.c | |||
@@ -4090,11 +4090,15 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc, int sleep_flag) | |||
4090 | writel(host_diagnostic | MPI2_DIAG_RESET_ADAPTER, | 4090 | writel(host_diagnostic | MPI2_DIAG_RESET_ADAPTER, |
4091 | &ioc->chip->HostDiagnostic); | 4091 | &ioc->chip->HostDiagnostic); |
4092 | 4092 | ||
4093 | /* don't access any registers for 50 milliseconds */ | 4093 | /*This delay allows the chip PCIe hardware time to finish reset tasks*/ |
4094 | msleep(50); | 4094 | if (sleep_flag == CAN_SLEEP) |
4095 | msleep(MPI2_HARD_RESET_PCIE_FIRST_READ_DELAY_MICRO_SEC/1000); | ||
4096 | else | ||
4097 | mdelay(MPI2_HARD_RESET_PCIE_FIRST_READ_DELAY_MICRO_SEC/1000); | ||
4095 | 4098 | ||
4096 | /* 300 second max wait */ | 4099 | /* Approximately 300 second max wait */ |
4097 | for (count = 0; count < 3000000 ; count++) { | 4100 | for (count = 0; count < (300000000 / |
4101 | MPI2_HARD_RESET_PCIE_SECOND_READ_DELAY_MICRO_SEC); count++) { | ||
4098 | 4102 | ||
4099 | host_diagnostic = readl(&ioc->chip->HostDiagnostic); | 4103 | host_diagnostic = readl(&ioc->chip->HostDiagnostic); |
4100 | 4104 | ||
@@ -4103,11 +4107,13 @@ _base_diag_reset(struct MPT3SAS_ADAPTER *ioc, int sleep_flag) | |||
4103 | if (!(host_diagnostic & MPI2_DIAG_RESET_ADAPTER)) | 4107 | if (!(host_diagnostic & MPI2_DIAG_RESET_ADAPTER)) |
4104 | break; | 4108 | break; |
4105 | 4109 | ||
4106 | /* wait 1 msec */ | 4110 | /* Wait to pass the second read delay window */ |
4107 | if (sleep_flag == CAN_SLEEP) | 4111 | if (sleep_flag == CAN_SLEEP) |
4108 | usleep_range(1000, 1500); | 4112 | msleep(MPI2_HARD_RESET_PCIE_SECOND_READ_DELAY_MICRO_SEC |
4113 | / 1000); | ||
4109 | else | 4114 | else |
4110 | mdelay(1); | 4115 | mdelay(MPI2_HARD_RESET_PCIE_SECOND_READ_DELAY_MICRO_SEC |
4116 | / 1000); | ||
4111 | } | 4117 | } |
4112 | 4118 | ||
4113 | if (host_diagnostic & MPI2_DIAG_HCB_MODE) { | 4119 | if (host_diagnostic & MPI2_DIAG_HCB_MODE) { |