17 lines
719 B
Diff
17 lines
719 B
Diff
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
|
--- a/drivers/pci/quirks.c
|
|
+++ b/drivers/pci/quirks.c
|
|
@@ -108,7 +108,11 @@ int pcie_failed_link_retrain(struct pci_dev *dev)
|
|
|
|
pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnksta);
|
|
pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &oldlnkctl2);
|
|
- if (!(lnksta & PCI_EXP_LNKSTA_DLLLA) && pcie_lbms_seen(dev, lnksta)) {
|
|
+ if (lnksta & PCI_EXP_LNKSTA_DLLLA) {
|
|
+ ;
|
|
+ } else if (PCIE_LNKCTL2_TLS2SPEED(oldlnkctl2) == PCIE_SPEED_2_5GT) {
|
|
+ return ret;
|
|
+ } else if (pcie_lbms_seen(dev, lnksta)) {
|
|
pci_info(dev, "broken device, retraining non-functional downstream link at 2.5GT/s\n");
|
|
ret = pcie_set_target_speed(dev, PCIE_SPEED_2_5GT, false);
|
|
if (ret)
|