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

Commit a73babdb authored by Hemant Kumar's avatar Hemant Kumar Committed by Yue Ma
Browse files

cnss2: pci: Trigger link down recovery if link fails to enter L0



In case if link fails to transition to L0 trigger inferred link
down recovery to collect RDDM dump.

Change-Id: I43326af34744501c542a1a1e22d6a9b5378c7289
Signed-off-by: default avatarHemant Kumar <hemantk@codeaurora.org>
parent 6a4a4954
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -892,6 +892,7 @@ int cnss_pci_prevent_l1(struct device *dev)
{
	struct pci_dev *pci_dev = to_pci_dev(dev);
	struct cnss_pci_data *pci_priv = cnss_get_pci_priv(pci_dev);
	int ret;

	if (!pci_priv) {
		cnss_pr_err("pci_priv is NULL\n");
@@ -908,7 +909,13 @@ int cnss_pci_prevent_l1(struct device *dev)
		return -EIO;
	}

	return msm_pcie_prevent_l1(pci_dev);
	ret = msm_pcie_prevent_l1(pci_dev);
	if (ret) {
		cnss_pr_err("Failed to prevent PCIe L1, considered as link down\n");
		cnss_pci_link_down(dev);
	}

	return ret;
}
EXPORT_SYMBOL(cnss_pci_prevent_l1);