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

Commit d8eae434 authored by Yuanyuan Liu's avatar Yuanyuan Liu
Browse files

cnss: Fix pcie link down recovery issue



Reset pci link down indication flag. Do not restore in recovery
case. Don't disable irq for QCA6290 during recovery as it is
shared with MHI.

CRs-Fixed: 2011578
Change-Id: Ib0e6ca29d745cdeb5022c047bb437d2d9d010ce8
Signed-off-by: default avatarYuanyuan Liu <yuanliu@codeaurora.org>
parent 940f66df
Loading
Loading
Loading
Loading
+6 −3
Original line number Diff line number Diff line
@@ -79,10 +79,9 @@ static int cnss_set_pci_config_space(struct cnss_pci_data *pci_priv, bool save)
		} else if (pci_priv->saved_state) {
			pci_load_and_free_saved_state(pci_dev,
						      &pci_priv->saved_state);
		}

			pci_restore_state(pci_dev);
		}
	}

	return 0;
}
@@ -167,6 +166,9 @@ int cnss_resume_pci_link(struct cnss_pci_data *pci_priv)
	if (ret)
		goto out;

	if (pci_priv->pci_link_down_ind)
		pci_priv->pci_link_down_ind = false;

	return 0;
out:
	return ret;
@@ -299,6 +301,7 @@ static void cnss_pci_event_cb(struct msm_pcie_notify *notify)
		spin_unlock_irqrestore(&pci_link_down_lock, flags);

		cnss_pr_err("PCI link down, schedule recovery!\n");
		if (pci_dev->device == QCA6174_DEVICE_ID)
			disable_irq(pci_dev->irq);
		cnss_schedule_recovery(&pci_dev->dev, CNSS_REASON_LINK_DOWN);
		break;