From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Mon, 9 Mar 2015 13:46:21 +0100 Subject: [U-Boot] [PATCH V2 1/2] usb: dwc2: fix aligned buffer usage In-Reply-To: <1425834494-24649-1-git-send-email-swarren@wwwdotorg.org> References: <1425834494-24649-1-git-send-email-swarren@wwwdotorg.org> Message-ID: <201503091346.21794.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sunday, March 08, 2015 at 06:08:13 PM, Stephen Warren wrote: > 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 Applied to u-boot-usb/topic/dwc2, thanks. I would like to see more testing from others if possible, otherwise this will go in after 2015.04 if you're fine with that. Best regards, Marek Vasut