public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Thomas Hood <jdthood@mail.com>
To: linux-kernel@vger.kernel.org
Cc: Russell King <rmk@arm.linux.org.uk>
Subject: Re: APM driver patch summary
Date: 17 Dec 2001 20:22:40 -0500	[thread overview]
Message-ID: <1008638563.5515.96.camel@thanatos> (raw)

Russell King wrote:
> Actually you're right, it doesn't send a resume event.
> However, It's worse than that - it will leave all sleeping
> listeners still sleeping.
> Try this patch instead - this should cause all listeners
> to get a -EIO to indicate that the suspend failed, and also
> get the resume event.

Hmm.  You know what?  I don't think the listeners really
need to be sent a resume event if they are already getting
an error code back!  The listeners should take the error
code as a cue to undo whatever they did to prepare for
the suspend.  The only thing is that the error code should
not be EIO, since this currently means "the BIOS returned
something other than APM_SUCCESS".  The current code returns
EAGAIN when the suspend attempt is rejected by a driver
(look in do_ioctl()) and we should stick to that.

If the above is right, then in suspend() you should set
"err = -EAGAIN" instead of "err = -EIO" and you should put
"out:" just after the "queue_event(APM_NORMAL_RESUME, NULL);"
instead of just before it.

I just checked, and apmlib 3.0.2 does not return the error code
from apm_suspend(); and apmd 3.0.2 does not undo anything when
apm_suspend() returns an error.  These need to be fixed right
away.  I'll file bug reports against Debian apmd since the
Debian maintainer is also the upstream maintainer -- Avery Pennarun.

Finally, think carefully about where the cli() and sti() should go.

--
Thomas


             reply	other threads:[~2001-12-18  1:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-18  1:22 Thomas Hood [this message]
2001-12-18 10:02 ` APM driver patch summary Russell King
  -- strict thread matches above, loose matches on Subject: below --
2001-12-23  3:22 Thomas Hood
2001-12-23 12:12 ` Andreas Steinmetz
2001-12-22  3:35 Thomas Hood
2001-12-22 10:42 ` Andreas Steinmetz
2001-12-22 14:44 ` Andreas Steinmetz
2001-12-22 16:13   ` Thomas Hood
2002-01-04 19:56   ` Borsenkow Andrej
2002-01-05 11:58     ` Andreas Steinmetz
     [not found] <1008737165.1155.0.camel@thanatos>
2001-12-19 13:49 ` Thomas Hood
2001-12-18 21:46 Thomas Hood
2001-12-18 21:24 Thomas Hood
2001-12-18 21:42 ` Russell King
     [not found]   ` <E16GYl6-0000nz-00@phalynx>
2001-12-19 10:23     ` Russell King
2001-12-17 18:28 Thomas Hood
2001-12-17 22:04 ` Russell King
2001-12-17 22:22   ` Russell King

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=1008638563.5515.96.camel@thanatos \
    --to=jdthood@mail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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