Commit 30579ee
committed
PCI/ASPM: Convert quirks to override advertised link states
Existing quirks to disable ASPM L0s and L1 use pci_disable_link_state(),
which disables ASPM states and prevents their use in the future. But since
they are FINAL quirks, they happen after ASPM has already been enabled.
Here's a typical call path:
pci_host_probe
pci_scan_root_bus_bridge
pci_scan_child_bus
pci_scan_slot
pci_scan_single_device
pci_device_add
pci_fixup_device(pci_fixup_header) # HEADER quirks
pcie_aspm_init_link_state
pcie_config_aspm_path
pcie_config_aspm_link
pcie_config_aspm_dev # ASPM may be enabled
pci_bus_add_devices
pci_bus_add_devices
pci_fixup_device(pci_fixup_final) # FINAL quirks
quirk_disable_aspm_l0s
pci_disable_link_state(dev, PCIE_LINK_STATE_L0S)
Sometimes enabling ASPM can make the link non-functional, so if we know
ASPM is broken on a device, we shouldn't enable it at all, even
temporarily.
Convert the existing quirks to use pcie_aspm_remove_cap() instead, which
overrides the ASPM Support advertised in PCIe Link Capabilities, and make
them HEADER quirks so they run before pcie_aspm_init_link_state() has a
chance to enable ASPM.
Signed-off-by: Bjorn Helgaas <[email protected]>
Tested-by: Shawn Lin <[email protected]>
Reviewed-by: Lukas Wunner <[email protected]>
Link: https://patch.msgid.link/[email protected]1 parent 575b98e commit 30579ee
1 file changed
+19
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2494 | 2494 | | |
2495 | 2495 | | |
2496 | 2496 | | |
2497 | | - | |
2498 | | - | |
2499 | | - | |
2500 | | - | |
2501 | | - | |
2502 | | - | |
2503 | | - | |
2504 | | - | |
2505 | | - | |
2506 | | - | |
2507 | | - | |
2508 | | - | |
2509 | | - | |
2510 | | - | |
2511 | | - | |
2512 | | - | |
2513 | | - | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
| 2505 | + | |
| 2506 | + | |
| 2507 | + | |
| 2508 | + | |
| 2509 | + | |
| 2510 | + | |
| 2511 | + | |
| 2512 | + | |
2514 | 2513 | | |
2515 | 2514 | | |
2516 | 2515 | | |
2517 | | - | |
2518 | | - | |
| 2516 | + | |
| 2517 | + | |
2519 | 2518 | | |
2520 | 2519 | | |
2521 | 2520 | | |
2522 | 2521 | | |
2523 | 2522 | | |
2524 | 2523 | | |
2525 | 2524 | | |
2526 | | - | |
| 2525 | + | |
2527 | 2526 | | |
2528 | 2527 | | |
2529 | 2528 | | |
| |||
0 commit comments