]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xhci: Giveback urb in finish_td directly
authorMathias Nyman <mathias.nyman@linux.intel.com>
Fri, 11 Nov 2016 13:13:23 +0000 (15:13 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 14 Nov 2016 09:18:22 +0000 (10:18 +0100)
commit0c03d89d0c71722dfc0c4a2a300bff37324541dc
tree774a2c68610322dce60891da077f524effeb1094
parent446b31419cb122f12900fe2004fb59e413008a8e
xhci: Giveback urb in finish_td directly

mostly refactoring and code cleanup.

while handling transfer events we used to check the return value of
various functions to see if we can give back the URB.
Turns out the only case when those return values are set are when
finish_td() notices we are completing the last td in the URB.

give back the urb directly in finish_td() instead.

Only functional change is that we now increase the event ring dequeue
pointer in sowtware after giving back the URB. This should not matter
as we are in hardware interrupt context and the time when writing the
new event ring dequeue to hardware remains the same.
Hardware is the only one that can put event TRBs on the event ring.

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/host/xhci-ring.c