EP_CLAIMED flag is used to track the claimed endpoints. While unloading the
module, Reset EP_CLAIMED flag for all enabled endpoints. So that it can be
reused.
Signed-off-by: Sanket Parmar <[email protected]>
---
Hi Greg/Felipe,
This can be used for -rc as it is bug fix.
Regards,
Sanket
drivers/usb/cdns3/gadget.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
index 9050b380ab83..2fb78322ed3c 100644
--- a/drivers/usb/cdns3/gadget.c
+++ b/drivers/usb/cdns3/gadget.c
@@ -2381,6 +2381,8 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
writel(EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
!(val & EP_CMD_EPRST), 1, 100);
+
+ priv_ep->flags &= ~EP_CLAIMED;
}
/* disable interrupt for device */
--
2.17.1
On 19-10-29 12:24:41, Sanket Parmar wrote:
> EP_CLAIMED flag is used to track the claimed endpoints. While unloading the
> module, Reset EP_CLAIMED flag for all enabled endpoints. So that it can be
> reused.
>
> Signed-off-by: Sanket Parmar <[email protected]>
> ---
> Hi Greg/Felipe,
>
> This can be used for -rc as it is bug fix.
>
> Regards,
> Sanket
>
> drivers/usb/cdns3/gadget.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
> index 9050b380ab83..2fb78322ed3c 100644
> --- a/drivers/usb/cdns3/gadget.c
> +++ b/drivers/usb/cdns3/gadget.c
> @@ -2381,6 +2381,8 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
> writel(EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
> readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
> !(val & EP_CMD_EPRST), 1, 100);
> +
> + priv_ep->flags &= ~EP_CLAIMED;
> }
>
> /* disable interrupt for device */
> --
Acked-by: Peter Chen <[email protected]>
--
Thanks,
Peter Chen
Hi Greg,
Sanket Parmar <[email protected]> writes:
> EP_CLAIMED flag is used to track the claimed endpoints. While unloading the
> module, Reset EP_CLAIMED flag for all enabled endpoints. So that it can be
> reused.
>
> Signed-off-by: Sanket Parmar <[email protected]>
if you want to take this as a patch:
Acked-by: Felipe Balbi <[email protected]>
> ---
> Hi Greg/Felipe,
>
> This can be used for -rc as it is bug fix.
>
> Regards,
> Sanket
>
> drivers/usb/cdns3/gadget.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/usb/cdns3/gadget.c b/drivers/usb/cdns3/gadget.c
> index 9050b380ab83..2fb78322ed3c 100644
> --- a/drivers/usb/cdns3/gadget.c
> +++ b/drivers/usb/cdns3/gadget.c
> @@ -2381,6 +2381,8 @@ static int cdns3_gadget_udc_stop(struct usb_gadget *gadget)
> writel(EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
> readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
> !(val & EP_CMD_EPRST), 1, 100);
> +
> + priv_ep->flags &= ~EP_CLAIMED;
> }
>
> /* disable interrupt for device */
> --
> 2.17.1
>
--
balbi
On Wed, Oct 30, 2019 at 01:40:05PM +0200, Felipe Balbi wrote:
>
> Hi Greg,
>
> Sanket Parmar <[email protected]> writes:
>
> > EP_CLAIMED flag is used to track the claimed endpoints. While unloading the
> > module, Reset EP_CLAIMED flag for all enabled endpoints. So that it can be
> > reused.
> >
> > Signed-off-by: Sanket Parmar <[email protected]>
>
> if you want to take this as a patch:
>
> Acked-by: Felipe Balbi <[email protected]>
Thanks, will queue it up.
greg k-h