usb: cdns3: Fix issue for clear halt endpoint
authorPawel Laszczak <pawell@cadence.com>
Tue, 29 Mar 2022 08:46:05 +0000 (10:46 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 9 Apr 2022 15:18:00 +0000 (17:18 +0200)
commitb3fa25de31fb7e9afebe9599b8ff32eda13d7c94
tree07b0b3c3230accf581fda41fa3f2764174e6a6fa
parent33597f0c48be0836854d43c577e35c8f8a765a7d
usb: cdns3: Fix issue for clear halt endpoint

Path fixes bug which occurs during resetting endpoint in
__cdns3_gadget_ep_clear_halt function. During resetting endpoint
controller will change HW/DMA owned TRB. It set Abort flag in
trb->control and will change trb->length field. If driver want
to use the aborted trb it must update the changed field in
TRB.

Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
cc: <stable@vger.kernel.org>
Acked-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20220329084605.4022-1-pawell@cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdns3-gadget.c