[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250115134154.9220-3-sjiwei@163.com>
Date: Wed, 15 Jan 2025 21:41:54 +0800
From: Jiwei Sun <sjiwei@....com>
To: macro@...am.me.uk,
ilpo.jarvinen@...ux.intel.com,
bhelgaas@...gle.com
Cc: linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org,
helgaas@...nel.org,
lukas@...ner.de,
ahuang12@...ovo.com,
sunjw10@...ovo.com,
jiwei.sun.bj@...com,
sunjw10@...look.com
Subject: [PATCH v2 2/2] PCI: reread the Link Control 2 Register before using
From: Jiwei Sun <sunjw10@...ovo.com>
Since commit de9a6c8d5dbf ("PCI/bwctrl: Add pcie_set_target_speed() to set
PCIe Link Speed"), the local variable "lnkctl2" is not changed after
reading from PCI_EXP_LNKCTL2 in the pcie_failed_link_retrain(). It might
cause that the removing 2.5GT/s downstream link speed restriction codes
are not executed.
Reread the Link Control 2 Register before using.
Fixes: de9a6c8d5dbf ("PCI/bwctrl: Add pcie_set_target_speed() to set PCIe Link Speed")
Suggested-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
Signed-off-by: Jiwei Sun <sunjw10@...ovo.com>
---
drivers/pci/quirks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
index 76f4df75b08a..02d2e16672a8 100644
--- a/drivers/pci/quirks.c
+++ b/drivers/pci/quirks.c
@@ -123,6 +123,7 @@ int pcie_failed_link_retrain(struct pci_dev *dev)
return ret;
}
+ pcie_capability_read_word(dev, PCI_EXP_LNKCTL2, &lnkctl2);
pcie_capability_read_word(dev, PCI_EXP_LNKSTA, &lnksta);
}
--
2.34.1
Powered by blists - more mailing lists