WSL2-Linux-Kernel/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
..
Kconfig
Makefile
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 usb: cdnsp: fix cdnsp_decode_trb function to properly handle ret value 2022-01-26 13:59:20 +01:00
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 usb: cdnsp: Fix issue in cdnsp_log_ep trace event 2021-12-13 15:23:24 +01:00
core.c
core.h headers/prep: Fix non-standard header section: drivers/usb/cdns3/core.h 2022-01-05 16:17:31 +01:00
drd.c usb: cdnsp: Fix segmentation fault in cdns_lost_power function 2022-01-26 14:11:16 +01:00
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