linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
@ 2019-10-29 12:24 Sanket Parmar
  2019-10-29 12:26 ` Roger Quadros
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Sanket Parmar @ 2019-10-29 12:24 UTC (permalink / raw)
  To: gregkh, felipe.balbi
  Cc: sparmar, pawell, linux-usb, rogerq, linux-kernel, kurahul,
	peter.chen, nsekhar

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 <sparmar@cadence.com>
---
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


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

* Re: [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
  2019-10-29 12:24 [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading Sanket Parmar
@ 2019-10-29 12:26 ` Roger Quadros
  2019-10-30  3:00 ` Peter Chen
  2019-10-30 11:40 ` Felipe Balbi
  2 siblings, 0 replies; 5+ messages in thread
From: Roger Quadros @ 2019-10-29 12:26 UTC (permalink / raw)
  To: Sanket Parmar, gregkh, felipe.balbi
  Cc: pawell, linux-usb, linux-kernel, kurahul, peter.chen, nsekhar



On 29/10/2019 14:24, 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 <sparmar@cadence.com>

Reviewed-by: Roger Quadros <rogerq@ti.com>

> ---
> 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 */
> 

-- 
cheers,
-roger
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki

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

* Re: [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
  2019-10-29 12:24 [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading Sanket Parmar
  2019-10-29 12:26 ` Roger Quadros
@ 2019-10-30  3:00 ` Peter Chen
  2019-10-30 11:40 ` Felipe Balbi
  2 siblings, 0 replies; 5+ messages in thread
From: Peter Chen @ 2019-10-30  3:00 UTC (permalink / raw)
  To: Sanket Parmar
  Cc: gregkh, felipe.balbi, pawell, linux-usb, rogerq, linux-kernel,
	kurahul, nsekhar

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 <sparmar@cadence.com>
> ---
> 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 <peter.chen@nxp.com>

-- 

Thanks,
Peter Chen

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

* Re: [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
  2019-10-29 12:24 [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading Sanket Parmar
  2019-10-29 12:26 ` Roger Quadros
  2019-10-30  3:00 ` Peter Chen
@ 2019-10-30 11:40 ` Felipe Balbi
  2019-10-30 11:51   ` Greg KH
  2 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2019-10-30 11:40 UTC (permalink / raw)
  To: Sanket Parmar, gregkh
  Cc: sparmar, pawell, linux-usb, rogerq, linux-kernel, kurahul,
	peter.chen, nsekhar


Hi Greg,

Sanket Parmar <sparmar@cadence.com> 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 <sparmar@cadence.com>

if you want to take this as a patch:

Acked-by: Felipe Balbi <balbi@kernel.org>

> ---
> 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

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

* Re: [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading
  2019-10-30 11:40 ` Felipe Balbi
@ 2019-10-30 11:51   ` Greg KH
  0 siblings, 0 replies; 5+ messages in thread
From: Greg KH @ 2019-10-30 11:51 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Sanket Parmar, pawell, linux-usb, rogerq, linux-kernel, kurahul,
	peter.chen, nsekhar

On Wed, Oct 30, 2019 at 01:40:05PM +0200, Felipe Balbi wrote:
> 
> Hi Greg,
> 
> Sanket Parmar <sparmar@cadence.com> 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 <sparmar@cadence.com>
> 
> if you want to take this as a patch:
> 
> Acked-by: Felipe Balbi <balbi@kernel.org>

Thanks, will queue it up.

greg k-h

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

end of thread, other threads:[~2019-10-30 11:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-29 12:24 [PATCH] usb: cdns3: gadget: reset EP_CLAIMED flag while unloading Sanket Parmar
2019-10-29 12:26 ` Roger Quadros
2019-10-30  3:00 ` Peter Chen
2019-10-30 11:40 ` Felipe Balbi
2019-10-30 11:51   ` Greg KH

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).