Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Oliver Neukum
On Wednesday 10 April 2013 10:01:20 Dan Williams wrote: > On Wed, 2013-04-10 at 15:58 +0200, Oliver Neukum wrote: > > On Wednesday 10 April 2013 08:54:43 Dan Williams wrote: > > > > The refcounting is very good. Just don't mess around with "force" > > > > > > That's easy to do if the helpers aren'

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Bjørn Mork
Dan Williams writes: > On Wed, 2013-04-10 at 15:25 +0200, Bjørn Mork wrote: >> Dan Williams writes: >> >> > +int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags) >> > +{ >> > + /* Only drivers that implement a status hook should call this */ >> > + BUG_ON(dev->interrupt == NULL); >> >

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Dan Williams
On Wed, 2013-04-10 at 15:58 +0200, Oliver Neukum wrote: > On Wednesday 10 April 2013 08:54:43 Dan Williams wrote: > > > The refcounting is very good. Just don't mess around with "force" > > > > That's easy to do if the helpers aren't used for suspend/resume, which > > is what I had previously in m

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Oliver Neukum
On Wednesday 10 April 2013 08:54:43 Dan Williams wrote: > > The refcounting is very good. Just don't mess around with "force" > > That's easy to do if the helpers aren't used for suspend/resume, which > is what I had previously in my v2 patches until Ming suggested that I > use the helpers there.

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Dan Williams
On Wed, 2013-04-10 at 15:29 +0200, Oliver Neukum wrote: > On Wednesday 10 April 2013 08:18:57 Dan Williams wrote: > > On Wed, 2013-04-10 at 15:06 +0200, Oliver Neukum wrote: > > > On Wednesday 10 April 2013 07:49:11 Dan Williams wrote: > > > > On Wed, 2013-04-10 at 09:23 +0200, Oliver Neukum wrote:

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Oliver Neukum
On Wednesday 10 April 2013 15:25:49 Bjørn Mork wrote: > Dan Williams writes: > > > +int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags) > > +{ > > + /* Only drivers that implement a status hook should call this */ > > + BUG_ON(dev->interrupt == NULL); > > > I still don't think there

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Oliver Neukum
On Wednesday 10 April 2013 08:18:57 Dan Williams wrote: > On Wed, 2013-04-10 at 15:06 +0200, Oliver Neukum wrote: > > On Wednesday 10 April 2013 07:49:11 Dan Williams wrote: > > > On Wed, 2013-04-10 at 09:23 +0200, Oliver Neukum wrote: > > > > On Tuesday 09 April 2013 18:02:27 Dan Williams wrote: >

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Bjørn Mork
Dan Williams writes: > +int usbnet_status_start(struct usbnet *dev, gfp_t mem_flags) > +{ > + /* Only drivers that implement a status hook should call this */ > + BUG_ON(dev->interrupt == NULL); > I still don't think there is any reason to BUG out. See for example http://article.gmane.or

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Dan Williams
On Wed, 2013-04-10 at 15:06 +0200, Oliver Neukum wrote: > On Wednesday 10 April 2013 07:49:11 Dan Williams wrote: > > On Wed, 2013-04-10 at 09:23 +0200, Oliver Neukum wrote: > > > On Tuesday 09 April 2013 18:02:27 Dan Williams wrote: > > > > > +/* Submit the interrupt URB if it hasn't been submitt

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Oliver Neukum
On Wednesday 10 April 2013 07:49:11 Dan Williams wrote: > On Wed, 2013-04-10 at 09:23 +0200, Oliver Neukum wrote: > > On Tuesday 09 April 2013 18:02:27 Dan Williams wrote: > > > +/* Submit the interrupt URB if it hasn't been submitted yet */ > > > +static int __usbnet_status_start(struct usbnet *d

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Dan Williams
On Wed, 2013-04-10 at 09:23 +0200, Oliver Neukum wrote: > On Tuesday 09 April 2013 18:02:27 Dan Williams wrote: > > Some drivers (sierra_net) need the status interrupt URB > > active even when the device is closed, because they receive > > custom indications from firmware. Add functions to refcoun

Re: [PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-10 Thread Oliver Neukum
On Tuesday 09 April 2013 18:02:27 Dan Williams wrote: > Some drivers (sierra_net) need the status interrupt URB > active even when the device is closed, because they receive > custom indications from firmware. Add functions to refcount > the status interrupt URB submit/kill operation so that > sub

[PATCH 1/2 v4] usbnet: allow status interrupt URB to always be active

2013-04-09 Thread Dan Williams
Some drivers (sierra_net) need the status interrupt URB active even when the device is closed, because they receive custom indications from firmware. Add functions to refcount the status interrupt URB submit/kill operation so that sub-drivers and the generic driver don't fight over whether the sta