linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: cdns3: fix issue with rearming ISO OUT endpoint
@ 2022-08-25  6:21 Pawel Laszczak
  2022-08-29  2:11 ` Peter Chen
  0 siblings, 1 reply; 2+ messages in thread
From: Pawel Laszczak @ 2022-08-25  6:21 UTC (permalink / raw)
  To: peter.chen
  Cc: linux-usb, gregkh, felipe.balbi, rogerq, a-govindraju,
	linux-kernel, Pawel Laszczak, stable

ISO OUT endpoint is enabled during queuing first usb request
in transfer ring and disabled when TRBERR is reported by controller.
After TRBERR and before next transfer added to TR driver must again
reenable endpoint but does not.
To solve this issue during processing TRBERR event driver must
set the flag EP_UPDATE_EP_TRBADDR in priv_ep->flags field.

Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
cc: <stable@vger.kernel.org>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
---
 drivers/usb/cdns3/cdns3-gadget.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
index 682ceba25765..fa8263951e63 100644
--- a/drivers/usb/cdns3/cdns3-gadget.c
+++ b/drivers/usb/cdns3/cdns3-gadget.c
@@ -1689,6 +1689,7 @@ static int cdns3_check_ep_interrupt_proceed(struct cdns3_endpoint *priv_ep)
 				ep_cfg &= ~EP_CFG_ENABLE;
 				writel(ep_cfg, &priv_dev->regs->ep_cfg);
 				priv_ep->flags &= ~EP_QUIRK_ISO_OUT_EN;
+				priv_ep->flags |= EP_UPDATE_EP_TRBADDR;
 			}
 			cdns3_transfer_completed(priv_dev, priv_ep);
 		} else if (!(priv_ep->flags & EP_STALLED) &&
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: cdns3: fix issue with rearming ISO OUT endpoint
  2022-08-25  6:21 [PATCH] usb: cdns3: fix issue with rearming ISO OUT endpoint Pawel Laszczak
@ 2022-08-29  2:11 ` Peter Chen
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Chen @ 2022-08-29  2:11 UTC (permalink / raw)
  To: Pawel Laszczak
  Cc: linux-usb, gregkh, felipe.balbi, rogerq, a-govindraju,
	linux-kernel, stable

On 22-08-25 08:21:37, Pawel Laszczak wrote:
> ISO OUT endpoint is enabled during queuing first usb request
> in transfer ring and disabled when TRBERR is reported by controller.
> After TRBERR and before next transfer added to TR driver must again
> reenable endpoint but does not.
> To solve this issue during processing TRBERR event driver must
> set the flag EP_UPDATE_EP_TRBADDR in priv_ep->flags field.
> 
> Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
> cc: <stable@vger.kernel.org>
> Signed-off-by: Pawel Laszczak <pawell@cadence.com>

Acked-by: Peter Chen <peter.chen@kernel.org>

> ---
>  drivers/usb/cdns3/cdns3-gadget.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
> index 682ceba25765..fa8263951e63 100644
> --- a/drivers/usb/cdns3/cdns3-gadget.c
> +++ b/drivers/usb/cdns3/cdns3-gadget.c
> @@ -1689,6 +1689,7 @@ static int cdns3_check_ep_interrupt_proceed(struct cdns3_endpoint *priv_ep)
>  				ep_cfg &= ~EP_CFG_ENABLE;
>  				writel(ep_cfg, &priv_dev->regs->ep_cfg);
>  				priv_ep->flags &= ~EP_QUIRK_ISO_OUT_EN;
> +				priv_ep->flags |= EP_UPDATE_EP_TRBADDR;
>  			}
>  			cdns3_transfer_completed(priv_dev, priv_ep);
>  		} else if (!(priv_ep->flags & EP_STALLED) &&
> -- 
> 2.25.1
> 

-- 

Thanks,
Peter Chen

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-08-29  2:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-25  6:21 [PATCH] usb: cdns3: fix issue with rearming ISO OUT endpoint Pawel Laszczak
2022-08-29  2:11 ` Peter Chen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).