linux/drivers/pci/pcie
Ilpo Järvinen e09060b3b6 PCI/ASPM: Use RMW accessors for changing LNKCTL
Don't assume that the device is fully under the control of ASPM and use RMW
capability accessors which do proper locking to avoid losing concurrent
updates to the register values.

If configuration fails in pcie_aspm_configure_common_clock(), the
function attempts to restore the old PCI_EXP_LNKCTL_CCC settings. Store
only the old PCI_EXP_LNKCTL_CCC bit for the relevant devices rather
than the content of the whole LNKCTL registers. It aligns better with
how pcie_lnkctl_clear_and_set() expects its parameter and makes the
code more obvious to understand.

Suggested-by: Lukas Wunner <lukas@wunner.de>
Fixes: 2a42d9dba7 ("PCIe: ASPM: Break out of endless loop waiting for PCI config bits to switch")
Fixes: 7d715a6c1a ("PCI: add PCI Express ASPM support")
Link: https://lore.kernel.org/r/20230717120503.15276-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: "Rafael J. Wysocki" <rafael@kernel.org>
2023-08-10 11:13:43 -05:00
..
aer_inject.c PCI/AER: Update aer-inject URL 2022-03-02 11:26:17 -06:00
aer.c PCI/AER: Remove redundant Device Control Error Reporting Enable 2023-01-26 17:06:13 -06:00
aspm.c PCI/ASPM: Use RMW accessors for changing LNKCTL 2023-08-10 11:13:43 -05:00
dpc.c PCI/PM: Drop pci_bridge_wait_for_secondary_bus() timeout parameter 2023-04-11 17:35:06 -05:00
edr.c PCI/EDR: Add edr_handle_event() comments 2023-04-07 17:39:53 -05:00
err.c PCI/ERR: Recognize disconnected devices in report_error_detected() 2022-06-08 15:08:40 -05:00
Kconfig PCI: pciehp: Enable by default if USB4 enabled 2022-11-15 09:25:21 -06:00
Makefile PCI/portdrv: Squash into portdrv.c 2022-10-24 14:57:30 -05:00
pme.c PCI/PME: Use PCI_POSSIBLE_ERROR() to check config reads 2021-11-18 14:13:18 -06:00
portdrv.c PCI/portdrv: Prevent LS7A Bus Master clearing on shutdown 2023-02-01 12:05:28 -06:00
portdrv.h PCI/portdrv: Move private things to portdrv.c 2022-10-24 14:57:30 -05:00
ptm.c PCI/PTM: Reorder functions in logical order 2022-09-12 15:29:52 -05:00
rcec.c PCI/RCEC: Fix RCiEP device to RCEC association 2021-03-10 15:10:46 -06:00