]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
PCI: disable ASPM on VIA root-port-under-bridge configurations
authorShaohua Li <shaohua.li@intel.com>
Mon, 8 Jun 2009 01:27:25 +0000 (09:27 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 2 Jul 2009 23:49:31 +0000 (16:49 -0700)
commit 8e822df700694ca6850d1e0c122fd7004b2778d8 upstream.

VIA has a strange chipset, it has root port under a bridge. Disable ASPM
for such strange chipset.

Tested-by: Wolfgang Denk <wd@denx.de>
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/pci/pcie/aspm.c

index b0367f168af4b95ff549bdad6b31fa1a9548e113..777b2c76caf5a8b7687bff056d32056fdb666117 100644 (file)
@@ -638,6 +638,10 @@ void pcie_aspm_init_link_state(struct pci_dev *pdev)
        if (pdev->pcie_type != PCI_EXP_TYPE_ROOT_PORT &&
                pdev->pcie_type != PCI_EXP_TYPE_DOWNSTREAM)
                return;
+       /* VIA has a strange chipset, root port is under a bridge */
+       if (pdev->pcie_type == PCI_EXP_TYPE_ROOT_PORT &&
+               pdev->bus->self)
+               return;
        down_read(&pci_bus_sem);
        if (list_empty(&pdev->subordinate->devices))
                goto out;