]> git.kernelconcepts.de Git - karo-tx-uboot.git/commit
usb: dwc2: fix aligned buffer usage
authorStephen Warren <swarren@wwwdotorg.org>
Sun, 8 Mar 2015 17:08:13 +0000 (11:08 -0600)
committerLothar Waßmann <LW@KARO-electronics.de>
Tue, 8 Sep 2015 19:47:07 +0000 (21:47 +0200)
commitca6277751055c3e95da6039061c049a774e25c76
tree731e9554f52ef02938ed3573955a36f4ae83543d
parent9a8075447a5d5855a9e932a51df6d2fbc0cf392c
usb: dwc2: fix aligned buffer usage

The original aligned_buffer usage:
a) Uselessly copied data into the aligned buffer even for IN
   transactions. Fix this my making the copy conditional.
b) Always programmed the HW to transfer to/from the start of the aligned
   buffer. This worked fine for OUT transactions since the memcpy copied
   the OUT data to this location too. However, for large IN transactions,
   since the copy from the aligned buffer to the "client" buffer was
   deferred until after all chunks were transferred. it resulted in each
   chunk's transfer over-writing the data for the first transfer. Fix
   this by copying IN data as soon as it's received.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
drivers/usb/host/dwc2.c