Re: USB deadlock after resume | |
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] | |
On Wed, 21 Nov 2007, Laurent Pinchart wrote: > > > When you suspend, you cut off vbus (afaik, correct me if I'm wrong), > > > which means your device will get disconnected. One way to avoid this is > > > enabling CONFIG_USB_PERSIST and trying with that on. > > > > Suspend may or may not cut off power. > > I've always been confused by this. > > If I'm not mistaken, there are three kind of suspend modes: autosuspend, You mean runtime (AKA dynamic) suspend -- autosuspend is merely one type of runtime suspend. > suspend to RAM and suspend to disk. The nomenclature du jour is just plain "suspend" for suspend-to-RAM and "hibernation" for suspend-to-disk. > In the first case I expect the USB hub > (either root hub or external hub) to make the bus idle but not power it down. Correct. > In the last case I suspect the USB bus to be powered down. Usually, not but always! Some Macs have been known to keep USB suspend current available during hibernation. > What controls the USB bus power on suspended ports ? Is it handled by the > system (BIOS, ...) ? Is it allowed to power down the ports or keep them > powered as it chooses ? What are the rules set in stone ? There are no rules set in stone. :-) Systems are _supposed_ to keep the ports powered during suspend, but some may fail to do so. It depends on the firmware (i.e., BIOS for PCs) and the motherboard design. > > If it does cut off power, resume() will never be called, instead either > > disconnect() or reset_resume(). > > What is reset_resume() for ? Which one will be called on resume after a bus > power down ? This is explained in Documentation/usb/power-management.txt. If the USB Persist facility has been enabled for a device then reset_resume will be called, to indicate that the device had to be reset as part of the resume procedure. If USB Persist isn't enabled then the disconnect method will be called and the device will be re-enumerated, exactly as though it had been unplugged and then plugged back in. Alan Stern ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ linux-usb-devel@xxxxxxxxxxxxxxxxxxxxx To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
[Home] [Video for Linux] [Photo] [Yosemite Forum] [Yosemite Photos] [Video Projectors] [PDAs] [Hacking TiVo] [Linux Kernel] [Linux SCSI] [XFree86] [Devices] [Big List of Linux Books] [Free Dating]
![]() |