From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: linux-pm@lists.osdl.org
Cc: David Brownell <david-b@pacbell.net>
Subject: Re: Suspended devices and drivers
Date: Tue, 6 Sep 2005 21:47:30 +0200 [thread overview]
Message-ID: <200509062147.31349.rjw@sisk.pl> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0509061037520.5078-100000@iolanthe.rowland.org>
[-- Attachment #1: Type: text/plain, Size: 3327 bytes --]
Hi,
On Tuesday, 6 of September 2005 16:50, Alan Stern wrote:
> On Mon, 5 Sep 2005, David Brownell wrote:
>
> > > With the USB device, things are more interesting. If you unplug the
> > > device (even while it's not in use), Windows warns you not to do this
> > > without first getting permission by using the "Eject Removable Devices"
> > > button. If you try to press that button while a program has a file open
> > > on the device, Windows says that you can't remove the device right now and
> > > advises you to try again later.
> >
> > So it's inconsistent in behavior, since this isn't how it handles
> > the same thing during resume-from-hibernate ...
>
> Obviously because Windows isn't aware of anything that happens during
> hibernate while the power is turned off. How could it possibly warn you
> about unplugging a device when it doesn't know whether you unplugged the
> device or not?
>
> If you describe the behavior as "Windows warns you whenever it learns that
> you ejected removable media without permission", then Windows _is_
> consistent.
>
> > > However... I put the laptop into Hibernate mode. To be absolutely sure
> > > this was a true snapshot-poweroff-resume cycle, I also unplugged the power
> > > cord and removed the battery. Then I removed and replaced the USB device
> > > and restarted the laptop. Everything worked smoothly; the file remained
> > > open and the program was able to continue reading it, well past the point
> > > where the I/O buffers needed to be refilled.
> >
> > So basically there's a special case somewhere to treat _this_ disconnect
> > differently than other ones.
>
> Yes, there must be.
>
> > How does real suspend behave (like STR)? How does it handle cases where you
> > plug in a different instance of the same device ... example, different CF
> > card in a CF reader? Or when you move the device to another port? And
> > does XP behave identically?
>
> I'll try doing some of those experiments when I have a chance.
>
> > > If Windows ME can do this, Linux should be able to do it too.
> >
> > That argument can be stretched too far! Though from time to time I have
> > indeed wished for something more like a BSOD. An oops hidden in a logfile
> > that never gets flushed to disk, with an X desktop, gives no clues ... :)
> >
> > Linux certainly _could_ try to emulate up all the fault handling of some
> > version of Windows. But whether it _should_ is a different story.
>
> I say this is a case where we should try, at least to some extent; users
> will feel that "Powerdown-swsusp automatically removes all hot-pluggable
> devices" is too Draconian.
>
> What do other people on the PM list think?
I think it is analogous to leaving a mounted CD in the drive and suspending.
If you resume the box without ejecting the CD, it remains mounted and all is fine
(I actually tested this). I don't know what happens if you remove the CD from
the drive while suspended (from the Linux' point of view), but this is a different
kettle of fish. Anyway, IMO, the behavior should be consistent across all
devices or users will get confused.
Greetings,
Rafael
--
- Would you tell me, please, which way I ought to go from here?
- That depends a good deal on where you want to get to.
-- Lewis Carroll "Alice's Adventures in Wonderland"
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
next prev parent reply other threads:[~2005-09-06 19:47 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-04 16:13 Suspended devices and drivers Alan Stern
2005-09-04 20:46 ` David Brownell
2005-09-05 1:25 ` Alan Stern
2005-09-05 17:09 ` Alan Stern
2005-09-05 23:27 ` David Brownell
2005-09-06 14:50 ` Alan Stern
2005-09-06 15:18 ` David Brownell
2005-09-06 15:46 ` Alan Stern
2005-09-11 19:06 ` David Brownell
2005-09-11 19:16 ` Alan Stern
2005-09-11 21:42 ` David Brownell
2005-09-12 2:33 ` Dmitry Torokhov
2005-09-06 19:47 ` Rafael J. Wysocki [this message]
2005-09-11 1:55 ` Leo L. Schwab
2005-09-11 19:03 ` Alan Stern
2005-09-06 0:13 ` David Brownell
2005-09-06 15:19 ` Alan Stern
2005-09-11 19:03 ` David Brownell
2005-09-11 20:06 ` Alan Stern
2005-09-11 22:27 ` David Brownell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200509062147.31349.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=david-b@pacbell.net \
--cc=linux-pm@lists.osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox