From: "Georg C. F. Greve" <greve-BSDwwRMYa8dh2yIolo3vgti2O/JbrIOy@public.gmane.org>
To: Matthew Garrett <mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
shaohua.li-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org
Subject: Re: acpi-20040715: functional regression on ASUS M2N
Date: Tue, 27 Jul 2004 13:14:23 +0200 [thread overview]
Message-ID: <m3oem1u2gg.fsf@reason.gnu-hamburg> (raw)
In-Reply-To: <m3acxthizw.fsf-eMhNhoSsuh6q92djB/mqZw@public.gmane.org> (Georg C. F. Greve's message of "Wed, 21 Jul 2004 10:17:23 +0200")
[-- Attachment #1.1: Type: text/plain, Size: 1432 bytes --]
Hi all,
okay, I did some more checks on the problems I experienced with
acpi-20040715 on Intel Centrino 855GM notebook ASUS M2N.
Background: As of kernel 2.6.7 suspend to RAM (s3_bios) actually
worked and even with DRI/DRM and AGP compiled in and the X server
running, things are working nicely.
When restarting from suspend to RAM, I briefly see a yellow "inu" in
the uppermost row for a second, then the screen flickers once and X11
is back.
Only disadvantage: network cards (both wired & ipw2100 wireless) are
dead after suspend to ram, I need a suspend to disk (swsusp2 version
2.0.0.100) to bring them back to life. (referred to as "fine" below)
When upgrading to acpi-20040715 I discovered that resume from suspend
to RAM was broken. Contrary to what I wrote in my previous mail, it
seems that there is the yellow "inu" in the uppermost row and then the
machine is dead. (referred to as "dead" below)
I need a forced poweroff plus "needle-pushed reset button" to bring it
back to life.
Having had some time to let the machine compile in the background, I
narrowed down the code that broke the resume from suspend to RAM on my
machine. Apparently it was the patch that is supposed to fix the
network card problems.
When starting from a patched 2.6.7 with suspend to ram and resume
working fine as described above (=base), I have applied two patches
(a) acpi-20040715
(b) Fix ACPI after S3 patch of David Shaohua:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: http://bugme.osdl.org/attachment.cgi?id=3292&action=view --]
[-- Type: text/x-patch, Size: 2410 bytes --]
===== arch/i386/kernel/i8259.c 1.30 vs edited =====
--- 1.30/arch/i386/kernel/i8259.c Thu Apr 22 19:15:40 2004
+++ edited/arch/i386/kernel/i8259.c Tue Jun 29 15:35:28 2004
@@ -238,14 +238,39 @@
}
}
+static char irq_trigger[2];
+/**
+ * ELCR registers (0x4d0, 0x4d1) control edge/level of IRQ
+ */
+static void restore_ELCR(char *trigger)
+{
+ outb(trigger[0], 0x4d0);
+ outb(trigger[1], 0x4d1);
+}
+
+static void save_ELCR(char *trigger)
+{
+ /* IRQ 0,1,2,8,13 are marked as reserved */
+ trigger[0] = inb(0x4d0) & 0xF8;
+ trigger[1] = inb(0x4d1) & 0xDE;
+}
+
static int i8259A_resume(struct sys_device *dev)
{
init_8259A(0);
+ restore_ELCR(irq_trigger);
+ return 0;
+}
+
+static int i8259A_suspend(struct sys_device *dev, u32 state)
+{
+ save_ELCR(irq_trigger);
return 0;
}
static struct sysdev_class i8259_sysdev_class = {
set_kset_name("i8259"),
+ .suspend = i8259A_suspend,
.resume = i8259A_resume,
};
===== arch/x86_64/kernel/i8259.c 1.12 vs edited =====
--- 1.12/arch/x86_64/kernel/i8259.c Wed Apr 21 08:55:12 2004
+++ edited/arch/x86_64/kernel/i8259.c Tue Jun 29 15:36:08 2004
@@ -318,7 +318,7 @@
}
}
-void __init init_8259A(int auto_eoi)
+void init_8259A(int auto_eoi)
{
unsigned long flags;
@@ -360,6 +360,57 @@
spin_unlock_irqrestore(&i8259A_lock, flags);
}
+
+static char irq_trigger[2];
+/**
+ * ELCR registers (0x4d0, 0x4d1) control edge/level of IRQ
+ */
+static void restore_ELCR(char *trigger)
+{
+ outb(trigger[0], 0x4d0);
+ outb(trigger[1], 0x4d1);
+}
+
+static void save_ELCR(char *trigger)
+{
+ /* IRQ 0,1,2,8,13 are marked as reserved */
+ trigger[0] = inb(0x4d0) & 0xF8;
+ trigger[1] = inb(0x4d1) & 0xDE;
+}
+
+static int i8259A_resume(struct sys_device *dev)
+{
+ init_8259A(0);
+ restore_ELCR(irq_trigger);
+ return 0;
+}
+
+static int i8259A_suspend(struct sys_device *dev, u32 state)
+{
+ save_ELCR(irq_trigger);
+ return 0;
+}
+
+static struct sysdev_class i8259_sysdev_class = {
+ set_kset_name("i8259"),
+ .suspend = i8259A_suspend,
+ .resume = i8259A_resume,
+};
+
+static struct sys_device device_i8259A = {
+ .id = 0,
+ .cls = &i8259_sysdev_class,
+};
+
+static int __init i8259A_init_sysfs(void)
+{
+ int error = sysdev_class_register(&i8259_sysdev_class);
+ if (!error)
+ error = sysdev_register(&device_i8259A);
+ return error;
+}
+
+device_initcall(i8259A_init_sysfs);
/*
* IRQ2 is cascade interrupt to second interrupt controller
[-- Attachment #1.3: Type: text/plain, Size: 714 bytes --]
(from http://bugme.osdl.org/show_bug.cgi?id=2643 )
in the following combinations with the following results:
base + (a) = dead
base + (b) = dead
base + (a) - (b) = fine
So applying the ACPI patch and reverse-applying the (b) patch to it
actually fixes the problem, although the network cards still remain
dead.
Which narrows the problem down to patch (b) as the one breaking
suspend to ram on ASUS M2N. Hope this helps tracking things down.
Regards,
Georg
--
Georg C. F. Greve <greve-mXXj517/zsQ@public.gmane.org>
Free Software Foundation Europe (http://fsfeurope.org)
Brave GNU World (http://brave-gnu-world.org)
[-- Attachment #2: Type: application/pgp-signature, Size: 188 bytes --]
next prev parent reply other threads:[~2004-07-27 11:14 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-07-19 23:31 acpi-20040715: functional regression on ASUS M2N Georg C. F. Greve
[not found] ` <m3d62rzi9a.fsf-eMhNhoSsuh6q92djB/mqZw@public.gmane.org>
2004-07-20 19:03 ` Matthew Garrett
[not found] ` <1090350197.4828.5.camel-myFlNLNQP+Q@public.gmane.org>
2004-07-21 8:17 ` Georg C. F. Greve
[not found] ` <m3acxthizw.fsf-eMhNhoSsuh6q92djB/mqZw@public.gmane.org>
2004-07-27 11:14 ` Georg C. F. Greve [this message]
[not found] ` <m3oem1u2gg.fsf-glUV91rXKAHWIjgkaejU9x2eb7JE58TQ@public.gmane.org>
2004-07-27 11:24 ` Matthew Garrett
[not found] ` <1090927462.4412.26.camel-myFlNLNQP+Q@public.gmane.org>
2004-07-27 13:40 ` Georg C. F. Greve
-- strict thread matches above, loose matches on Subject: below --
2004-07-27 12:24 Li, Shaohua
[not found] ` <B44D37711ED29844BEA67908EAF36F036BCD7C-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-07-27 13:42 ` Georg C. F. Greve
2004-08-02 16:45 Nathan Bryant
[not found] ` <410E6F9C.2040904-p32f3XyCuykqcZcGjlUOXw@public.gmane.org>
2004-08-04 0:23 ` Georg C. F. Greve
2004-08-05 18:49 Nathan Bryant
[not found] ` <4112814C.2070808-p32f3XyCuykqcZcGjlUOXw@public.gmane.org>
2004-08-06 11:21 ` Georg C. F. Greve
[not found] ` <m37jsc3424.fsf-glUV91rXKAHWIjgkaejU9x2eb7JE58TQ@public.gmane.org>
2004-08-06 13:36 ` Nathan Bryant
[not found] ` <41138944.3060309-p32f3XyCuykqcZcGjlUOXw@public.gmane.org>
2004-08-06 16:54 ` Georg C. F. Greve
[not found] ` <m3u0vgurzy.fsf-glUV91rXKAHWIjgkaejU9x2eb7JE58TQ@public.gmane.org>
2004-08-06 17:07 ` Nathan Bryant
[not found] ` <4113BAD5.1030909-p32f3XyCuykqcZcGjlUOXw@public.gmane.org>
2004-08-06 20:50 ` Georg C. F. Greve
2004-08-31 8:15 ` Georg C. F. Greve
2004-08-06 15:23 ` Matthew Garrett
2004-08-06 15:50 ` Nathan Bryant
2004-08-06 16:38 ` Nate Lawson
2004-08-06 19:32 ` Nathan Bryant
2004-08-09 8:10 Li, Shaohua
2004-08-31 8:45 Li, Shaohua
[not found] ` <B44D37711ED29844BEA67908EAF36F03AC6ACF-4yWAQGcml65pB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2004-08-31 13:38 ` Georg C. F. Greve
[not found] ` <m3zn4bbf6x.fsf-eMhNhoSsuh6q92djB/mqZw@public.gmane.org>
2004-09-01 15:16 ` Georg C. F. Greve
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=m3oem1u2gg.fsf@reason.gnu-hamburg \
--to=greve-bsdwwrmya8dh2yiolo3vgti2o/jbrioy@public.gmane.org \
--cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
--cc=mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org \
--cc=shaohua.li-ral2JQCrhuEAvxtiuMwx3w@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