• N
    PCI/ACPI: Fix _OSC ordering to allow PCIe hotplug use when available · 3dc48af3
    Neil Horman 提交于
    This fixes the problem of acpiphp claiming slots that should be managed
    by pciehp, which may keep ExpressCard slots from working.
    
    The acpiphp driver claims PCIe slots unless the BIOS has granted us
    control of PCIe native hotplug via _OSC.  Prior to v3.10, the acpiphp
    .add method (add_bridge()) was always called *after* we had requested
    native hotplug control with _OSC.
    
    But after 3b63aaa7 ("PCI: acpiphp: Do not use ACPI PCI subdriver
    mechanism"), which appeared in v3.10, acpiphp initialization is done
    during the bus scan via the pcibios_add_bus() hook, and this happens
    *before* we request native hotplug control.
    
    Therefore, acpiphp doesn't know yet whether the BIOS will grant control,
    and it claims slots that we should be handling with native hotplug.
    
    This patch requests native hotplug control earlier, so we know whether
    the BIOS granted it to us before we initialize acpiphp.
    
    To avoid reintroducing the ASPM issue fixed by b8178f13 ('Revert
    "PCI/ACPI: Request _OSC control before scanning PCI root bus"'), we run
    _OSC earlier but defer the actual ASPM calls until after the bus scan is
    complete.
    
    Tested successfully by myself.
    
    [bhelgaas: changelog, mark for stable]
    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=60736Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
    Signed-off-by: NBjorn Helgaas <bhelgaas@google.com>
    Acked-by: NYinghai Lu <yinghai@kernel.org>
    CC: stable@vger.kernel.org	# v3.10+
    CC: Len Brown <lenb@kernel.org>
    CC: "Rafael J. Wysocki" <rjw@sisk.pl>
    3dc48af3
pci_root.c 18.5 KB