> Date: Thu, 31 Aug 2006 11:24:17 +0200
> From: Rodolfo Giometti <[EMAIL PROTECTED]>
>
> When I put the system to sleep and then it wakes up everything works
> well _if_ the USB key is not mounted before the sleep. For instance,
> if I mount partition "/dev/sda1" (first USB key partition) and then go
> to sleep, at wake up the system forgets device "/dev/sda" and
> registers a new device "/dev/sdb" so, obviously, the filesystem
> previously mounted is not accessible anymore.

You must be using a "power USB all the way off" setup for "sleep",
and have some patches for suspend mode that haven't been submitted
for the drivers/usb/host/{ehci,ohci}-au1xx.c bus glue ...

USB on many system-on-chip processors also has less aggressive sleep
states, where for example USB port power might be maintained, and
the root hub clocked enough to detect simple events like "remote
wakeup", "connect new device", and "disconnect device" ... and then
use those as system wakeup events.



> My question is: is that correct since the userland, before going to
> sleep, should umount all external filesystems or it's a bug? :)

That's correct for the "power fully off" mode, yes.  Maybe you can
do better than that; see how ohci-at91.c will keep USB active during
"standby" sleep, that's the best in-tree example today.

But in general, userspace should be assuming that all removable
media will have been removed by the time the system comes back up,
and have prepared for it.  Unmounting would be a nice safe policy,
but if userspace knows the system will sleep and is _not_ ready for
the media to be removed, that's a userspace bug.

- Dave



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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