Re: [linux-usb-devel] [RFC] Autosuspend update

2007-02-10 Thread Alan Stern
On Sat, 10 Feb 2007, Oliver Neukum wrote: > > The problem is that after the device is suspended, we don't know whether > > it was an autosuspend or the result of an external user command. (It > > If that is true then we cannot know whether to wake up on demand. > I am afraid that state will have

Re: [linux-usb-devel] [RFC] Autosuspend update

2007-02-10 Thread Oliver Neukum
Am Samstag, 10. Februar 2007 04:29 schrieb Alan Stern: > On Fri, 9 Feb 2007, Oliver Neukum wrote: > > > +   if (value > 0 && old == 0) > > > +   usb_try_autosuspend_device(udev); > > > > You should retain symmetry. Writing 0 should wake up the device. > > The problem is that afte

Re: [linux-usb-devel] [RFC] Autosuspend update

2007-02-09 Thread Alan Stern
On Fri, 9 Feb 2007, Oliver Neukum wrote: > Am Freitag, 9. Februar 2007 23:12 schrieb Alan Stern: > > Firstly, cool. > I'll look at it closer again, but just some first comments. > > > +static ssize_t > > +set_autosuspend(struct device *dev, struct device_attribute *attr, > > +   cons

Re: [linux-usb-devel] [RFC] Autosuspend update

2007-02-09 Thread Oliver Neukum
Am Freitag, 9. Februar 2007 23:12 schrieb Alan Stern: > +static ssize_t > +set_suspended(struct device *dev, struct device_attribute *attr, > +   const char *buf, size_t count) > +{ > +   struct usb_device *udev = to_usb_device(dev); > +   unsigned value; > +   int rc; > + >

Re: [linux-usb-devel] [RFC] Autosuspend update

2007-02-09 Thread Oliver Neukum
Am Freitag, 9. Februar 2007 23:12 schrieb Alan Stern: Firstly, cool. I'll look at it closer again, but just some first comments. > +static ssize_t > +set_autosuspend(struct device *dev, struct device_attribute *attr, > +   const char *buf, size_t count) > +{ > +   struct usb_devic

[linux-usb-devel] [RFC] Autosuspend update

2007-02-09 Thread Alan Stern
Oliver: This patch includes the various facilities we have been discussing. It seems to work okay. Obviously it isn't in final form. It needs to be cleaned up and broken apart into several simpler patches. But you ought to be able to test it easily enough. It needs to go on top of as853, p