mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
02d90fc343
commit
c277835723
2 changed files with 13 additions and 4 deletions
|
@ -48,7 +48,15 @@
|
|||
|
||||
#ifdef CONFIG_ACPI
|
||||
extern acpi_status pci_osc_control_set(acpi_handle handle, u32 flags);
|
||||
extern acpi_status pci_osc_support_set(u32 flags);
|
||||
extern acpi_status __pci_osc_support_set(u32 flags, const char *hid);
|
||||
static inline acpi_status pci_osc_support_set(u32 flags)
|
||||
{
|
||||
return __pci_osc_support_set(flags, PCI_ROOT_HID_STRING);
|
||||
}
|
||||
static inline acpi_status pcie_osc_support_set(u32 flags)
|
||||
{
|
||||
return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING);
|
||||
}
|
||||
#else
|
||||
#if !defined(AE_ERROR)
|
||||
typedef u32 acpi_status;
|
||||
|
@ -57,6 +65,7 @@ typedef u32 acpi_status;
|
|||
static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
|
||||
{return AE_ERROR;}
|
||||
static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;}
|
||||
static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;}
|
||||
#endif
|
||||
|
||||
#endif /* _PCI_ACPI_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue