mirror-linux/drivers/pci/pcie
Ilpo Järvinen 7507eb3e7b PCI/ASPM: Fix L1SS saving
Commit 1db806ec06 ("PCI/ASPM: Save parent L1SS config in
pci_save_aspm_l1ss_state()") aimed to perform L1SS config save for both the
Upstream Port and its upstream bridge when handling an Upstream Port, which
matches what the L1SS restore side does. However, parent->state_saved can
be set true at an earlier time when the upstream bridge saved other parts
of its state. Then later when attempting to save the L1SS config while
handling the Upstream Port, parent->state_saved is true in
pci_save_aspm_l1ss_state() resulting in early return and skipping saving
bridge's L1SS config because it is assumed to be already saved. Later on
restore, junk is written into L1SS config which causes issues with some
devices.

Remove parent->state_saved check and unconditionally save L1SS config also
for the upstream bridge from an Upstream Port which ought to be harmless
from correctness point of view. With the Upstream Port check now present,
saving the L1SS config more than once for the bridge is no longer a problem
(unlike when the parent->state_saved check got introduced into the fix
during its development).

Link: https://lore.kernel.org/r/20250131152913.2507-1-ilpo.jarvinen@linux.intel.com
Fixes: 1db806ec06 ("PCI/ASPM: Save parent L1SS config in pci_save_aspm_l1ss_state()")
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219731
Reported-by: Niklāvs Koļesņikovs <pinkflames.linux@gmail.com>
Reported by: Rafael J. Wysocki <rafael@kernel.org>
Closes: https://lore.kernel.org/r/CAJZ5v0iKmynOQ5vKSQbg1J_FmavwZE-nRONovOZ0mpMVauheWg@mail.gmail.com
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Closes: https://lore.kernel.org/r/d7246feb-4f3f-4d0c-bb64-89566b170671@molgen.mpg.de
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Tested-by: Niklāvs Koļesņikovs <pinkflames.linux@gmail.com>
Tested-by: Paul Menzel <pmenzel@molgen.mpg.de> # Dell XPS 13 9360
2025-02-06 09:54:38 -06:00
..
Kconfig PCI/AER: Update aer-inject tool source URL 2024-04-17 10:35:43 -05:00
Makefile PCI: Move TLP Log handling to its own file 2025-01-14 17:38:18 -06:00
aer.c pci-v6.14-changes 2025-01-25 16:03:40 -08:00
aer_inject.c PCI/AER: Use PCI_DEVID() macro in aer_inject() 2024-09-01 17:05:45 +00:00
aspm.c PCI/ASPM: Fix L1SS saving 2025-02-06 09:54:38 -06:00
bwctrl.c PCI/bwctrl: Fix NULL pointer deref on unbind and bind 2025-01-07 14:24:06 -06:00
dpc.c PCI: Add pcie_print_tlp_log() to print TLP Header and Prefix Log 2025-01-16 12:05:43 -06:00
edr.c PCI/EDR: Align EDR_PORT_LOCATE_DSM with PCI Firmware r3.3 2024-05-08 15:08:39 -05:00
err.c PCI/ERR: Cleanup misleading indentation inside if conditions 2024-04-29 10:33:29 -05:00
pme.c
portdrv.c PCI/bwctrl: Enable only if more than one speed is supported 2024-12-19 16:36:36 +00:00
portdrv.h PCI/bwctrl: Re-add BW notification portdrv as PCIe BW controller 2024-11-16 10:09:04 -06:00
ptm.c
rcec.c
tlp.c PCI: Add pcie_print_tlp_log() to print TLP Header and Prefix Log 2025-01-16 12:05:43 -06:00