Re: USB conversion to the runtime PM framework

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 20 Oct 2009, Oliver Neukum wrote:

> Am Dienstag, 20. Oktober 2009 18:10:39 schrieb Alan Stern:
> > Oliver:
> >
> > There are a couple of significant differences between the existing USB
> > runtime PM code and the new framework.
> [..]
> > directly).  In particular, their total usage change from binding to
> > unbinding must be exactly zero.  I'm not sure the existing code in the
> > drivers does this.
> 
> I am sure it does not. Under the current rules a driver must not touch
> the counter after it has been disconnected and there's no reason to
> touch it as a device is disconnected, because usbcore is about to
> take charge of it.
 
True.  Well, now there _will_ be a reason to touch it as a device is
disconnected.  
                
The alternative, of course, is to keep intf->pm_usage_cnt and have
usbcore mediate the actual changes to the counter in struct device.    
Should we do that?


> > Here's a third matter (not directly related to the new framework but
> > connected with runtime PM): Should we add rudimentary autosuspend
> > support back into usb-storage?  By default it will remain disabled, of
> > course.  But there are many cases where it could be very helpful to
> > users -- think of low-power systems with USB flash drives.  Such users
> > could enable it manually.
> 
> I would add it, but it's Matthew's driver.

Quite so.  Matt, what do you think?  The downside is that people or 
packages might try to enable autosuspend in cases where they shouldn't, 
such as drives needing to spin down or needing a SYNCHRONIZE CACHE 
command before suspend.  Unforunately there's no way the kernel can 
tell the good cases from the bad.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux