Re: acpi-20040715: functional regression on ASUS M2N

Nathan Bryant
2004-08-06T13:36:04Z

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

Georg C. F. Greve wrote:

> nb> Georg, can you add some printk's to save_ELCR and log the values
> nb> that we are actually saving?
>
>I'll be glad to do that, but will have to see how to do it in a way
>that I actually see what is printed. Haven't done much kernel hacking
>really, is there "the right way" to do it?
>
>
The attached patch is good enough. Since the call to restore_ELCR is
crashing you, we comment it out, and log the raw values from save_ELCR:

By the way, can you send the output of lspci?

[-- Attachment #2: elcrlog.patch --]
[-- Type: text/x-patch, Size: 870 bytes --]

===== arch/i386/kernel/i8259.c 1.35 vs edited =====
--- 1.35/arch/i386/kernel/i8259.c 2004-07-14 16:00:16 -04:00
+++ edited/arch/i386/kernel/i8259.c 2004-08-06 09:33:02 -04:00
@@ -244,21 +244,23 @@
*/
static void restore_ELCR(char *trigger)
{
- outb(trigger[0], 0x4d0);
- outb(trigger[1], 0x4d1);
+ /* IRQ 0,1,2,8,13 are marked as reserved */
+ outb(trigger[0] & 0xF8, 0x4d0);
+ outb(trigger[1] & 0xDE, 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;
+ trigger[0] = inb(0x4d0);
+ trigger[1] = inb(0x4d1);
+ printk(KERN_DEBUG "i8259: saving ELCR: 0x%02x 0x%02x\n",
+ trigger[0], trigger[1]);
}

static int i8259A_resume(struct sys_device *dev)
{
init_8259A(0);
- restore_ELCR(irq_trigger);
+ /*restore_ELCR(irq_trigger);*/
return 0;
}