Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3c75e23784e6ed5f4841de43d0750fd9b37bafcb
Commit:     3c75e23784e6ed5f4841de43d0750fd9b37bafcb
Parent:     d8634ddd371515740110d5658c3465a373894243
Author:     Andrew Patterson <[EMAIL PROTECTED]>
AuthorDate: Tue Jan 22 17:18:27 2008 -0700
Committer:  Greg Kroah-Hartman <[EMAIL PROTECTED]>
CommitDate: Fri Feb 1 15:04:30 2008 -0800

    PCI: Run ACPI _OSC method on root bridges only
    
    According to the PCI Firmware Specification Revision 3.0 section 4.5, _OSC
    should only be called on a root brdige.  Here is the relevant passage: "The
    _OSC interface defined in this section applies only to Host Bridge ACPI
    devices that originate PCI, PCI-X, or PCI Express hierarchies". Changed the
    code to find the parent root bridge of the device and call _OSC on that.
    
    Signed-off-by: Andrew Patterson <[EMAIL PROTECTED]>
    Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
---
 drivers/pci/pcie/aer/aerdrv_acpi.c |   22 ++++++----------------
 1 files changed, 6 insertions(+), 16 deletions(-)

diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c 
b/drivers/pci/pcie/aer/aerdrv_acpi.c
index f685bf5..8c199ae 100644
--- a/drivers/pci/pcie/aer/aerdrv_acpi.c
+++ b/drivers/pci/pcie/aer/aerdrv_acpi.c
@@ -31,23 +31,13 @@ int aer_osc_setup(struct pcie_device *pciedev)
 {
        acpi_status status = AE_NOT_FOUND;
        struct pci_dev *pdev = pciedev->port;
-       acpi_handle handle = DEVICE_ACPI_HANDLE(&pdev->dev);
-       struct pci_bus *parent;
+       acpi_handle handle = 0;
 
-       while (!handle) {
-               if (!pdev || !pdev->bus->parent)
-                       break;
-               parent = pdev->bus->parent;
-               if (!parent->self)
-                       /* Parent must be a host bridge */
-                       handle = acpi_get_pci_rootbridge_handle(
-                                       pci_domain_nr(parent),
-                                       parent->number);
-               else
-                       handle = DEVICE_ACPI_HANDLE(
-                                       &(parent->self->dev));
-               pdev = parent->self;
-       }
+       /* Find root host bridge */
+       while (pdev->bus && pdev->bus->self)
+               pdev = pdev->bus->self;
+       handle = acpi_get_pci_rootbridge_handle(
+               pci_domain_nr(pdev->bus), pdev->bus->number);
 
        if (handle) {
                pcie_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to