• Bjorn Helgaas's avatar
    Revert "PCI/ACPI: Request _OSC control before scanning PCI root bus" · b8178f13
    Bjorn Helgaas authored
    This reverts commit 8c33f51d.
    
    Conflicts:
    	drivers/acpi/pci_root.c
    
    This commit broke some pre-1.1 PCIe devices by leaving them with
    ASPM enabled.  Previously, we had disabled ASPM on these devices
    because many of them don't implement it correctly (per 149e1637).
    
    Requesting _OSC control early means that aspm_disabled may be set
    before we scan the PCI bus and configure link ASPM state.  But the
    ASPM configuration currently skips the check for pre-PCIe 1.1 devices
    when aspm_disabled is set, like this:
    
        acpi_pci_root_add
          acpi_pci_osc_support
            if (flags != base_flags)
              pcie_no_aspm
                aspm_disabled = 1
          pci_acpi_scan_root
            ...
              pcie_aspm_init_link_state
                pcie_aspm_sanity_check
                  if (!aspm_disabled)
                    /* check for pre-PCIe 1.1 device */
    
    Therefore, setting aspm_disabled early means that we leave ASPM enabled
    on these pre-PCIe 1.1 devices, which is a regression for some devices.
    
    The best fix would be to clean up the ASPM init so we can evaluate
    _OSC before scanning the bug (that way boot-time and hot-add discovery
    will work the same), but that requires significant rework.
    
    For now, we'll just revert the _OSC change as the lowest-risk fix.
    
    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=55211Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
    Acked-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Acked-by: default avatarYinghai Lu <yinghai@kernel.org>
    CC: stable@vger.kernel.org	# v3.8+
    b8178f13
pci_root.c 19.9 KB