linux-stable/drivers/usb/cdns3
Peter Chen 4bf2dd6513 usb: cdns3: gadget: toggle cycle bit before reset endpoint
If there are TRBs pending during reset endpoint operation, the
DMA will advance after reset operation, but it isn't expected,
since the data is not yet available (For OUT, the data is not
yet available). After the data is ready, there won't be any
interrupt since the EP_TRADDR already points to next TRB entry
and doorbell is not set.

To fix it, it toggles cycle bit before reset operation, and restores
it after reset, it could avoid unexpected DMA advance due to
cycle bit is for software during the endpoint reset operation.

Fixes: 7733f6c32e ("usb: cdns3: Add Cadence USB3 DRD Driver")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Cc: stable <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/20200219141455.23257-3-peter.chen@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-04 10:56:26 +01:00
..
cdns3-imx.c usb: cdns3: add NXP imx8qm glue layer 2020-01-15 10:39:22 +01:00
cdns3-pci-wrap.c usb: cdns3: Fix use after free in probe error handling 2019-10-04 11:02:58 +02:00
cdns3-ti.c usb: cdns3: Add TI specific wrapper driver 2019-10-29 12:55:09 +02:00
core.c usb: cdns3: Error out if USB_DR_MODE_UNKNOWN in cdns3_core_init_role() 2019-10-18 12:00:15 -07:00
core.h
debug.h usb: cdns3: fix spelling mistake and rework grammar in text 2020-01-24 09:41:27 +01:00
drd.c
drd.h
ep0.c usb:cdns3: Fix for CV CH9 running with g_zero driver. 2019-10-07 12:56:26 +02:00
gadget-export.h
gadget.c usb: cdns3: gadget: toggle cycle bit before reset endpoint 2020-03-04 10:56:26 +01:00
gadget.h usb: cdns3: Add streams support to cadence USB3 DRD driver 2020-01-15 10:39:22 +01:00
host-export.h usb: cdns3: include host-export,h for cdns3_host_init 2019-10-27 08:58:44 +02:00
host.c usb: cdns3: include host-export,h for cdns3_host_init 2019-10-27 08:58:44 +02:00
Kconfig usb: cdns3: add NXP imx8qm glue layer 2020-01-15 10:39:22 +01:00
Makefile usb: cdns3: add NXP imx8qm glue layer 2020-01-15 10:39:22 +01:00
trace.c
trace.h usb: cdns3: Add streams support to cadence USB3 DRD driver 2020-01-15 10:39:22 +01:00