]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: Fix spurious wakeups after S5 on Haswell
authorTakashi Iwai <tiwai@suse.de>
Thu, 12 Sep 2013 06:11:06 +0000 (08:11 +0200)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Wed, 9 Oct 2013 23:27:20 +0000 (16:27 -0700)
commita14394069214c8ddbf5c153550605715c5e7d7a2
tree0589159e1320d736147c3b2ae0fefb6147b7017b
parente825aedf3101a01afc0f33d1a97cc3185b72b6ed
xhci: Fix spurious wakeups after S5 on Haswell

Haswell LynxPoint and LynxPoint-LP with the recent Intel BIOS show
mysterious wakeups after shutdown occasionally.  After discussing with
BIOS engineers, they explained that the new BIOS expects that the
wakeup sources are cleared and set to D3 for all wakeup devices when
the system is going to sleep or power off, but the current xhci driver
doesn't do this properly (partly intentionally).

This patch introduces a new quirk, XHCI_SPURIOUS_WAKEUP, for
fixing the spurious wakeups at S5 by calling xhci_reset() in the xhci
shutdown ops as done in xhci_stop(), and setting the device to PCI D3
at shutdown and remove ops.

The PCI D3 call is based on the initial fix patch by Oliver Neukum.

[Note: Sarah changed the quirk name from XHCI_HSW_SPURIOUS_WAKEUP to
XHCI_SPURIOUS_WAKEUP, since none of the other quirks have system names
in them.  Sarah also fixed a collision with a quirk submitted around the
same time, by changing the xhci->quirks bit from 17 to 18.]

This patch should be backported to kernels as old as 3.0, that
contain the commit 6f22ea5e6639e72772f121c23eeb13c8d9e57e9c "xhci: Add
Lynx Point to list of Intel switchable hosts."

Cc: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: stable@vger.kernel.org
drivers/usb/host/xhci-pci.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h