Public bug reported:
[Impact]
In Launchpad bug #2132119, commit cc727f2d9a93 ("PCI/ASPM: Avoid L0s for
Realtek RTS525A") was cherry-picked to 6.8 kernel to stop an AER Correctable
Replay Timer Timeout storm on HP systems with Realtek RTS525A (10ec:525a).
However, that fix registered quirk_disable_aspm_l0s as a
DECLARE_PCI_FIXUP_HEADER quirk, while in the 6.8 kernel
quirk_disable_aspm_l0s() still used the old pci_disable_link_state(),
designed for DECLARE_PCI_FIXUP_FINAL. Because pci_disable_link_state()
depends on link state structures that are not yet initialized during the
early HEADER fixup phase, the quirk cannot function as intended.
To make the RTS525A fix and other ASPM quirks work before ASPM
initialization, the kernel needs the upstream infrastructure that caches
advertised link states and uses pcie_aspm_remove_cap() during the HEADER
fixup phase. Without these prerequisites, systems with the RTS525A card
reader still hit the AER storm and freeze during shutdown or reboot:
pcieport 0000:00:1c.0: AER: Correctable error message received from 0000:58:00.0
rtsx_pci 0000:58:00.0: PCIe Bus Error: severity=Correctable, type=Data Link
Layer, (Transmitter ID)
rtsx_pci 0000:58:00.0: device [10ec:525a] error status/mask=00001000/00006000
rtsx_pci 0000:58:00.0: [12] Timeout
[Fix]
Backport the 3 upstream prerequisite commits from v6.18:
1. 4495bffd86ba0 ("PCI/ASPM: Cache L0s/L1 Supported so advertised link states
can be overridden")
Cache the L0s Supported and L1 Supported bits early in device enumeration so
HEADER quirks can override them before pcie_aspm_cap_init() runs.
2. 575b98e39d817 ("PCI/ASPM: Add pcie_aspm_remove_cap() to override advertised
link states")
Introduce pcie_aspm_remove_cap() to allow quirks to clear advertised ASPM L0s
or L1 capabilities.
3. 30579eebba6ae ("PCI/ASPM: Convert quirks to override advertised link states")
Convert existing ASPM quirks (including quirk_disable_aspm_l0s) to call
pcie_aspm_remove_cap() and run as HEADER quirks so ASPM is never enabled on
defective hardware.
[Test Plan]
On affected HP hardware with Realtek RTS525A (10ec:525a):
1. Check dmesg for AER storm:
$ sudo dmesg | grep -i "AER\|rtsx_pci"
Without patches: The kernel AER handler gets flooded with Replay Timer Timeout
errors from 10ec:525a.
With patches: No AER timeout messages appear for the device.
2. Verify reboot and shutdown:
$ sudo reboot
$ sudo poweroff
Without patches: System freezes at shutdown/reboot screen; power LED stays on.
With patches: Shutdown and reboot complete cleanly.
[Where problems could occur]
Could affect PCIe device enumeration and ASPM power saving states across all
PCIe devices.
These commits change the ASPM capability initialization flow and convert
existing quirks for Intel NICs and ASMedia bridges from FINAL quirks to
HEADER quirks. If pcie_aspm_remove_cap() or link state caching has a
flaw, supported ASPM states on PCIe devices could be incorrectly cleared
or retained. If ASPM is accidentally disabled on non-target devices,
system idle power consumption on battery would increase. If disabled
states fail to clear, affected devices could experience bus errors or
link dropouts.
[Other Info]
Follow-up to LP: #2132119. All 3 prerequisite commits are upstream in v6.18.
This SRU targets noble (linux 6.8).
** Affects: linux (Ubuntu)
Importance: Undecided
Status: New
** Affects: linux (Ubuntu Noble)
Importance: Undecided
Assignee: AceLan Kao (acelankao)
Status: In Progress
** Also affects: linux (Ubuntu Noble)
Importance: Undecided
Status: New
** Changed in: linux (Ubuntu Noble)
Status: New => In Progress
** Changed in: linux (Ubuntu Noble)
Assignee: (unassigned) => AceLan Kao (acelankao)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2166737
Title:
Fix ASPM quirks execution timing by caching link states and adding
pcie_aspm_remove_cap
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2166737/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs