linux/drivers/usb/cdns3
Pawel Laszczak 23115ca7d2 usb: cdns3: fix race condition before setting doorbell
[ Upstream commit b69ec50b3e ]

For DEV_VER_V3 version there exist race condition between clearing
ep_sts.EP_STS_TRBERR and setting ep_cmd.EP_CMD_DRDY bit.
Setting EP_CMD_DRDY will be ignored by controller when
EP_STS_TRBERR is set. So, between these two instructions we have
a small time gap in which the EP_STSS_TRBERR can be set. In such case
the transfer will not start after setting doorbell.

Fixes: 7733f6c32e ("usb: cdns3: Add Cadence USB3 DRD Driver")
cc: <stable@vger.kernel.org> # 5.12.x
Tested-by: Aswath Govindraju <a-govindraju@ti.com>
Reviewed-by: Aswath Govindraju <a-govindraju@ti.com>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20210907062619.34622-1-pawell@gli-login.cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-10-06 15:55:46 +02:00
..
cdns3-imx.c usb: cdns3: imx: fix can't create core device the second time issue 2021-01-27 11:55:17 +01:00
cdns3-pci-wrap.c
cdns3-ti.c USB: Replace HTTP links with HTTPS ones 2020-07-21 13:41:57 +02:00
core.c usb: cdns3: fix NULL pointer dereference on no platform data 2021-03-11 14:17:26 +01:00
core.h usb: cdns3: add quirk for enable runtime pm by default 2021-03-11 14:17:25 +01:00
debug.h
drd.c usb: cdns3: drd: call PHY .set_mode accordingly 2020-10-02 09:57:40 +03:00
drd.h usb: cdns3: Enable workaround for USB2.0 PHY Rx compliance test PHY lockup 2020-10-02 09:57:39 +03:00
ep0.c usb: cdns3: Fixed incorrect gadget state 2021-08-12 13:22:10 +02:00
gadget-export.h
gadget.c usb: cdns3: fix race condition before setting doorbell 2021-10-06 15:55:46 +02:00
gadget.h usb: cdns3: Fix on-chip memory overflow issue 2020-10-30 11:40:54 +08:00
host-export.h usb: cdns3: host: add .suspend_quirk for xhci-plat.c 2021-03-11 14:17:25 +01:00
host.c usb: cdns3: fix NULL pointer dereference on no platform data 2021-03-11 14:17:26 +01:00
Kconfig
Makefile
trace.c
trace.h usb: cdns3: trace: fix some endian issues 2020-07-09 10:13:07 +03:00