linux/drivers/usb/cdns3
Pawel Laszczak 1301c7b9f7 usb: cdns3: remove fetched trb from cache before dequeuing
After doorbell DMA fetches the TRB. If during dequeuing request
driver changes NORMAL TRB to LINK TRB but doesn't delete it from
controller cache then controller will handle cached TRB and packet
can be lost.

The example scenario for this issue looks like:
1. queue request - set doorbell
2. dequeue request
3. send OUT data packet from host
4. Device will accept this packet which is unexpected
5. queue new request - set doorbell
6. Device lost the expected packet.

By setting DFLUSH controller clears DRDY bit and stop DMA transfer.

Fixes: 7733f6c32e ("usb: cdns3: Add Cadence USB3 DRD Driver")
cc: <stable@vger.kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Acked-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20221115100039.441295-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-01-17 16:35:47 +01:00
..
cdns3-debug.h
cdns3-ep0.c
cdns3-gadget.c usb: cdns3: remove fetched trb from cache before dequeuing 2023-01-17 16:35:47 +01:00
cdns3-gadget.h usb: cdns3: allocate TX FIFO size according to composite EP number 2022-05-19 18:14:29 +02:00
cdns3-imx.c
cdns3-pci-wrap.c
cdns3-plat.c usb: cdns3: remove dead code 2022-09-27 10:36:36 +02:00
cdns3-ti.c
cdns3-trace.c
cdns3-trace.h
cdnsp-debug.h
cdnsp-ep0.c
cdnsp-gadget.c usb: cdnsp: Fix issue with Clear Feature Halt Endpoint 2022-11-22 16:51:26 +01:00
cdnsp-gadget.h
cdnsp-mem.c
cdnsp-pci.c usb: cdns3: adjust the partial logic of cdnsp_pci_remove 2022-10-22 13:21:40 +02:00
cdnsp-ring.c usb: cdnsp: fix lack of ZLP for ep0 2022-11-29 08:56:09 +01:00
cdnsp-trace.c
cdnsp-trace.h
core.c
core.h
drd.c
drd.h
gadget-export.h
host-export.h
host.c usb: cdns3: host: fix endless superspeed hub port reset 2022-11-09 12:35:13 +01:00
Kconfig
Makefile