suspend/resume kills usb0
werner at openmoko.org
Sun Nov 2 17:57:38 CET 2008
Michael 'Mickey' Lauer wrote:
> Is there a way to prevent suspend/resume from killing usb0? It only happens
> when there is traffic on usb0 (i.e. shell output during suspend/resume).
Hmm, don't you lose the usb0 interface on the host anyway ?
The last time I tried suspend/resume (which was a while ago), I
got the following pattern:
- usb0 gets re-created on resume
- if I ifconfig it, previously active sessions will pick where
they left off
- the time until the sessions accept traffic again is roughly
the same as the interval during which TCP tried to send in vain
(this is because of TCP's retransmit algorithm, which backs off
exponentially in this case)
So the sessions are not lost unless you let TCP retry for too long.
Perhaps you were just a bit too impatient :-)
But it's a pain that you have to ifconfig again. The best thing
would be indeed to never suspend if USB is attached, unless someone
specifically asks for it, e.g., for debugging.
Suspend/resume also kills JTAG, so getting rid of whatever
automatic suspend user space comes up with is pretty much part of
any serious kernel hacking. FSO is a very friendly in this regard,
but Om2008 is a pain.
More information about the openmoko-kernel