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
2424 #define PCIE_LINK_STATE_CLKPM 4
2525
2626 #ifdef CONFIG_PCIEASPM
27−void pci_disable_link_state(struct pci_dev *pdev, int state);
28−void pci_disable_link_state_locked(struct pci_dev *pdev, int state);
27+int pci_disable_link_state(struct pci_dev *pdev, int state);
28+int pci_disable_link_state_locked(struct pci_dev *pdev, int state);
2929 void pcie_no_aspm(void);
3030 #else
31−static inline void pci_disable_link_state(struct pci_dev *pdev, int state) { }
31+static inline int pci_disable_link_state(struct pci_dev *pdev, int state)
32+{ return 0; }
3233 static inline void pcie_no_aspm(void) { }
3334 #endif
3435

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