Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc64/dev We want to index the PCI `interrupt cle...



details:   https://anonhg.NetBSD.org/src/rev/b4f69552f98b
branches:  trunk
changeset: 494303:b4f69552f98b
user:      pk <pk%NetBSD.org@localhost>
date:      Wed Jul 05 12:11:59 2000 +0000

description:
We want to index the PCI `interrupt clear' registers with the Interrupt
Number Offset.  (this stuff needs a serious cleanup).

diffstat:

 sys/arch/sparc64/dev/psycho.c |  13 ++++++++-----
 1 files changed, 8 insertions(+), 5 deletions(-)

diffs (41 lines):

diff -r 313ffd380919 -r b4f69552f98b sys/arch/sparc64/dev/psycho.c
--- a/sys/arch/sparc64/dev/psycho.c     Wed Jul 05 12:03:50 2000 +0000
+++ b/sys/arch/sparc64/dev/psycho.c     Wed Jul 05 12:11:59 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: psycho.c,v 1.18 2000/07/03 17:42:37 eeh Exp $  */
+/*     $NetBSD: psycho.c,v 1.19 2000/07/05 12:11:59 pk Exp $   */
 
 /*
  * Copyright (c) 1999, 2000 Matthew R. Green
@@ -855,7 +855,7 @@
        0, 0, 0, 0,     /* PCI A, Slot 2, INTA#/B#/C#/D# (unavailable) */
        0, 0, 0, 0,     /* PCI A, Slot 3, INTA#/B#/C#/D# (unavailable) */
        0, 0, 0, 0,     /* PCI B, Slot 0, INTA#/B#/C#/D# */
-       0, 0, 0, 0,     /* PCI B, Slot 0, INTA#/B#/C#/D# */
+       0, 0, 0, 0,     /* PCI B, Slot 1, INTA#/B#/C#/D# */
        0, 0, 0, 0,     /* PCI B, Slot 2, INTA#/B#/C#/D# */
        0, 0, 0, 0,     /* PCI B, Slot 3, INTA#/B#/C#/D# */
        PIL_SCSI,       /* SCSI */
@@ -942,7 +942,7 @@
                        i = INTPCIINOX(vec);
 
                        intrmapptr = &((&sc->sc_regs->pcia_slot0_int)[i]);
-                       intrclrptr = &sc->sc_regs->pcia0_clr_int[i<<2];
+                       intrclrptr = &sc->sc_regs->pcia0_clr_int[ino];
 
                        DPRINTF(PDB_INTR, ("- turning on PCI intr %d", i));
                } else {
@@ -992,8 +992,11 @@
        ih->ih_arg = arg;
        ih->ih_number = ino | 0x7c0;
        ih->ih_pil = pci_ino_to_ipl_table[ino];
-       DPRINTF(PDB_INTR, ("; installing handler %p with ino %u pil %u\n",
-           handler, (u_int)ino, (u_int)ih->ih_pil));
+
+       DPRINTF(PDB_INTR, (
+           "; installing handler %p arg %p with ino %u pil %u\n",
+           handler, arg, (u_int)ino, (u_int)ih->ih_pil));
+
        intr_establish(ih->ih_pil, ih);
        return (ih);
 }



Home | Main Index | Thread Index | Old Index