xhci: don't re-enable IE constantly
authorFelipe Balbi <balbi@ti.com>
Thu, 15 Mar 2012 14:37:08 +0000 (16:37 +0200)
committerLuis Henriques <luis.henriques@canonical.com>
Mon, 30 Apr 2012 18:15:09 +0000 (19:15 +0100)
commit1ec6241bce2006215f21eca184587014fde0f7a7
tree013dce1159a55384783c5f008a624d9930ef9e47
parentc536c791b0bf87490a1d23b4ee62c37448d65aba
xhci: don't re-enable IE constantly

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

commit 4e833c0b87a30798e67f06120cecebef6ee9644c upstream.

While we're at that, define IMAN bitfield to aid readability.

The interrupt enable bit should be set once on driver init, and we
shouldn't need to continually re-enable it.  Commit c21599a3 introduced
a read of the irq_pending register, and that allows us to preserve the
state of the IE bit.  Before that commit, we were blindly writing 0x3 to
the register.

This patch should be backported to kernels as old as 2.6.36, or ones
that contain the commit c21599a36165dbc78b380846b254017a548b9de5 "USB:
xhci: Reduce reads and writes of interrupter registers".

Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.h