Do not forget to set the ``specific EOI'' bit when sending a... specific EOI;
authormiod <miod@openbsd.org>
Sat, 9 Aug 2008 16:41:21 +0000 (16:41 +0000)
committermiod <miod@openbsd.org>
Sat, 9 Aug 2008 16:41:21 +0000 (16:41 +0000)
from NetBSD.

sys/arch/alpha/pci/sio_pic.c

index 6358b45..52ca548 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: sio_pic.c,v 1.28 2008/07/29 18:39:45 miod Exp $       */
+/*     $OpenBSD: sio_pic.c,v 1.29 2008/08/09 16:41:21 miod Exp $       */
 /* $NetBSD: sio_pic.c,v 1.28 2000/06/06 03:10:13 thorpej Exp $ */
 
 /*-
@@ -625,8 +625,10 @@ static void
 specific_eoi(irq)
        int irq;
 {
-       if (irq > 7)
+       if (irq > 7) {
                bus_space_write_1(sio_iot,
-                   sio_ioh_icu2, 0, 0x20 | (irq & 0x07));      /* XXX */
-       bus_space_write_1(sio_iot, sio_ioh_icu1, 0, 0x20 | (irq > 7 ? 2 : irq));
+                   sio_ioh_icu2, 0, 0x60 | (irq & 0x07));      /* XXX */
+               irq = 2;
+       }
+       bus_space_write_1(sio_iot, sio_ioh_icu1, 0, 0x60 | irq);
 }