]> 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)
committerMarek Vasut <marex@denx.de>
Tue, 14 Apr 2015 03:47:59 +0000 (05:47 +0200)
commitd1c880c66c2f4d676afd91ce041a3e66c2ab3fa4
tree22f640f6c559d50905426d99f8633ac8d8984cdf
parent66ffc87586e04d09f259bbca74f05b156d4cc96f
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