usb: cdnsp: fix lack of ZLP for ep0
authorPawel Laszczak <pawell@cadence.com>
Tue, 22 Nov 2022 08:51:38 +0000 (03:51 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 31 Dec 2022 12:14:46 +0000 (13:14 +0100)
commitfcacd970e011c5801217f0d228523935f1d15865
tree35c02d2304b4ad4ecd3f2c1c7a2765ba9cc913fc
parentbcac79df08388a022a919b536a24fe801f316424
usb: cdnsp: fix lack of ZLP for ep0

commit ae423ef5d095e09970f52c08020fdbf7f9d87c22 upstream.

Patch implements the handling of ZLP for control transfer.
To send the ZLP driver must prepare the extra TRB in TD with
length set to zero and TRB type to TRB_NORMAL.
The first TRB must have set TRB_CHAIN flag, TD_SIZE = 1
and TRB type to TRB_DATA.

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