]> git.baikalelectronics.ru Git - kernel.git/commit
usb: dwc2: Fix DMA cache alignment issues
authorMartin Schiller <ms@dev.tdt.de>
Mon, 18 Feb 2019 06:37:30 +0000 (07:37 +0100)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Thu, 6 Jun 2019 10:51:57 +0000 (13:51 +0300)
commit9c05039f677a2fc80186aaa9b13f5790a2d67827
tree5db2d2a943d82aad44d9b1081016041d233b122c
parent97533730cde7366bff859bd27851e5fba7652f88
usb: dwc2: Fix DMA cache alignment issues

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: 02c6f8088e83 ("usb: dwc2: host: Get aligned DMA in a more supported way")
Fixes: 483162ee86ad ("usb: dwc2: Fix DMA alignment to start at allocated boundary")
Cc: <stable@vger.kernel.org>
Tested-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/dwc2/hcd.c