Merge "cnss2: Increase QMI and MHI timeouts for emulation builds"

This commit is contained in:
qctecmdr 2021-02-10 21:04:14 -08:00 • committed by Gerrit - the friendly Code Review server
commit d6e5dbfa66
2 changed files with 7 additions and 5 deletions

View file

@ -36,11 +36,13 @@
#define CNSS_QUIRKS_DEFAULT 0
#ifdef CONFIG_CNSS_EMULATION
#define CNSS_MHI_TIMEOUT_DEFAULT 90000
#define CNSS_MHI_M2_TIMEOUT_DEFAULT 2000
#define CNSS_QMI_TIMEOUT_DEFAULT 90000
#else
#define CNSS_MHI_TIMEOUT_DEFAULT 0
#endif
#define CNSS_MHI_M2_TIMEOUT_DEFAULT 25
#define CNSS_QMI_TIMEOUT_DEFAULT 10000
#endif
#define CNSS_BDF_TYPE_DEFAULT CNSS_BDF_ELF
#define CNSS_TIME_SYNC_PERIOD_DEFAULT 900000

View file

@ -75,7 +75,6 @@ static DEFINE_SPINLOCK(time_sync_lock);
#define FORCE_WAKE_DELAY_MIN_US 4000
#define FORCE_WAKE_DELAY_MAX_US 6000
#define FORCE_WAKE_DELAY_TIMEOUT_US 60000
#define MHI_MISSION_MODE_TIMEOUT 60000
#define POWER_ON_RETRY_MAX_TIMES 3
#define POWER_ON_RETRY_DELAY_MS 200
@ -1750,10 +1749,11 @@ int cnss_pci_start_mhi(struct cnss_pci_data *pci_priv)
return ret;
timeout = pci_priv->mhi_ctrl->timeout_ms;
/* For non-perf builds the timeout is 10 (default) * 6 seconds */
if (cnss_get_host_build_type() == QMI_HOST_BUILD_TYPE_PRIMARY_V01)
pci_priv->mhi_ctrl->timeout_ms = MHI_MISSION_MODE_TIMEOUT;
else /* For Perf builds the timeout is 30sec*/
pci_priv->mhi_ctrl->timeout_ms = (MHI_MISSION_MODE_TIMEOUT / 2);
pci_priv->mhi_ctrl->timeout_ms *= 6;
else /* For perf builds the timeout is 10 (default) * 3 seconds */
pci_priv->mhi_ctrl->timeout_ms *= 3;
ret = cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_POWER_ON);
if (ret == 0)