Re: [PATCH 04/26] usb: gadget: introduce 'enabled' flag in struct usb_ep

2015-09-15 Thread Robert Baldyga
On 09/15/2015 05:43 PM, Felipe Balbi wrote: > On Tue, Sep 15, 2015 at 05:37:27PM +0200, Krzysztof Opasiak wrote: >> Hello, >> >> On 09/15/2015 04:26 PM, Robert Baldyga wrote: >>> This patch introduces 'enabled' flag in struct usb_ep, and modifies >>> usb_ep_enable() and usb_ep_disable() functions

Re: [PATCH 04/26] usb: gadget: introduce 'enabled' flag in struct usb_ep

2015-09-15 Thread Felipe Balbi
Hi, On Tue, Sep 15, 2015 at 05:57:53PM +0200, Robert Baldyga wrote: > On 09/15/2015 05:43 PM, Felipe Balbi wrote: > > On Tue, Sep 15, 2015 at 05:37:27PM +0200, Krzysztof Opasiak wrote: > >> Hello, > >> > >> On 09/15/2015 04:26 PM, Robert Baldyga wrote: > >>> This patch introduces 'enabled' flag

Re: [PATCH 04/26] usb: gadget: introduce 'enabled' flag in struct usb_ep

2015-09-15 Thread Felipe Balbi
Hi, On Tue, Sep 15, 2015 at 06:15:25PM +0200, Krzysztof Opasiak wrote: > >>>+ } > >>>+ > >>>+ return ret; > >>> } > >>> > >> > >>Personally I don't like this convention. In my opinion usb_ep_disable() & > >>usb_ep_enable() should fail if ep is already disabled/enabled. Then in > >>function

Re: [PATCH 04/26] usb: gadget: introduce 'enabled' flag in struct usb_ep

2015-09-15 Thread Krzysztof Opasiak
On 09/15/2015 05:43 PM, Felipe Balbi wrote: On Tue, Sep 15, 2015 at 05:37:27PM +0200, Krzysztof Opasiak wrote: Hello, On 09/15/2015 04:26 PM, Robert Baldyga wrote: This patch introduces 'enabled' flag in struct usb_ep, and modifies usb_ep_enable() and usb_ep_disable() functions to

Re: [PATCH 04/26] usb: gadget: introduce 'enabled' flag in struct usb_ep

2015-09-15 Thread Krzysztof Opasiak
Hello, On 09/15/2015 04:26 PM, Robert Baldyga wrote: This patch introduces 'enabled' flag in struct usb_ep, and modifies usb_ep_enable() and usb_ep_disable() functions to encapsulate endpoint enabled/disabled state. It helps to avoid enabling endpoints which are already enabled, and disabling

Re: [PATCH 04/26] usb: gadget: introduce 'enabled' flag in struct usb_ep

2015-09-15 Thread Felipe Balbi
On Tue, Sep 15, 2015 at 05:37:27PM +0200, Krzysztof Opasiak wrote: > Hello, > > On 09/15/2015 04:26 PM, Robert Baldyga wrote: > >This patch introduces 'enabled' flag in struct usb_ep, and modifies > >usb_ep_enable() and usb_ep_disable() functions to encapsulate endpoint > >enabled/disabled state.

[PATCH 04/26] usb: gadget: introduce 'enabled' flag in struct usb_ep

2015-09-15 Thread Robert Baldyga
This patch introduces 'enabled' flag in struct usb_ep, and modifies usb_ep_enable() and usb_ep_disable() functions to encapsulate endpoint enabled/disabled state. It helps to avoid enabling endpoints which are already enabled, and disabling endpoints which are already disables. >From now USB