xhci: Fix register save/restore order.
authorSarah Sharp <sarah.a.sharp@linux.intel.com>
Fri, 16 Mar 2012 20:19:35 +0000 (13:19 -0700)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:11 +0000 (19:15 +0100)
commitaa6c74480f3bd638fae9457234264b36b912c853
tree946be64f88ec78887d3af6c425340ede03b15c78
parentcbbbc29620d338d2042c200dba8a000254fe98d5
xhci: Fix register save/restore order.

BugLink: http://bugs.launchpad.net/bugs/987337

commit c7713e736526d8c9f6f87716fb90562a8ffaff2c upstream.

The xHCI 1.0 spec errata released on June 13, 2011, changes the ordering
that the xHCI registers are saved and restored in.  It moves the
interrupt pending (IMAN) and interrupt control (IMOD) registers to be
saved and restored last.  I believe that's because the host controller
may attempt to fetch the event ring table when interrupts are
re-enabled.  Therefore we need to restore the event ring registers
before we re-enable interrupts.

This should be backported to kernels as old as 2.6.37, that contain the
commit 5535b1d5f8885695c6ded783c692e3c0d0eda8ca "USB: xHCI: PCI power
management implementation"

Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Tested-by: Elric Fu <elricfu1@gmail.com>
Cc: Andiry Xu <andiry.xu@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/usb/host/xhci.c