kernel_samsung_a53x/drivers/usb/cdns3
Frank Li ead2662c77 usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled
[ Upstream commit 40c304109e866a7dc123661a5c8ca72f6b5e14e0 ]

Supposed DMA cross 4k bounder problem should be fixed at DEV_VER_V2, but
still met problem when do ISO transfer if sg enabled.

Data pattern likes below when sg enabled, package size is 1k and mult is 2
	[UVC Header(8B) ] [data(3k - 8)] ...

The received data at offset 0xd000 will get 0xc000 data, len 0x70. Error
happen position as below pattern:
	0xd000: wrong
	0xe000: wrong
	0xf000: correct
	0x10000: wrong
	0x11000: wrong
	0x12000: correct
	...

To avoid DMA cross 4k bounder at ISO transfer, reduce burst len according
to start DMA address's alignment.

Cc:  <stable@vger.kernel.org>
Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20231224153816.1664687-4-Frank.Li@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-18 12:12:54 +01:00
..
cdns3-imx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdns3-pci-wrap.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cdns3-ti.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
core.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
debug.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
drd.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ep0.c usb: cdns3: Fixes for sparse warnings 2024-11-18 12:12:54 +01:00
gadget-export.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gadget.c usb: cdns3: Fix uvc fail when DMA cross 4k boundery since sg enabled 2024-11-18 12:12:54 +01:00
gadget.h usb: cdns3: fix iso transfer error when mult is not zero 2024-11-18 12:12:54 +01:00
host-export.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
host.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
trace.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00