Pawel Laszczak b69ec50b3e usb: cdns3: fix race condition before setting doorbell
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: 7733f6c32e36 ("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>
2021-09-14 10:32:41 +02:00
..
2021-05-21 20:05:40 +02:00
2021-08-09 08:52:46 +02:00
2021-09-01 09:59:34 -07:00
2021-09-01 09:59:34 -07:00
2020-09-16 12:42:10 +02:00
2021-08-26 13:41:52 +02:00
2021-08-16 18:57:19 +02:00
2021-09-01 20:11:41 +02:00
2021-09-02 15:09:46 -07:00