public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Huw Rogers <count0-tC47gz4GrgtWk0Htik3J/w@public.gmane.org>
To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: [PATCH] Alexander Malysh's forgotten acpi_leave_sleep_state() IRQ patch
Date: Sat, 01 May 2004 23:08:07 -0400	[thread overview]
Message-ID: <20040501230315.33BD.COUNT0@localnet.com> (raw)
In-Reply-To: <1083462390.5866.10.camel-7YzDMyNdTwE@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 607 bytes --]

Feb 14, Alexander Malysh wrote:
> We disable non wakeup gpes (and store those values) with interrupts disabled, 
> but enable those with interrupts enabled which were already overwritten while 
> handling of wakeup interrupt. So we must restore non wakeup gpes as long 
> interrupts are disabled.

The second half of his patch never made it into 2.6.5, and remains
necessary. Without this patch my N258SA0 is dead on resume, requiring
removal of battery and mains power cable to get it back. With this patch,
I get some improvement. Attached.
-- 
Huw Rogers <count0-tC47gz4GrgtWk0Htik3J/w@public.gmane.org>

[-- Attachment #2: acpi_leave_sleep_state_irq_fix.diff --]
[-- Type: application/octet-stream, Size: 706 bytes --]

--- linux-2.6.5/drivers/acpi/sleep/main.c.orig	2004-05-01 22:34:11.000000000 -0400
+++ linux-2.6.5/drivers/acpi/sleep/main.c	2004-05-01 22:34:52.000000000 -0400
@@ -107,7 +107,6 @@
 	default:
 		return -EINVAL;
 	}
-	local_irq_restore(flags);
 	printk(KERN_DEBUG "Back to C!\n");
 
 	/* restore processor state
@@ -118,6 +117,8 @@
 	if (state > PM_SUSPEND_STANDBY)
 		acpi_restore_state_mem();
 
+	acpi_leave_sleep_state(state);
+	local_irq_restore(flags);
 
 	return ACPI_SUCCESS(status) ? 0 : -EFAULT;
 }
@@ -133,8 +134,6 @@
 
 static int acpi_pm_finish(u32 state)
 {
-	acpi_leave_sleep_state(state);
-
 	/* reset firmware waking vector */
 	acpi_set_firmware_waking_vector((acpi_physical_address) 0);
 

      parent reply	other threads:[~2004-05-02  3:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-02  1:46 DSDT Problems with 2.6.6-rc3 Andrew Barr
     [not found] ` <1083462390.5866.10.camel-7YzDMyNdTwE@public.gmane.org>
2004-05-02  3:08   ` Huw Rogers [this message]

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=20040501230315.33BD.COUNT0@localnet.com \
    --to=count0-tc47gz4grgtwk0htik3j/w@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.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