lkml.org 
[lkml]   [2019]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] usb: dwc2: Fix DMA cache alignment issues
From
Date
On 5/29/2019 10:31 PM, Doug Anderson wrote:
> Hi,
>
> On Sun, Feb 17, 2019 at 10:37 PM Martin Schiller <ms@dev.tdt.de> wrote:
>>
>> Insert a padding between data and the stored_xfer_buffer pointer to
>> ensure they are not on the same cache line.
>>
>> Otherwise, the stored_xfer_buffer gets corrupted for IN URBs on
>> non-cache-coherent systems. (In my case: Lantiq xRX200 MIPS)
>>
>> Fixes: 3bc04e28a030 ("usb: dwc2: host: Get aligned DMA in a more supported way")
>> Fixes: 56406e017a88 ("usb: dwc2: Fix DMA alignment to start at allocated boundary")
>> Signed-off-by: Martin Schiller <ms@dev.tdt.de>
>> ---
>> drivers/usb/dwc2/hcd.c | 10 +++++++---
>> 1 file changed, 7 insertions(+), 3 deletions(-)
>
> This patch has been in the back of my mind for a while bug I never got
> around to it. Today I was debugging memory corruption problems when
> using a webcam on dwc2 on rk3288-veyron-jerry. This patch appears to
> solve my problems nicely. Thanks!
>
> Tested-by: Douglas Anderson <dianders@chromium.org>
> Reviewed-by: Douglas Anderson <dianders@chromium.org>
> Cc: <stable@vger.kernel.org>
>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>

\
 
 \ /
  Last update: 2019-05-30 12:30    [W:0.098 / U:0.572 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site