Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit eb92d5e6 authored by Yue Ma's avatar Yue Ma Committed by Gerrit - the friendly Code Review server
Browse files

cnss2: Ignore RDDM failure if MHI is not powered on



When triggering RDDM fails, if MHI is not powered on or driver
unload/idle shutdown is in progress, there is no need to do
recovery. Hence ignore the failure in such scenario.

Change-Id: I4b14bf31cd71bf80b61a02745a4a506e93a4a16c
Signed-off-by: default avatarYue Ma <yuem@codeaurora.org>
parent cd914bbc
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -3361,6 +3361,13 @@ int cnss_pci_force_fw_assert_hdlr(struct cnss_pci_data *pci_priv)

	ret = cnss_pci_set_mhi_state(pci_priv, CNSS_MHI_TRIGGER_RDDM);
	if (ret) {
		if (!test_bit(CNSS_MHI_POWER_ON, &pci_priv->mhi_state) ||
		    test_bit(CNSS_DRIVER_UNLOADING, &plat_priv->driver_state) ||
		    test_bit(CNSS_DRIVER_IDLE_SHUTDOWN,
			     &plat_priv->driver_state)) {
			cnss_pr_dbg("MHI is not powered on, ignore RDDM failure\n");
			return 0;
		}
		cnss_fatal_err("Failed to trigger RDDM, err = %d\n", ret);
		cnss_pci_dump_registers(pci_priv);
		cnss_schedule_recovery(&pci_priv->pci_dev->dev,