diff options
author | Matthew Garrett <mjg@redhat.com> | 2010-12-06 14:00:56 -0500 |
---|---|---|
committer | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-12-23 15:53:08 -0500 |
commit | 2f671e2dbff6eb5ef4e2600adbec550c13b8fe72 (patch) | |
tree | fb5debb042218dcf1cbdf11eb4d8d603208c219f /include/linux/pci-aspm.h | |
parent | 8d805286968811223cca002134ba3d81244d5313 (diff) |
PCI: Disable ASPM if BIOS asks us to
We currently refuse to touch the ASPM registers if the BIOS tells us that
ASPM isn't supported. This can cause problems if the BIOS has (for any
reason) enabled ASPM on some devices anyway. Change the code such that we
explicitly clear ASPM if the FADT indicates that ASPM isn't supported,
and make sure we tidy up appropriately on device removal in order to deal
with the hotplug case. If ASPM is disabled because the BIOS doesn't hand
over control then we won't touch the registers.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Diffstat (limited to 'include/linux/pci-aspm.h')
-rw-r--r-- | include/linux/pci-aspm.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h index 91ba0b338b4..ce6810512c6 100644 --- a/include/linux/pci-aspm.h +++ b/include/linux/pci-aspm.h | |||
@@ -27,6 +27,7 @@ extern void pcie_aspm_init_link_state(struct pci_dev *pdev); | |||
27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); | 27 | extern void pcie_aspm_exit_link_state(struct pci_dev *pdev); |
28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); | 28 | extern void pcie_aspm_pm_state_change(struct pci_dev *pdev); |
29 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); | 29 | extern void pci_disable_link_state(struct pci_dev *pdev, int state); |
30 | extern void pcie_clear_aspm(void); | ||
30 | extern void pcie_no_aspm(void); | 31 | extern void pcie_no_aspm(void); |
31 | #else | 32 | #else |
32 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) | 33 | static inline void pcie_aspm_init_link_state(struct pci_dev *pdev) |
@@ -41,7 +42,9 @@ static inline void pcie_aspm_pm_state_change(struct pci_dev *pdev) | |||
41 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) | 42 | static inline void pci_disable_link_state(struct pci_dev *pdev, int state) |
42 | { | 43 | { |
43 | } | 44 | } |
44 | 45 | static inline void pcie_clear_aspm(void) | |
46 | { | ||
47 | } | ||
45 | static inline void pcie_no_aspm(void) | 48 | static inline void pcie_no_aspm(void) |
46 | { | 49 | { |
47 | } | 50 | } |