summaryrefslogtreecommitdiffstats
path: root/include/linux/pci-aspm.h
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2019-06-18 23:13:48 +0200
committerDavid S. Miller <davem@davemloft.net>2019-06-21 22:05:42 -0400
commit4cfd218855923a07dc02a5bec3d3bb37a118ebc2 (patch)
tree9a58ea195f240a1bba5a5e33baf8d0d4fe8adfbb /include/linux/pci-aspm.h
parentdca73a65a68329ee386d3ff473152bac66eaab39 (diff)
downloadtalos-op-linux-4cfd218855923a07dc02a5bec3d3bb37a118ebc2.tar.gz
talos-op-linux-4cfd218855923a07dc02a5bec3d3bb37a118ebc2.zip
PCI: let pci_disable_link_state propagate errors
Drivers may rely on pci_disable_link_state() having disabled certain ASPM link states. If OS can't control ASPM then pci_disable_link_state() turns into a no-op w/o informing the caller. The driver therefore may falsely assume the respective ASPM link states are disabled. Let pci_disable_link_state() propagate errors to the caller, enabling the caller to react accordingly. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pci-aspm.h')
-rw-r--r--include/linux/pci-aspm.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/pci-aspm.h b/include/linux/pci-aspm.h
index df28af5cef21..67064145d76e 100644
--- a/include/linux/pci-aspm.h
+++ b/include/linux/pci-aspm.h
@@ -24,11 +24,12 @@
#define PCIE_LINK_STATE_CLKPM 4
#ifdef CONFIG_PCIEASPM
-void pci_disable_link_state(struct pci_dev *pdev, int state);
-void pci_disable_link_state_locked(struct pci_dev *pdev, int state);
+int pci_disable_link_state(struct pci_dev *pdev, int state);
+int pci_disable_link_state_locked(struct pci_dev *pdev, int state);
void pcie_no_aspm(void);
#else
-static inline void pci_disable_link_state(struct pci_dev *pdev, int state) { }
+static inline int pci_disable_link_state(struct pci_dev *pdev, int state)
+{ return 0; }
static inline void pcie_no_aspm(void) { }
#endif
OpenPOWER on IntegriCloud