On Thu, 5 Oct 2006, Pavel Machek wrote:
> Hi!
>
> > > > Plug/unplug should be easy enough to simulate from usb driver, no?
> > >
> > > if a USB driver doesn't define suspend/resume methods, then the core
> > > simply
> > > unplugs it on suspend, and replugs on resume (IIRC).
> >
> > No longer true, and IIRC it never was. All that happens is that URB
> > submissions fail with -EHOSTUNREACH once the device is suspended.
>
> Could we get "old" behaviour for devices like this? "printk("please
> unplug/replug me\n")" is not a good solution.
I would much rather see this fixed in the driver itself.
For the time being, a "dummy" suspend routine could look like this:
static int foo_suspend(struct usb_interface *intf, pm_message_t msg)
{
up(&intf->dev.sem);
device_release_driver(&intf->dev);
down(&intf->dev.sem);
return 0;
}
Getting reprobed during resume would be more difficult; it would need help
from userspace.
Maybe UEAGLE can do something a little more sensible...
Alan Stern
-------------------------------------------------------------------------
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
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel