mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mikael Pettersson <mikpe@csd.uu.se>
To: remi@a2zis.com
Cc: alan@lxorguk.ukuu.org.uk, linux-kernel@vger.kernel.org
Subject: Re: 2.4.5-ac8 hardlocks when going to standby
Date: Thu, 7 Jun 2001 13:00:15 +0200 (MET DST)	[thread overview]
Message-ID: <200106071100.NAA11961@harpo.it.uu.se> (raw)

On Wed, 6 Jun 2001 22:42:53 +0200, Remi Turk wrote:

>On Wed, Jun 06, 2001 at 07:03:09PM +0200, Remi Turk wrote:
>> 
>> By applying the following patch (lookalike)?
>> 
>> arch/i386/kernel/apm.c:send_event():
>> 
>> 	case APM_SYS_SUSPEND:
>> 	case APM_CRITICAL_SUSPEND:
>> 	case APM_USER_SUSPEND:
>> +	case APM_USER_STANDBY:
>> +	case APM_SYS_STANDBY:
>> 		/* map all suspends to ACPI D3 */
>> 		if (pm_send_all(PM_SUSPEND, (void
>> 			*)3)) {
>
>Well, I tried this one (did I understand correctly wat
>you meant???) and it didn't make any difference.

Try the patch below. Reboot. Run 'apm -S' (or --standby) at the
console. Did you see output from both send_event and apic_pm_callback?
If so, repeat by pressing your power-switch-as-standby button. You
should see the same output -- if not, something APM-related is broken.

FYI, the patch below to apm.c:send_event() [w/o the printk] prevents
my ASUS P3B-F from hanging hard if I invoke apm standby in a UP-APIC
enabled kernel. (Actually, standby doesn't do much on my box since
it wakes up after 1 second or so. I don't know why, perhaps a hub->nic
link beat? 'suspend' works ok, however. Oh, and I have to disable
RedHat's worthless 'kudzu' crap, otherwise 'suspend' won't work.)

/Mikael

--- linux-2.4.5-ac9/arch/i386/kernel/apic.c.~1~	Thu Jun  7 11:58:19 2001
+++ linux-2.4.5-ac9/arch/i386/kernel/apic.c	Thu Jun  7 12:12:19 2001
@@ -480,6 +480,8 @@
 
 static int apic_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
 {
+	printk(__FUNCTION__ ": rqst %u data %lu\n", rqst, (long)data);
+	mdelay(1000);
 	switch (rqst) {
 	case PM_SUSPEND:
 		apic_pm_suspend(data);
--- linux-2.4.5-ac9/arch/i386/kernel/apm.c.~1~	Thu Jun  7 11:58:42 2001
+++ linux-2.4.5-ac9/arch/i386/kernel/apm.c	Thu Jun  7 12:12:10 2001
@@ -915,10 +915,13 @@
 
 static int send_event(apm_event_t event)
 {
+	printk(__FUNCTION__ ": event %u\n", event);
 	switch (event) {
 	case APM_SYS_SUSPEND:
 	case APM_CRITICAL_SUSPEND:
 	case APM_USER_SUSPEND:
+	case APM_SYS_STANDBY:
+	case APM_USER_STANDBY:
 		/* map all suspends to ACPI D3 */
 		if (pm_send_all(PM_SUSPEND, (void *)3)) {
 			if (event == APM_CRITICAL_SUSPEND) {
@@ -932,6 +935,7 @@
 		break;
 	case APM_NORMAL_RESUME:
 	case APM_CRITICAL_RESUME:
+	case APM_STANDBY_RESUME:
 		/* map all resumes to ACPI D0 */
 		(void) pm_send_all(PM_RESUME, (void *)0);
 		break;
--- linux-2.4.5-ac9/arch/i386/kernel/nmi.c.~1~	Thu Jun  7 11:58:42 2001
+++ linux-2.4.5-ac9/arch/i386/kernel/nmi.c	Thu Jun  7 12:12:29 2001
@@ -124,6 +124,8 @@
 
 static int nmi_pm_callback(struct pm_dev *dev, pm_request_t rqst, void *data)
 {
+	printk(__FUNCTION__ ": rqst %u data %lu\n", rqst, (long)data);
+	mdelay(1000);
 	switch (rqst) {
 	case PM_SUSPEND:
 		disable_apic_nmi_watchdog();

             reply	other threads:[~2001-06-07 11:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-07 11:00 Mikael Pettersson [this message]
2001-06-07 14:41 ` Remi Turk
  -- strict thread matches above, loose matches on Subject: below --
2001-06-10 14:21 Remi Turk
2001-06-06 13:10 Mikael Pettersson
2001-06-06 17:03 ` Remi Turk
2001-06-06 20:42   ` Remi Turk
2001-06-05 16:44 Remi Turk
2001-06-05 20:37 ` Alan Cox
2001-06-05 21:15   ` Remi Turk
2001-06-05 21:48     ` Joel Becker
     [not found]     ` <E157ODH-0007PX-00@the-village.bc.nu>
     [not found]       ` <20010605235346.A737@localhost.localdomain>
2001-06-06  9:32         ` Remi Turk

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=200106071100.NAA11961@harpo.it.uu.se \
    --to=mikpe@csd.uu.se \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=remi@a2zis.com \
    /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

all inboxes | Powered by JetHome®