acpi-20040715: functional regression on ASUS M2N
Quoted 7 lines
I added your suggested patch to
arch/i386/kernel/i8259.cand recompiled.
Problem persists, no difference I could tell.
I don't know why the patch masks out the reserved interrupts. None of the other code that sets ELCR is masking out those bits, and it all works fine. Possibly some chipsets use different edge/level behavior for these, and the save code is forcing them back to edge. Does the problem persist if you go into arch/i386/kernel/i8259.c and change:
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;
}to:
static void save_ELCR(char *trigger)
{
/* IRQ 0,1,2,8,13 are marked as reserved */
trigger[0] = inb(0x4d0);
trigger[1] = inb(0x4d1);
}-------------------------------------------------------
This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com
A message that is not in the archive (sent off-list or not yet received): [email protected]
|| On Mon, 02 Aug 2004 12:45:16 -0400 || Nathan Bryant <[email protected]> wrote:
Quoted 2 lines
Quoted 2 lines
I added your suggested patch to
arch/i386/kernel/i8259.cand recompiled. Problem persists, no difference I could tell.
nb> I don't know why the patch masks out the reserved
nb> interrupts. None of the other code that sets ELCR is masking out nb> those bits, and it all works fine. Possibly some chipsets use nb> different edge/level behavior for these, and the save code is nb> forcing them back to edge. Does the problem persist if you go nb> into arch/i386/kernel/i8259.c and change: [...]
Yup. Problem persists.
Just took a working, patched 2.6.7 and applied
===== arch/i386/kernel/i8259.c 1.30 vs edited =====
arch/i386/kernel/i8259.c +25 -0
@@ -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 =====
arch/x86_64/kernel/i8259.c +52 -1
65 lines not on this page · raw message
which is causing the problem and also
i386/kernel/i8259.c renamed from i386/kernel/i8259.c.orig +7 -3
@@ -251,14 +251,18 @@ static void restore_ELCR(char *trigger)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 ; + trigger[0 ] =inb (0x4d0 ); + trigger[1 ] =inb (0x4d1 ); }static int i8259A_resume (struct sys_device *dev) { -init_8259A (0 ); +unsigned long flags; +init_8259A (0 ); + +spin_lock_irqsave (&i8259A_lock, flags);restore_ELCR (irq_trigger); +spin_unlock_irqrestore (&i8259A_lock, flags);return 0 ; }
which we hoped to be fixing the problem.
The machine goes into S3 and upon wake up shows same behaviour as without "hopefully fixing patch": Crashes with "inu" in yellow on the left in upper row visible. After poweroff, only "needle-pushed reset" will bring it back to life.
So current ACPI is still showing functional regression on ASUS M2N.
Anyone other ideas? Anyone ready to solve the puzzle?
Regards,
Georg
Signature · 3 lines
Georg C. F. Greve <greve-mXXj517/[email protected]> Free Software Foundation Europe (http://fsfeurope.org) Brave GNU World (http://brave-gnu-world.org)