xhci: don't rely on precalculated value of needed trbs in the enqueue loop
authorMathias Nyman <mathias.nyman@linux.intel.com>
Tue, 21 Jun 2016 07:58:00 +0000 (10:58 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Jun 2016 18:43:39 +0000 (11:43 -0700)
commit86065c2719a5685cef36945f09def3f0658c7860
treebe75045ca4456b39203fb486874f6f9cc329871d
parent124c39371114f43df34882685db3682a91dea10c
xhci: don't rely on precalculated value of needed trbs in the enqueue loop

Queue trbs until all payload data in the urb is tranferred.

The actual number of trbs might need to change from the pre-calculated
number when the packet alignment restrictions for td fragments in
xhci 4.11.7.1 are taken into account.

Long term plan is to get rid of calculating the needed trbs in advance
all together. It's an unnecessary extra walk through the scatterlist.

This change also allows some bulk queue function simplifications

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