linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding
@ 2015-09-07 20:19 Sylvain Rochet
  2015-09-18 14:22 ` Nicolas Ferre
  0 siblings, 1 reply; 5+ messages in thread
From: Sylvain Rochet @ 2015-09-07 20:19 UTC (permalink / raw)
  To: Felipe Balbi, Boris Brezillon, Nicolas Ferre, Alexandre Belloni,
	Robert Baldyga, linux-kernel, linux-arm-kernel,
	Jean-Christophe Plagniol-Villard, Wenyou Yang, Josh Wu,
	Ludovic Desroches
  Cc: Sylvain Rochet

The recently added endpoint capabilities flags verification breaks Atmel
USBA because the endpoint configuration was only added when the driver
is bound using the legacy pdata interface.

Convert endpoint configuration to new capabilities model when driver is
bound to a device tree as well.

Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
---
 drivers/usb/gadget/udc/atmel_usba_udc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 2cbbb46..c2ea5e1 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -2002,6 +2002,17 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 		ep->udc = udc;
 		INIT_LIST_HEAD(&ep->queue);
 
+		if (ep->index == 0) {
+			ep->ep.caps.type_control = true;
+		} else {
+			ep->ep.caps.type_iso = ep->can_isoc;
+			ep->ep.caps.type_bulk = true;
+			ep->ep.caps.type_int = true;
+		}
+
+		ep->ep.caps.dir_in = true;
+		ep->ep.caps.dir_out = true;
+
 		if (i)
 			list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
 
-- 
2.5.1


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

* Re: [PATCH linux-next] usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding
  2015-09-07 20:19 [PATCH linux-next] usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding Sylvain Rochet
@ 2015-09-18 14:22 ` Nicolas Ferre
  2015-09-18 14:27   ` Felipe Balbi
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Ferre @ 2015-09-18 14:22 UTC (permalink / raw)
  To: Sylvain Rochet, Felipe Balbi, Robert Baldyga, Greg Kroah-Hartman
  Cc: Boris Brezillon, Alexandre Belloni, linux-kernel,
	linux-arm-kernel, Jean-Christophe Plagniol-Villard, Wenyou Yang,
	Josh Wu, Ludovic Desroches

Le 07/09/2015 22:19, Sylvain Rochet a écrit :
> The recently added endpoint capabilities flags verification breaks Atmel
> USBA because the endpoint configuration was only added when the driver
> is bound using the legacy pdata interface.
> 
> Convert endpoint configuration to new capabilities model when driver is
> bound to a device tree as well.
> 
> Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>

Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>

With this additional tag:
Fixes: 47bef3865115 ("usb: gadget: atmel_usba_udc: add ep capabilities support")

Felipe, Greg,

It is considered as a fix for 4.3. Can you please queue it for the "4.3-rc" phase?

Thanks, bye.

> ---
>  drivers/usb/gadget/udc/atmel_usba_udc.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
> index 2cbbb46..c2ea5e1 100644
> --- a/drivers/usb/gadget/udc/atmel_usba_udc.c
> +++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
> @@ -2002,6 +2002,17 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
>  		ep->udc = udc;
>  		INIT_LIST_HEAD(&ep->queue);
>  
> +		if (ep->index == 0) {
> +			ep->ep.caps.type_control = true;
> +		} else {
> +			ep->ep.caps.type_iso = ep->can_isoc;
> +			ep->ep.caps.type_bulk = true;
> +			ep->ep.caps.type_int = true;
> +		}
> +
> +		ep->ep.caps.dir_in = true;
> +		ep->ep.caps.dir_out = true;
> +
>  		if (i)
>  			list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
>  
> 


-- 
Nicolas Ferre

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

* Re: [PATCH linux-next] usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding
  2015-09-18 14:22 ` Nicolas Ferre
@ 2015-09-18 14:27   ` Felipe Balbi
  2015-09-18 14:58     ` [PATCH] " Nicolas Ferre
  0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2015-09-18 14:27 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: Sylvain Rochet, Felipe Balbi, Robert Baldyga, Greg Kroah-Hartman,
	Boris Brezillon, Alexandre Belloni, linux-kernel,
	linux-arm-kernel, Jean-Christophe Plagniol-Villard, Wenyou Yang,
	Josh Wu, Ludovic Desroches

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

