Re: [PATCH] PCI: Remove not needed check in disable aspm link

From: Yinghai Lu
Date: Fri Jun 14 2013 - 18:18:08 EST

On Fri, Jun 14, 2013 at 2:26 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
> [+cc Maxim, Jussi]
> Yeah, this is a huge mess. It makes my head hurt. I don't think it's
> reasonable to add more flags because that will make my head hurt even
> more.
> If I understand correctly, on Roman's system (the Acer Aspire One
> AOA150 netbook mentioned in
> - The BIOS leaves ASPM enabled for the ath5k device (03:00.0)
> - The BIOS does not allow the OS to manage ASPM (via _OSC)
> - The ath5k device does not work correctly with ASPM enabled
> - The ath5k driver calls pci_disable_link_state(), but we do not
> disable ASPM because we don't have permission from the BIOS

looks like Matthew Garrett path is causing problem:

commit 4949be16822e92a18ea0cc1616319926628092ee
Author: Matthew Garrett <mjg@xxxxxxxxxx>
Date: Tue Mar 6 13:41:49 2012 -0500

PCI: ignore pre-1.1 ASPM quirking when ASPM is disabled

commit c9651e70ad0aa499814817cbf3cc1d0b806ed3a1
Author: Matthew Garrett <mjg@xxxxxxxxxx>
Date: Tue Mar 27 10:17:41 2012 -0400

ASPM: Fix pcie devices with non-pcie children

after those two patches, it aspm_disabled is set, via _osc early,
pre-1.1 devices aspm register will be touched even aspm_force is not specified.

pcie_aspm_init_link_state will all the way to
pcie_config_aspm_path ==> pcie_config_aspm_link

in that path, aspm_disabled is not checked nowhere.

BTW, when aspm is not disabled, even the link is allocated, because it is
black listed, so it is never get touched.
Matthew's patch is not needed in any case.

I would suspect that that aspm enabling in Roman's system could set by that
path instead of BIOS.

Roman, can you please check two patches + linsus' tree on your system?



Attachment: revert_revert_osc_change_linus.patch
Description: Binary data

Attachment: revert_matthew_aspm_disabled.patch
Description: Binary data