aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci-acpi.h
diff options
context:
space:
mode:
authorAndrew Patterson <andrew.patterson@hp.com>2008-01-22 19:18:12 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-02-01 18:04:29 -0500
commitc2778357234f84668eab5558b54ad28478439d0b (patch)
tree9820e6cfa1bfe6989854425b0d63840c949fa3f2 /include/linux/pci-acpi.h
parent02d90fc343411d6dff26bbd64f0895a243e6f608 (diff)
PCI ACPI: Added a function to register _OSC with only PCIe devices.
The function pci_osc_support_set() traverses every root bridge when checking for _OSC support for a capability. It quits as soon as it finds a device/bridge that doesn't support the requested capability. This won't work for systems that have mixed PCI and PCIe bridges when checking for PCIe features. I split this function into two -- pci_osc_support_set() and pcie_osc_support_set(). The latter is used when only PCIe devices should be traversed. Signed-off-by: Andrew Patterson <andrew.patterson@hp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/pci-acpi.h')
-rw-r--r--include/linux/pci-acpi.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h
index 936ef82ed76a..3ba25065fa96 100644
--- a/include/linux/pci-acpi.h
+++ b/include/linux/pci-acpi.h
@@ -48,7 +48,15 @@
48 48
49#ifdef CONFIG_ACPI 49#ifdef CONFIG_ACPI
50extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags); 50extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags);
51extern acpi_status pci_osc_support_set(u32 flags); 51extern acpi_status __pci_osc_support_set(u32 flags, const char *hid);
52static inline acpi_status pci_osc_support_set(u32 flags)
53{
54 return __pci_osc_support_set(flags, PCI_ROOT_HID_STRING);
55}
56static inline acpi_status pcie_osc_support_set(u32 flags)
57{
58 return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING);
59}
52#else 60#else
53#if !defined(AE_ERROR) 61#if !defined(AE_ERROR)
54typedef u32 acpi_status; 62typedef u32 acpi_status;
@@ -57,6 +65,7 @@ typedef u32 acpi_status;
57static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) 65static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
58{return AE_ERROR;} 66{return AE_ERROR;}
59static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;} 67static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;}
68static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;}
60#endif 69#endif
61 70
62#endif /* _PCI_ACPI_H_ */ 71#endif /* _PCI_ACPI_H_ */