aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-05 12:47:16 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2018-07-05 12:47:16 +0200
commit88b96088e94ec66f6c9015eee28cb9d053be69c0 (patch)
tree5f655566320676b20452266a416660866a98442b /drivers/pci
parentPM / Domains: Don't power on at attach for the multi PM domain case (diff)
parentPCI / ACPI / PM: Resume bridges w/o drivers on suspend-to-RAM (diff)
downloadlinux-dev-88b96088e94ec66f6c9015eee28cb9d053be69c0.tar.xz
linux-dev-88b96088e94ec66f6c9015eee28cb9d053be69c0.zip
Merge branch 'pm-pci'
Merge a PCI power management regression fix. * pm-pci: PCI / ACPI / PM: Resume bridges w/o drivers on suspend-to-RAM
Diffstat (limited to 'drivers/pci')
-rw-r--r--drivers/pci/pci-acpi.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/pci/pci-acpi.c b/drivers/pci/pci-acpi.c
index 65113b6eed14..89ee6a2b6eb8 100644
--- a/drivers/pci/pci-acpi.c
+++ b/drivers/pci/pci-acpi.c
@@ -629,6 +629,18 @@ static bool acpi_pci_need_resume(struct pci_dev *dev)
{
struct acpi_device *adev = ACPI_COMPANION(&dev->dev);
+ /*
+ * In some cases (eg. Samsung 305V4A) leaving a bridge in suspend over
+ * system-wide suspend/resume confuses the platform firmware, so avoid
+ * doing that, unless the bridge has a driver that should take care of
+ * the PM handling. According to Section 16.1.6 of ACPI 6.2, endpoint
+ * devices are expected to be in D3 before invoking the S3 entry path
+ * from the firmware, so they should not be affected by this issue.
+ */
+ if (pci_is_bridge(dev) && !dev->driver &&
+ acpi_target_system_state() != ACPI_STATE_S0)
+ return true;
+
if (!adev || !acpi_device_power_manageable(adev))
return false;