FAILED: patch "[PATCH] usb: cdns3: Enable TDL_CHK only for OUT ep" failed to apply to 5.10-stable tree
Subsystems (3)
[email protected]
maintainerThe patch below does not apply to the 5.10-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From d6eef886903c4bb5af41b9a31d4ba11dc7a6f8e8 Mon Sep 17 00:00:00 2001
From: Sanket Parmar <[email protected]>
Date: Mon, 17 May 2021 17:05:12 +0200
Subject: [PATCH] usb: cdns3: Enable TDL_CHK only for OUT ep
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 <[email protected]>
Signed-off-by Sanket Parmar <[email protected]>
Signed-off-by Peter Chen <[email protected]>
drivers/usb/cdns3/cdns3-gadget.c +3 -5
@@ -2007,7 +2007,7 @@ static void cdns3_configure_dmult(struct cdns3_device *priv_dev,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);
@@ -2046,15 +2046,13 @@ int cdns3_ep_config(struct cdns3_endpoint *priv_ep, bool enable)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 :