]> git.baikalelectronics.ru Git - kernel.git/commit
xhci: rework cycle bit checking for new dequeue pointers
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 19 Aug 2014 12:17:58 +0000 (15:17 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 19 Aug 2014 16:27:36 +0000 (11:27 -0500)
commitc647c297e43765a88b142b46b1f80deb040ae1e2
tree0c0605519c22cb31360617dd58887e8d685f486c
parentd76d6dc8f3f6a5b6d18b2fe5bd34b8821b95c2cc
xhci: rework cycle bit checking for new dequeue pointers

When we manually need to move the TR dequeue pointer we need to set the
correct cycle bit as well. Previously we used the trb pointer from the
last event received as a base, but this was changed in
commit 83fc03eee676 ("usb: xhci: Prefer endpoint context dequeue pointer")
to use the dequeue pointer from the endpoint context instead

It turns out some Asmedia controllers advance the dequeue pointer
stored in the endpoint context past the event triggering TRB, and
this messed up the way the cycle bit was calculated.

Instead of adding a quirk or complicating the already hard to follow cycle bit
code, the whole cycle bit calculation is now simplified and adapted to handle
event and endpoint context dequeue pointer differences.

Fixes: 83fc03eee676 ("usb: xhci: Prefer endpoint context dequeue pointer")
Reported-by: Maciej Puzio <mx34567@gmail.com>
Reported-by: Evan Langlois <uudruid74@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: Maciej Puzio <mx34567@gmail.com>
Tested-by: Evan Langlois <uudruid74@gmail.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c