mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-07 12:25:00 -04:00
Merge "cnss2: pci: Trigger link down recovery if link fails to enter L0"
This commit is contained in:
commit
4420d6ffed
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