Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-19 Thread Alan Stern
On Mon, 19 Feb 2007, Oliver Neukum wrote: > Am Donnerstag, 15. Februar 2007 22:06 schrieb Alan Stern: > > There are two main disadvantages to the less-strict scheme.  One is that > > the timing of autosuspends isn't as precise: If the timer goes off every > > 10 seconds, then a suspend could occ

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-19 Thread Oliver Neukum
Am Donnerstag, 15. Februar 2007 22:06 schrieb Alan Stern: > There are two main disadvantages to the less-strict scheme.  One is that > the timing of autosuspends isn't as precise: If the timer goes off every > 10 seconds, then a suspend could occur anywhere between 10 and 20 seconds > after the

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-16 Thread Alan Stern
On Fri, 16 Feb 2007, Oliver Neukum wrote: > Am Freitag, 16. Februar 2007 16:45 schrieb Alan Stern: > > On Thu, 15 Feb 2007, Oliver Neukum wrote: > > > > imho caring about the reason for a suspension is a bit messy. The current > > > code is nice. It just introduces a new method. > > > > But it's

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-16 Thread Oliver Neukum
Am Freitag, 16. Februar 2007 16:45 schrieb Alan Stern: > On Thu, 15 Feb 2007, Oliver Neukum wrote: > > imho caring about the reason for a suspension is a bit messy. The current > > code is nice. It just introduces a new method. > > But it's a new method that essentially duplicates the purpose of

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-16 Thread Alan Stern
On Thu, 15 Feb 2007, Oliver Neukum wrote: > > Hmm... How about using your spinlock to synchronize URB submissions with > > the driver's suspend() method instead? That way, if an important URB is > > in flight you simply fail the suspend call. You can check the auto_pm > > flag in the usb_struct

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-15 Thread Oliver Neukum
Am Donnerstag, 15. Februar 2007 23:23 schrieb Alan Stern: > On Thu, 15 Feb 2007, Oliver Neukum wrote: > > > Am Donnerstag, 15. Februar 2007 22:06 schrieb Alan Stern: > > > should be able to synchronize I/O submissions done in interrupt context > > > with device suspends (i.e., avoid the problem w

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-15 Thread Alan Stern
On Thu, 15 Feb 2007, Oliver Neukum wrote: > Am Donnerstag, 15. Februar 2007 22:06 schrieb Alan Stern: > > On Thu, 15 Feb 2007, Oliver Neukum wrote: > > > > > The trouble with HID is that it does input and output. I choose to queue > > > output if the device is supended. I don't want to deal with

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-15 Thread Oliver Neukum
Am Donnerstag, 15. Februar 2007 22:06 schrieb Alan Stern: > On Thu, 15 Feb 2007, Oliver Neukum wrote: > > > The trouble with HID is that it does input and output. I choose to queue > > output if the device is supended. I don't want to deal with the case of > > having active output URBs when it's t

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-15 Thread Alan Stern
On Thu, 15 Feb 2007, Oliver Neukum wrote: > The trouble with HID is that it does input and output. I choose to queue > output if the device is supended. I don't want to deal with the case of > having active output URBs when it's time to autosuspend. > Upping the count is not an option because I ca

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-15 Thread Oliver Neukum
Am Donnerstag, 15. Februar 2007 17:58 schrieb Alan Stern: > On Thu, 15 Feb 2007, Oliver Neukum wrote: > > > Hi Alan, > > > > here are the changes I made to adapt the HID suspend code to the new > > model. Basically I just changed the simple flag to a callback that allows > > to know whether the f

Re: [linux-usb-devel] modifications to new generic autosuspend code

2007-02-15 Thread Alan Stern
On Thu, 15 Feb 2007, Oliver Neukum wrote: > Hi Alan, > > here are the changes I made to adapt the HID suspend code to the new > model. Basically I just changed the simple flag to a callback that allows > to know whether the flag has been checked and allow several independently > removable sources