mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
PCI: Protect Link Control 2 Register with RMW locking
The PCIe Bandwidth Controller performs RMW accesses the Link Control 2 Register which can occur concurrently to other sources of Link Control 2 Register writes. Therefore, add Link Control 2 Register among the PCI Express Capability Registers that need RMW locking. Link: https://lore.kernel.org/r/20241018144755.7875-3-ilpo.jarvinen@linux.intel.com Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Lukas Wunner <lukas@wunner.de> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
fad610b987
commit
04af8a399f
2 changed files with 2 additions and 0 deletions
|
@ -221,6 +221,7 @@ a selected set of PCI Express Capability Registers:
|
|||
|
||||
* Link Control Register
|
||||
* Root Control Register
|
||||
* Link Control 2 Register
|
||||
|
||||
Any change to those registers should be performed using RMW accessors to
|
||||
avoid problems due to concurrent updates. For the up-to-date list of
|
||||
|
|
|
@ -1274,6 +1274,7 @@ static inline int pcie_capability_clear_and_set_word(struct pci_dev *dev,
|
|||
{
|
||||
switch (pos) {
|
||||
case PCI_EXP_LNKCTL:
|
||||
case PCI_EXP_LNKCTL2:
|
||||
case PCI_EXP_RTCTL:
|
||||
return pcie_capability_clear_and_set_word_locked(dev, pos,
|
||||
clear, set);
|
||||
|
|
Loading…
Add table
Reference in a new issue