History

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.

Heiner Kallweit committed 7 years ago

Commit 4cfd2181 parent dca73a62 files · +15 −12Browse files

Showing the changes to include/linux (1 of 2 files). Show all

Unified · Split

include/linux/pci-aspm.h+4−3
@@ -24,11 +24,12 @@ · 23 unmodified lines
24#define PCIE_LINK_STATE_CLKPM 424#define PCIE_LINK_STATE_CLKPM 4
25 25
26#ifdef CONFIG_PCIEASPM26#ifdef CONFIG_PCIEASPM
27void pci_disable_link_state(struct pci_dev *pdev, int state);27int pci_disable_link_state(struct pci_dev *pdev, int state);
28void pci_disable_link_state_locked(struct pci_dev *pdev, int state);28int pci_disable_link_state_locked(struct pci_dev *pdev, int state);
29void pcie_no_aspm(void);29void pcie_no_aspm(void);
30#else30#else
31static inline void pci_disable_link_state(struct pci_dev *pdev, int state) { }31static inline int pci_disable_link_state(struct pci_dev *pdev, int state)
32{ return 0; }
32static inline void pcie_no_aspm(void) { }33static inline void pcie_no_aspm(void) { }
33#endif34#endif
34 35

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t