The FFB interrupt mapping registers need to compare IGN as well as INO since

they are totally programmable.
This commit is contained in:
eeh 2002-06-21 02:48:42 +00:00
parent f1ba365da8
commit fb5318516e

View File

@ -1,4 +1,4 @@
/* $NetBSD: psycho.c,v 1.50 2002/06/20 18:26:24 eeh Exp $ */
/* $NetBSD: psycho.c,v 1.51 2002/06/21 02:48:42 eeh Exp $ */
/*
* Copyright (c) 2001, 2002 Eduardo E. Horvath
@ -490,6 +490,7 @@ found:
/* Point the strbuf_ctl at the iommu_state */
pp->pp_sb.sb_is = sc->sc_is;
sc->sc_is->is_sb[0] = sc->sc_is->is_sb[1] = NULL;
if (PROM_getproplen(sc->sc_node, "no-streaming-cache") < 0) {
struct strbuf_ctl *sb = &pp->pp_sb;
vaddr_t va = (vaddr_t)&pp->pp_flush[0x40];
@ -1050,7 +1051,7 @@ psycho_intr_establish(t, ihandle, level, flags, handler, arg)
/* Hunt thru obio first */
for (intrmapptr = &sc->sc_regs->scsi_int_map,
intrclrptr = &sc->sc_regs->scsi_clr_int;
intrmapptr <= &sc->sc_regs->ffb1_int_map;
intrmapptr < &sc->sc_regs->ffb0_int_map;
intrmapptr++, intrclrptr++) {
if (INTINO(*intrmapptr) == ino)
goto found;
@ -1066,6 +1067,16 @@ psycho_intr_establish(t, ihandle, level, flags, handler, arg)
goto found;
}
}
/* Finally check the two FFB slots */
intrclrptr = NULL; /* XXX? */
for (intrmapptr = &sc->sc_regs->ffb0_int_map;
intrmapptr <= &sc->sc_regs->ffb1_int_map;
intrmapptr++) {
if (INTVEC(*intrmapptr) == ino)
goto found;
}
printf("Cannot find interrupt vector %lx\n", vec);
return (NULL);