Re: autosuspend for storage (was:Re: USB conversion to the runtime PM framework)

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

 



On Wed, 21 Oct 2009, Oliver Neukum wrote:

> > > OK, so why don't we take the hint from the SCSI layer?
> >
> > Layering makes it very awkward.  Have you looked at sd_suspend() in
> > drivers/scsi/sd.c?
> 
> We need to get at scsi_disk and it is the gold standard.

That's my point.  I don't want to get at scsi_disk.  If there's no 
other way then I'll forget the whole idea.

> > Yes, but it's still ugly.  usb-storage would have to maintain its own
> > array of state information for all the LUNs present.
> 
> struct scsi_device has a hook for the low level driver.

What hook are you referring to?

> > Yes, all right.  To tell the truth, I would prefer to avoid all these
> > difficulties and not worry about autosuspending card readers and such.
> > (Unless the user disables hal's probing.)  We can emphasize that this
> > is only a partial, potentially unsafe, autosuspend implementation.
> 
> This would have the perverted effect of working autosuspend for a mounted
> device and no autosuspend for an empty device.

Probing for media insertion is going to cause problems for power 
management in other areas in addition to USB.

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