summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVictor Hsu <hsuvictor@google.com>2023-01-06 01:44:16 +0000
committerVictor Hsu <hsuvictor@google.com>2023-01-06 02:24:21 +0000
commit221cbd0585a9e58344896651b7b649c8fa337bc5 (patch)
tree984bfcd1fd3c262f758dbcddb5915a18c03e41f7
parent176c6844d95cdc637cf21804bf25cbcc15ece4be (diff)
downloadcnss2-221cbd0585a9e58344896651b7b649c8fa337bc5.tar.gz
Normally mhi_ctrl->timeout_ms is 10 seconds and is reduced to 5 seconds during panic. But during firmware downloading the mhi_ctrl->timeout_ms is changed to 60 seconds and the original code changes the timeout to 30 seconds. Change mhi_ctrl->timeout_ms to 5 seconds to avoid watchdog bite. Bug: 262188328 Test: Trigger panic during firmware download and no watchdog bite. Change-Id: I01ab1ece0855644f14c12d4ba97b5e37b59369d1 Signed-off-by: Victor Hsu <hsuvictor@google.com>
-rw-r--r--cnss2/pci.c2
-rw-r--r--mhi/core/boot.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/cnss2/pci.c b/cnss2/pci.c
index fdb3417..a80826b 100644
--- a/cnss2/pci.c
+++ b/cnss2/pci.c
@@ -4895,7 +4895,7 @@ void cnss_pci_collect_dump_info(struct cnss_pci_data *pci_priv, bool in_panic)
/* Inside panic handler, reduce timeout for RDDM to avoid
* unnecessary hypervisor watchdog bite.
*/
- pci_priv->mhi_ctrl->timeout_ms /= 2;
+ pci_priv->mhi_ctrl->timeout_ms = 5000;
}
cnss_mhi_debug_reg_dump(pci_priv);
diff --git a/mhi/core/boot.c b/mhi/core/boot.c
index a2d3526..83d989e 100644
--- a/mhi/core/boot.c
+++ b/mhi/core/boot.c
@@ -71,6 +71,9 @@ int mhi_rddm_download_status(struct mhi_controller *mhi_cntrl)
struct device *dev = &mhi_cntrl->mhi_dev->dev;
int ret = 0;
+ MHI_LOG("mhi_cntrl->timeout_ms=%u, retry=%u\n"
+ , mhi_cntrl->timeout_ms, retry);
+
while (retry--) {
ret = mhi_read_reg_field(mhi_cntrl, base, BHIE_RXVECSTATUS_OFFS,
BHIE_RXVECSTATUS_STATUS_BMSK,