linux-mips
[Top] [All Lists]

Re: USB sleep & mount

To: "Rodolfo Giometti" <giometti@linux.it>
Subject: Re: USB sleep & mount
From: "Jordan Crouse" <jordan.crouse@amd.com>
Date: Tue, 23 May 2006 09:11:13 -0600
Cc: linux-mips@linux-mips.org
In-reply-to: <20060523132418.GA28124@enneenne.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20060523132418.GA28124@enneenne.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11
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


<Prev in Thread] Current Thread [Next in Thread>