Am Mittwoch, 31. Januar 2007 18:07 schrieb Alan Stern:
> On Wed, 31 Jan 2007, Oliver Neukum wrote:
> 
> > Am Mittwoch, 31. Januar 2007 17:11 schrieb Alan Stern:
> > 
> > > This looks more complicated than it should be.  In particular, the 
> > > addition of a new "idle" timer should not be needed.
> > > 
> > > We already have an autosuspend timer: the one embedded in the autosuspend
> > > delayed_work struct inside struct usb_device.  What you really want to do
> > > is make the delay configurable per-device instead of relying on a fixed
> > > constant USB_AUTOSUSPEND_DELAY.  Doing things that way would remove a
> > > tremendous amount of complexity from your patch.
> > 
> > It would also introduce a layering violation.
> 
> You mean that you want an interface-specific timer rather than
> device-specific.  Won't that add up to an awful lot of timers, especially
> when other drivers start doing the same thing?

Yes, you have a point.

> > Furthermore that work should be queued only if pm_usage_cnt==0,
> > which cannot be allowed if the device isn't idle.
> 
> Isn't that what you want?  Surely you aren't trying to start an
> autosuspend timer while the device is busy?

How do I find out whether the device is idle?
The mouse is not idle if it has been moved (or buttons clicked)
To find out whether it has been moved the device must not be suspended.
At which point in time then should I check? Are you saying that the
timer should be started and suspend() should fail if the devices hasn't
been idle?
 
> > > If the user could put usbcore.autosuspend_delay=60 on the boot command 
> > > line, then it would be possible to prevent some devices from being 
> > > autosuspended.
> > 
> > Just startup with autosuspend off.
> 
> There _is_ no way to turn it off, other than not setting
> CONFIG_USB_SUSPEND -- in which case there's no way to turn it on.

I was suggesting that you introduce a setting. Before you try guessing how long
a boot will last, better start without autosuspend. If you need userspace
intervention anyway, you can keep it simple.

        Regards
                Oliver

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to