cnss2: print message for abrupt device reset to PBL

At times, the device can abruptly reset due to power rail or
other related issues which can manifest as a linkdown on the
host. As linkdown recovery mechanism is put in place, it would
be helpful to understand why a set of ramdumps was not collected
in these abrupt reset cases. Hence, it is wise to add a print
message to check whether the device has reset to PBL and make
the users aware.

Change-Id: I545a5b87461b05ea436e383fddd2a8d037a8389d
Signed-off-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
This commit is contained in:
Bhaumik Bhatt 2020-07-24 12:23:51 -07:00 • committed by Gerrit - the friendly Code Review server
commit 0a4c0b4557

View file

@ -4300,12 +4300,18 @@ static void cnss_dev_rddm_timeout_hdlr(struct timer_list *t)
{
struct cnss_pci_data *pci_priv =
from_timer(pci_priv, t, dev_rddm_timer);
struct mhi_controller *mhi_ctrl = pci_priv->mhi_ctrl;
if (!pci_priv)
return;
cnss_fatal_err("Timeout waiting for RDDM notification\n");
if (mhi_get_exec_env(mhi_ctrl) == MHI_EE_PBL)
cnss_pr_err("Unable to collect ramdumps due to abrupt reset\n");
mhi_debug_reg_dump(mhi_ctrl);
cnss_schedule_recovery(&pci_priv->pci_dev->dev, CNSS_REASON_TIMEOUT);
}