PCI/ASPM: Use LTR if already enabled by platform
authorBjorn Helgaas <bhelgaas@google.com>
Fri, 4 Jan 2019 23:59:07 +0000 (17:59 -0600)
committerBjorn Helgaas <helgaas@kernel.org>
Sat, 9 Feb 2019 15:21:03 +0000 (09:21 -0600)
commit10ecc818ea7319b5d0d2b4e1aa6a77323e776f76
tree07056877320b443878a755d96f3d02069b19eb0c
parentbfeffd155283772bbe78c6a05dec7c0128ee500c
PCI/ASPM: Use LTR if already enabled by platform

RussianNeuroMancer reported that the Intel 7265 wifi on a Dell Venue 11 Pro
7140 table stopped working after wakeup from suspend and bisected the
problem to 9ab105deb60f ("PCI/ASPM: Disable ASPM L1.2 Substate if we don't
have LTR").  David Ward reported the same problem on a Dell Latitude 7350.

After af8bb9f89838 ("PCI/ACPI: Request LTR control from platform before
using it"), we don't enable LTR unless the platform has granted LTR control
to us.  In addition, we don't notice if the platform had already enabled
LTR itself.

After 9ab105deb60f ("PCI/ASPM: Disable ASPM L1.2 Substate if we don't have
LTR"), we avoid using LTR if we don't think the path to the device has LTR
enabled.

The combination means that if the platform itself enables LTR but declines
to give the OS control over LTR, we unnecessarily avoided using ASPM L1.2.

Link: https://bugzilla.kernel.org/show_bug.cgi?id=201469
Fixes: 9ab105deb60f ("PCI/ASPM: Disable ASPM L1.2 Substate if we don't have LTR")
Fixes: af8bb9f89838 ("PCI/ACPI: Request LTR control from platform before using it")
Reported-by: RussianNeuroMancer <russianneuromancer@ya.ru>
Reported-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
CC: stable@vger.kernel.org # v4.18+
drivers/pci/probe.c