diff options
author | Pawel Laszczak | 2022-11-15 05:00:39 -0500 |
---|---|---|
committer | Greg Kroah-Hartman | 2023-01-24 07:24:38 +0100 |
commit | 34f207ed1c109c0a6aa5bc61cdab6080b297ec1f (patch) | |
tree | db932c51f82e59ef5ab9c21e73c2e23dd64b8149 /drivers/usb/musb | |
parent | feb7840e57ca2b370421a3120ee9d029b61477b2 (diff) |
usb: cdns3: remove fetched trb from cache before dequeuing
commit 1301c7b9f7efad2f11ef924e317c18ebd714fc9a upstream.
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: 7733f6c32e36 ("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>
Diffstat (limited to 'drivers/usb/musb')
0 files changed, 0 insertions, 0 deletions