From: Mathias Nyman Date: Tue, 19 Aug 2014 12:17:58 +0000 (+0300) Subject: xhci: rework cycle bit checking for new dequeue pointers X-Git-Tag: omap-fixes-against-v3.17-rc3~24^2~21 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=365038d83313951d6ace15342eb24624bbef1666;p=pandora-kernel.git 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 1f81b6d22a59 ("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: 1f81b6d22a59 ("usb: xhci: Prefer endpoint context dequeue pointer") Reported-by: Maciej Puzio Reported-by: Evan Langlois Reviewed-by: Julius Werner Tested-by: Maciej Puzio Tested-by: Evan Langlois Signed-off-by: Mathias Nyman Cc: stable@vger.kernel.org Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed