Linux MIPS Architecture development
 help / color / mirror / Atom feed
* USB sleep & mount
@ 2006-05-23 13:24 Rodolfo Giometti
  2006-05-23 15:11 ` Jordan Crouse
  0 siblings, 1 reply; 2+ messages in thread
From: Rodolfo Giometti @ 2006-05-23 13:24 UTC (permalink / raw)
  To: linux-mips

Hello,

I'm working on sleep for USB host on au1x00 CPUs and I have the
following problem.

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.

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

Thanks,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                     		giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: USB sleep & mount
  2006-05-23 13:24 USB sleep & mount Rodolfo Giometti
@ 2006-05-23 15:11 ` Jordan Crouse
  0 siblings, 0 replies; 2+ messages in thread
From: Jordan Crouse @ 2006-05-23 15:11 UTC (permalink / raw)
  To: Rodolfo Giometti; +Cc: linux-mips

On 23/05/06 15:24 +0200, Rodolfo Giometti wrote:
> Hello,
> 
> 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.

Thats exactly right - USB sleep is a very delicate and broken procedure.
Basically, the controller seems to be giving up and re-enumerating 
everything.

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

The userland technically *shouldn't* have to unmount the filesystems, but
its the safest option we have - between enumeration issues, and the age 
old problem of unplugging the external device while in sleep - its just
better to unmount the device before heading for nap time (or mount the
thing with '-a' so data isn't lost).

Is that ideal?  Of course not - but welcome to the wonderful world of
USB in Linux.

Jordan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-23 15:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-23 13:24 USB sleep & mount Rodolfo Giometti
2006-05-23 15:11 ` Jordan Crouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox