mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 20:33:58 -04:00
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: Hemant Kumar <hemantk@codeaurora.org>
This commit is contained in:
parent
6a4a49544d
commit
a73babdb3e
1 changed files with 8 additions and 1 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue