]> git.karo-electronics.de Git - karo-tx-linux.git/commit
PCI/PM: Do not suspend port if any subordinate device needs PME polling
authorHuang Ying <ying.huang@intel.com>
Wed, 26 Dec 2012 17:39:23 +0000 (10:39 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Jan 2013 17:19:03 +0000 (09:19 -0800)
commitdc0e6fecca56cc2ad5c8ce9023e1be6737441cb3
tree8b61b6c4d4ee1405691ff79f8df9296183d5b91e
parentc9b184487ae4e1ec9c8d11b4ed1a23293fabb2ce
PCI/PM: Do not suspend port if any subordinate device needs PME polling

commit c733b77475707cc3980542c86ee0ad5c841d544c upstream.

Ulrich reported that his USB3 cardreader does not work reliably when
connected to the USB3 port.  It turns out that USB3 controller failed to
awaken when plugging in the USB3 cardreader.  Further experiments found
that the USB3 host controller can only be awakened via polling, not via PME
interrupt.  But if the PCIe port to which the USB3 host controller is
connected is suspended, we cannot poll the controller because its config
space is not accessible when the PCIe port is in a low power state.

To solve the issue, the PCIe port will not be suspended if any subordinate
device needs PME polling.

[bhelgaas: use bool consistently rather than mixing int/bool]
Reference: http://lkml.kernel.org/r/50841CCC.9030809@uli-eckhardt.de
Reported-by: Ulrich Eckhardt <usb@uli-eckhardt.de>
Tested-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pci/pcie/portdrv_pci.c