PCI/PM: Enable D3/D3cold by default for most devices
authorHuang Ying <ying.huang@intel.com>
Wed, 8 Aug 2012 01:07:38 +0000 (09:07 +0800)
committerBjorn Helgaas <bhelgaas@google.com>
Tue, 21 Aug 2012 23:31:40 +0000 (17:31 -0600)
commit4f9c1397e2e80e52b17ec4e39760caa807bd15c7
tree60007cc7b7511df5db7e6705929ba01d9a96b97d
parenta6b881a5b8d4fa2135e55a74be6d6b1e17e445dd
PCI/PM: Enable D3/D3cold by default for most devices

This patch fixes the following bug:

http://marc.info/?l=linux-usb&m=134318961120825&w=2

Originally, device lower power states include D1, D2, D3.  After that,
D3 is further divided into D3hot and D3cold.  To support both scenario
safely, original D3 is mapped to D3cold.

When adding D3cold support, because worry about some device may have
broken D3cold support, D3cold is disabled by default.  This disable D3
on original platform too.  But some original platform may only have
working D3, but no working D1, D2.  The root cause of the above bug is
it too.

To deal with this, this patch enables D3/D3cold by default for most
devices.  This restores the original behavior.  For some devices that
suspected to have broken D3cold support, such as PCIe port, D3cold is
disabled by default.

Reported-by: Bjorn Mork <bjorn@mork.no>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Rafael J. Wysocki <rjw@sisk.pl>
drivers/pci/pci.c
drivers/pci/pcie/portdrv_pci.c