On Fri, Sep 18, 2015 at 04:22:07PM +0200, Nicolas Ferre wrote:
> Le 07/09/2015 22:19, Sylvain Rochet a écrit :
> > The recently added endpoint capabilities flags verification breaks Atmel
> > USBA because the endpoint configuration was only added when the driver
> > is bound using the legacy pdata interface.
> > 
> > Convert endpoint configuration to new capabilities model when driver is
> > bound to a device tree as well.
> > 
> > Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
> 
> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> 
> With this additional tag:
> Fixes: 47bef3865115 ("usb: gadget: atmel_usba_udc: add ep capabilities support")
> 
> Felipe, Greg,
> 
> It is considered as a fix for 4.3. Can you please queue it for the "4.3-rc" phase?

sure thing, just, please, resend with linux-usb in Cc :-)

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

* [PATCH] usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding
  2015-09-18 14:27   ` Felipe Balbi
@ 2015-09-18 14:58     ` Nicolas Ferre
  2015-09-18 14:59       ` Felipe Balbi
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Ferre @ 2015-09-18 14:58 UTC (permalink / raw)
  To: balbi, sylvain.rochet, r.baldyga, gregkh
  Cc: boris.brezillon, alexandre.belloni, linux-kernel,
	linux-arm-kernel, linux-usb, Nicolas Ferre

From: Sylvain Rochet <sylvain.rochet@finsecur.com>

The recently added endpoint capabilities flags verification breaks Atmel
USBA because the endpoint configuration was only added when the driver
is bound using the legacy pdata interface.

Convert endpoint configuration to new capabilities model when driver is
bound to a device tree as well.

Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
Fixes: 47bef3865115 ("usb: gadget: atmel_usba_udc: add ep capabilities support")
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
Felipe,

As you've just requested, here is the same patch sent to linux-usb ml. I had
added the "Fixes" and my SoB tags.

For the record:
It is considered as a fix for 4.3. Can you please queue it for the "4.3-rc"
phase?

Bye,


 drivers/usb/gadget/udc/atmel_usba_udc.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index 3dfada8d6061..f0f2b066ac08 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -2002,6 +2002,17 @@ static struct usba_ep * atmel_udc_of_init(struct platform_device *pdev,
 		ep->udc = udc;
 		INIT_LIST_HEAD(&ep->queue);
 
+		if (ep->index == 0) {
+			ep->ep.caps.type_control = true;
+		} else {
+			ep->ep.caps.type_iso = ep->can_isoc;
+			ep->ep.caps.type_bulk = true;
+			ep->ep.caps.type_int = true;
+		}
+
+		ep->ep.caps.dir_in = true;
+		ep->ep.caps.dir_out = true;
+
 		if (i)
 			list_add_tail(&ep->ep.ep_list, &udc->gadget.ep_list);
 
-- 
2.1.3


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

* Re: [PATCH] usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding
  2015-09-18 14:58     ` [PATCH] " Nicolas Ferre
@ 2015-09-18 14:59       ` Felipe Balbi
  0 siblings, 0 replies; 5+ messages in thread
From: Felipe Balbi @ 2015-09-18 14:59 UTC (permalink / raw)
  To: Nicolas Ferre
  Cc: balbi, sylvain.rochet, r.baldyga, gregkh, boris.brezillon,
	alexandre.belloni, linux-kernel, linux-arm-kernel, linux-usb

[-- Attachment #1: Type: text/plain, Size: 977 bytes --]

On Fri, Sep 18, 2015 at 04:58:28PM +0200, Nicolas Ferre wrote:
> From: Sylvain Rochet <sylvain.rochet@finsecur.com>
> 
> The recently added endpoint capabilities flags verification breaks Atmel
> USBA because the endpoint configuration was only added when the driver
> is bound using the legacy pdata interface.
> 
> Convert endpoint configuration to new capabilities model when driver is
> bound to a device tree as well.
> 
> Signed-off-by: Sylvain Rochet <sylvain.rochet@finsecur.com>
> Fixes: 47bef3865115 ("usb: gadget: atmel_usba_udc: add ep capabilities support")
> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> ---
> Felipe,
> 
> As you've just requested, here is the same patch sent to linux-usb ml. I had
> added the "Fixes" and my SoB tags.
> 
> For the record:
> It is considered as a fix for 4.3. Can you please queue it for the "4.3-rc"
> phase?

thanks, I'll take it for -rc3 (already sent my -rc2 pull request).

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

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

end of thread, other threads:[~2015-09-18 15:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-09-07 20:19 [PATCH linux-next] usb: gadget: atmel_usba_udc: add ep capabilities support on device tree binding Sylvain Rochet
2015-09-18 14:22 ` Nicolas Ferre
2015-09-18 14:27   ` Felipe Balbi
2015-09-18 14:58     ` [PATCH] " Nicolas Ferre
2015-09-18 14:59       ` Felipe Balbi

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