This is a note to let you know that I've just added the patch titled usb: cdns3: Enable TDL_CHK only for OUT ep to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: usb-cdns3-enable-tdl_chk-only-for-out-ep.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From d6eef886903c4bb5af41b9a31d4ba11dc7a6f8e8 Mon Sep 17 00:00:00 2001 From: Sanket Parmar <sparmar@xxxxxxxxxxx> Date: Mon, 17 May 2021 17:05:12 +0200 Subject: usb: cdns3: Enable TDL_CHK only for OUT ep From: Sanket Parmar <sparmar@xxxxxxxxxxx> commit d6eef886903c4bb5af41b9a31d4ba11dc7a6f8e8 upstream. ZLP gets stuck if TDL_CHK bit is set and TDL_FROM_TRB is used as TDL source for IN endpoints. To fix it, TDL_CHK is only enabled for OUT endpoints. Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver") Reported-by: Aswath Govindraju <a-govindraju@xxxxxx> Signed-off-by: Sanket Parmar <sparmar@xxxxxxxxxxx> Link: https://lore.kernel.org/r/1621263912-13175-1-git-send-email-sparmar@xxxxxxxxxxx Signed-off-by: Peter Chen <peter.chen@xxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- drivers/usb/cdns3/gadget.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) --- a/drivers/usb/cdns3/gadget.c +++ b/drivers/usb/cdns3/gadget.c @@ -2006,7 +2006,7 @@ static void cdns3_configure_dmult(struct else mask = BIT(priv_ep->num); - if (priv_ep->type != USB_ENDPOINT_XFER_ISOC) { + if (priv_ep->type != USB_ENDPOINT_XFER_ISOC && !priv_ep->dir) { cdns3_set_register_bit(®s->tdl_from_trb, mask); cdns3_set_register_bit(®s->tdl_beh, mask); cdns3_set_register_bit(®s->tdl_beh2, mask); @@ -2045,15 +2045,13 @@ int cdns3_ep_config(struct cdns3_endpoin case USB_ENDPOINT_XFER_INT: ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_INT); - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || - priv_dev->dev_ver > DEV_VER_V2) + if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir) ep_cfg |= EP_CFG_TDL_CHK; break; case USB_ENDPOINT_XFER_BULK: ep_cfg = EP_CFG_EPTYPE(USB_ENDPOINT_XFER_BULK); - if ((priv_dev->dev_ver == DEV_VER_V2 && !priv_ep->dir) || - priv_dev->dev_ver > DEV_VER_V2) + if (priv_dev->dev_ver >= DEV_VER_V2 && !priv_ep->dir) ep_cfg |= EP_CFG_TDL_CHK; break; default: Patches currently in stable-queue which might be from sparmar@xxxxxxxxxxx are queue-5.10/usb-cdns3-enable-tdl_chk-only-for-out-ep.patch