]> www.infradead.org Git - users/jedix/linux-maple.git/commit
usb: cdnsp: fix for Link TRB with TC
authorPawel Laszczak <pawell@cadence.com>
Wed, 21 Aug 2024 06:07:42 +0000 (06:07 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Aug 2024 02:07:46 +0000 (10:07 +0800)
commit740f2e2791b98e47288b3814c83a3f566518fed2
tree1e835216b40360fc9c42fc6979b1e6d44a1e824c
parentcd4897bfd14f6a5388b21ba45a066541a0425199
usb: cdnsp: fix for Link TRB with TC

Stop Endpoint command on LINK TRB with TC bit set to 1 causes that
internal cycle bit can have incorrect state after command complete.
In consequence empty transfer ring can be incorrectly detected
when EP is resumed.
NOP TRB before LINK TRB avoid such scenario. Stop Endpoint command
is then on NOP TRB and internal cycle bit is not changed and have
correct value.

Fixes: 3d82904559f4 ("usb: cdnsp: cdns3 Add main part of Cadence USBSSP DRD Driver")
cc: <stable@vger.kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Reviewed-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/PH7PR07MB953878279F375CCCE6C6F40FDD8E2@PH7PR07MB9538.namprd07.prod.outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/cdns3/cdnsp-gadget.h
drivers/usb/cdns3/cdnsp-ring.c