diff options
author | Henric Jungheim <henric@cvs.openbsd.org> | 2003-06-24 21:54:40 +0000 |
---|---|---|
committer | Henric Jungheim <henric@cvs.openbsd.org> | 2003-06-24 21:54:40 +0000 |
commit | 355b8560084501d10eae7686c8385754bc6c7072 (patch) | |
tree | d3bc0a5b778c1c6b51beb7fedae743f3fc436c13 /sys/arch/sparc64/dev | |
parent | 02503c73b4a809f21312fef8bf66cfe5d0f1a50f (diff) |
Add a "where" argument to the sparc64 interrupt code. This lets us
associate a name with each interrupt handler. This is not visible
outside the kernel (yet).
ok jason@
Diffstat (limited to 'sys/arch/sparc64/dev')
-rw-r--r-- | sys/arch/sparc64/dev/ce4231.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/com_ebus.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/comkbd_ebus.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/pci_machdep.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/pckbc_ebus.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/psycho.c | 101 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/sab.c | 4 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/sbus.c | 39 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/schizo.c | 20 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/stp_sbus.c | 6 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/zs.c | 6 |
11 files changed, 90 insertions, 110 deletions
diff --git a/sys/arch/sparc64/dev/ce4231.c b/sys/arch/sparc64/dev/ce4231.c index 47c27582d83..b2019b81182 100644 --- a/sys/arch/sparc64/dev/ce4231.c +++ b/sys/arch/sparc64/dev/ce4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ce4231.c,v 1.14 2003/06/02 20:02:49 jason Exp $ */ +/* $OpenBSD: ce4231.c,v 1.15 2003/06/24 21:54:39 henric Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -247,13 +247,13 @@ ce4231_attach(parent, self, aux) } sc->sc_cih = bus_intr_establish(sc->sc_bustag, ea->ea_intrs[0], - IPL_AUDIO, 0, ce4231_cintr, sc); + IPL_AUDIO, 0, ce4231_cintr, sc, self->dv_xname); if (sc->sc_cih == NULL) { printf(": couldn't establish capture interrupt\n"); return; } sc->sc_pih = bus_intr_establish(sc->sc_bustag, ea->ea_intrs[1], - IPL_AUDIO, 0, ce4231_pintr, sc); + IPL_AUDIO, 0, ce4231_pintr, sc, self->dv_xname); if (sc->sc_pih == NULL) { printf(": couldn't establish play interrupt1\n"); return; diff --git a/sys/arch/sparc64/dev/com_ebus.c b/sys/arch/sparc64/dev/com_ebus.c index 1afdc6553c8..94af5918362 100644 --- a/sys/arch/sparc64/dev/com_ebus.c +++ b/sys/arch/sparc64/dev/com_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: com_ebus.c,v 1.8 2003/02/17 01:29:20 henric Exp $ */ +/* $OpenBSD: com_ebus.c,v 1.9 2003/06/24 21:54:39 henric Exp $ */ /* $NetBSD: com_ebus.c,v 1.6 2001/07/24 19:27:10 eeh Exp $ */ /* @@ -143,7 +143,7 @@ com_ebus_attach(parent, self, aux) for (i = 0; i < ea->ea_nintrs; i++) bus_intr_establish(sc->sc_iot, ea->ea_intrs[i], - IPL_TTY, 0, comintr, sc); + IPL_TTY, 0, comintr, sc, self->dv_xname); /* Figure out if we're the console. */ com_is_input = (ea->ea_node == OF_instance_to_package(OF_stdin())); diff --git a/sys/arch/sparc64/dev/comkbd_ebus.c b/sys/arch/sparc64/dev/comkbd_ebus.c index a163e4e782a..d4d375bd12b 100644 --- a/sys/arch/sparc64/dev/comkbd_ebus.c +++ b/sys/arch/sparc64/dev/comkbd_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: comkbd_ebus.c,v 1.13 2003/06/02 20:02:49 jason Exp $ */ +/* $OpenBSD: comkbd_ebus.c,v 1.14 2003/06/24 21:54:39 henric Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -228,7 +228,7 @@ comkbd_attach(parent, self, aux) } sc->sc_ih = bus_intr_establish(sc->sc_iot, - ea->ea_intrs[0], IPL_TTY, 0, comkbd_intr, sc); + ea->ea_intrs[0], IPL_TTY, 0, comkbd_intr, sc, self->dv_xname); if (sc->sc_ih == NULL) { printf(": can't get hard intr\n"); return; diff --git a/sys/arch/sparc64/dev/pci_machdep.c b/sys/arch/sparc64/dev/pci_machdep.c index c4c01bd2cbe..867053bd25a 100644 --- a/sys/arch/sparc64/dev/pci_machdep.c +++ b/sys/arch/sparc64/dev/pci_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pci_machdep.c,v 1.13 2003/05/16 06:59:12 henric Exp $ */ +/* $OpenBSD: pci_machdep.c,v 1.14 2003/06/24 21:54:39 henric Exp $ */ /* $NetBSD: pci_machdep.c,v 1.22 2001/07/20 00:07:13 eeh Exp $ */ /* @@ -460,7 +460,7 @@ pci_intr_establish(pc, ih, level, func, arg, what) DPRINTF(SPDB_INTR, ("pci_intr_establish: ih %lu; level %d", (u_long)ih, level)); - cookie = bus_intr_establish(pp->pp_memt, ih, level, 0, func, arg); + cookie = bus_intr_establish(pp->pp_memt, ih, level, 0, func, arg, what); DPRINTF(SPDB_INTR, ("; returning handle %p\n", cookie)); return (cookie); diff --git a/sys/arch/sparc64/dev/pckbc_ebus.c b/sys/arch/sparc64/dev/pckbc_ebus.c index b0cf2e79125..ccfcffdc1e5 100644 --- a/sys/arch/sparc64/dev/pckbc_ebus.c +++ b/sys/arch/sparc64/dev/pckbc_ebus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pckbc_ebus.c,v 1.4 2003/06/02 20:02:49 jason Exp $ */ +/* $OpenBSD: pckbc_ebus.c,v 1.5 2003/06/24 21:54:39 henric Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -143,14 +143,14 @@ pckbc_ebus_attach(parent, self, aux) psc->intr_establish = pckbc_ebus_intr_establish; sc->sc_irq[0] = bus_intr_establish(ea->ea_iotag, ea->ea_intrs[0], - IPL_TTY, 0, pckbcintr, psc); + IPL_TTY, 0, pckbcintr, psc, self->dv_xname); if (sc->sc_irq[0] == NULL) { printf(": couldn't get intr0\n"); return; } sc->sc_irq[1] = bus_intr_establish(ea->ea_iotag, ea->ea_intrs[1], - IPL_TTY, 0, pckbcintr, psc); + IPL_TTY, 0, pckbcintr, psc, self->dv_xname); if (sc->sc_irq[1] == NULL) { printf(": couldn't get intr1\n"); return; diff --git a/sys/arch/sparc64/dev/psycho.c b/sys/arch/sparc64/dev/psycho.c index 20524916018..9584ae4a8ba 100644 --- a/sys/arch/sparc64/dev/psycho.c +++ b/sys/arch/sparc64/dev/psycho.c @@ -1,4 +1,4 @@ -/* $OpenBSD: psycho.c,v 1.36 2003/06/11 03:16:12 henric Exp $ */ +/* $OpenBSD: psycho.c,v 1.37 2003/06/24 21:54:39 henric Exp $ */ /* $NetBSD: psycho.c,v 1.39 2001/10/07 20:30:41 eeh Exp $ */ /* @@ -101,7 +101,7 @@ paddr_t psycho_bus_mmap(bus_space_tag_t, bus_space_tag_t, bus_addr_t, off_t, int _psycho_bus_map(bus_space_tag_t, bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); void *psycho_intr_establish(bus_space_tag_t, bus_space_tag_t, int, int, int, - int (*)(void *), void *); + int (*)(void *), void *, const char *); int psycho_dmamap_create(bus_dma_tag_t, bus_dma_tag_t, bus_size_t, int, bus_size_t, bus_size_t, int, bus_dmamap_t *); @@ -1066,7 +1066,7 @@ psycho_intr_map(struct pci_attach_args *pa, pci_intr_handle_t *ihp) */ void * psycho_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, - int level, int flags, int (*handler)(void *), void *arg) + int level, int flags, int (*handler)(void *), void *arg, const char *what) { struct psycho_pbm *pp = t->cookie; struct psycho_softc *sc = pp->pp_sc; @@ -1076,11 +1076,6 @@ psycho_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, int ino; long vec = INTVEC(ihandle); - ih = (struct intrhand *) - malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT); - if (ih == NULL) - return (NULL); - /* * Hunt through all the interrupt mapping regs to look for our * interrupt vector. @@ -1106,62 +1101,52 @@ psycho_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, level = 2; } - if ((flags & BUS_INTR_ESTABLISH_SOFTINTR) == 0) { + if (flags & BUS_INTR_ESTABLISH_SOFTINTR) + goto found; - DPRINTF(PDB_INTR, - ("\npsycho: intr %lx: %p\nHunting for IRQ...\n", - (long)ino, intrlev[ino])); + DPRINTF(PDB_INTR, + ("\npsycho: intr %lx: %p\nHunting for IRQ...\n", + (long)ino, intrlev[ino])); + + /* Hunt thru obio first */ + for (intrmapptr = psycho_psychoreg_vaddr(sc, scsi_int_map), + intrclrptr = psycho_psychoreg_vaddr(sc, scsi_clr_int); + intrmapptr < (volatile u_int64_t *) + psycho_psychoreg_vaddr(sc, ffb0_int_map); + intrmapptr++, intrclrptr++) { + if (INTINO(*intrmapptr) == ino) + goto found; + } - /* Hunt thru obio first */ - for (intrmapptr = psycho_psychoreg_vaddr(sc, scsi_int_map), - intrclrptr = psycho_psychoreg_vaddr(sc, scsi_clr_int); - intrmapptr < (volatile u_int64_t *) - psycho_psychoreg_vaddr(sc, ffb0_int_map); - intrmapptr++, intrclrptr++) { - if (INTINO(*intrmapptr) == ino) - goto found; - } + /* Now do PCI interrupts */ + for (intrmapptr = psycho_psychoreg_vaddr(sc, pcia_slot0_int), + intrclrptr = psycho_psychoreg_vaddr(sc, pcia0_clr_int[0]); + intrmapptr <= (volatile u_int64_t *) + psycho_psychoreg_vaddr(sc, pcib_slot3_int); + intrmapptr++, intrclrptr += 4) { + /* Skip PCI-A Slot 2 and PCI-A Slot 3 on psycho's */ + if (sc->sc_mode == PSYCHO_MODE_PSYCHO && + (intrmapptr == + psycho_psychoreg_vaddr(sc, pcia_slot2_int) || + intrmapptr == + psycho_psychoreg_vaddr(sc, pcia_slot3_int))) + continue; - /* Now do PCI interrupts */ - for (intrmapptr = psycho_psychoreg_vaddr(sc, pcia_slot0_int), - intrclrptr = psycho_psychoreg_vaddr(sc, pcia0_clr_int[0]); - intrmapptr <= (volatile u_int64_t *) - psycho_psychoreg_vaddr(sc, pcib_slot3_int); - intrmapptr++, intrclrptr += 4) { - /* Skip PCI-A Slot 2 and PCI-A Slot 3 on psycho's */ - if (sc->sc_mode == PSYCHO_MODE_PSYCHO && - (intrmapptr == - psycho_psychoreg_vaddr(sc, pcia_slot2_int) || - intrmapptr == - psycho_psychoreg_vaddr(sc, pcia_slot3_int))) - continue; - - if (((*intrmapptr ^ vec) & 0x3c) == 0) { - intrclrptr += vec & 0x3; - goto found; - } + if (((*intrmapptr ^ vec) & 0x3c) == 0) { + intrclrptr += vec & 0x3; + goto found; } - printf("Cannot find interrupt vector %lx\n", vec); - return (NULL); - - found: - /* Register the map and clear intr registers */ - ih->ih_map = intrmapptr; - ih->ih_clr = intrclrptr; } -#ifdef NOT_DEBUG - if (psycho_debug & PDB_INTR) { - long i; - - for (i = 0; i < 500000000; i++) - continue; + printf("Cannot find interrupt vector %lx\n", vec); + return (NULL); + +found: + ih = bus_intr_allocate(t0, handler, arg, ino | sc->sc_ign, level, + intrmapptr, intrclrptr, what); + if (ih == NULL) { + printf("Cannot allocate interrupt vector %lx\n", vec); + return (NULL); } -#endif - - ih->ih_fun = handler; - ih->ih_arg = arg; - ih->ih_pil = level; - ih->ih_number = ino | sc->sc_ign; DPRINTF(PDB_INTR, ( "\ninstalling handler %p arg %p with number %x pil %u", diff --git a/sys/arch/sparc64/dev/sab.c b/sys/arch/sparc64/dev/sab.c index a7f70360925..fc22a641db7 100644 --- a/sys/arch/sparc64/dev/sab.c +++ b/sys/arch/sparc64/dev/sab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sab.c,v 1.12 2003/06/02 20:02:49 jason Exp $ */ +/* $OpenBSD: sab.c,v 1.13 2003/06/24 21:54:39 henric Exp $ */ /* * Copyright (c) 2001 Jason L. Wright (jason@thought.net) @@ -252,7 +252,7 @@ sab_attach(parent, self, aux) BUS_SPACE_SET_FLAGS(sc->sc_bt, sc->sc_bh, BSHDB_NO_ACCESS); sc->sc_ih = bus_intr_establish(sc->sc_bt, ea->ea_intrs[0], - IPL_TTY, 0, sab_intr, sc); + IPL_TTY, 0, sab_intr, sc, self->dv_xname); if (sc->sc_ih == NULL) { printf(": can't map interrupt\n"); return; diff --git a/sys/arch/sparc64/dev/sbus.c b/sys/arch/sparc64/dev/sbus.c index 6cddc5c68ce..b5c811a1ced 100644 --- a/sys/arch/sparc64/dev/sbus.c +++ b/sys/arch/sparc64/dev/sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sbus.c,v 1.19 2003/06/18 17:33:35 miod Exp $ */ +/* $OpenBSD: sbus.c,v 1.20 2003/06/24 21:54:39 henric Exp $ */ /* $NetBSD: sbus.c,v 1.46 2001/10/07 20:30:41 eeh Exp $ */ /*- @@ -151,7 +151,8 @@ static void *sbus_intr_establish(bus_space_tag_t, bus_space_tag_t, int, /*`device class' priority*/ int, /*flags*/ int (*)(void *), /*handler*/ - void *); /*handler arg*/ + void *, /*handler arg*/ + const char *); /*what*/ /* autoconfiguration driver */ @@ -644,21 +645,18 @@ sbus_get_intr(struct sbus_softc *sc, int node, struct sbus_intr **ipp, int *np, */ void * sbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level, - int flags, int (*handler)(void *), void *arg) + int flags, int (*handler)(void *), void *arg, const char *what) { struct sbus_softc *sc = t->cookie; struct sysioreg *sysio; struct intrhand *ih; + volatile u_int64_t *map = NULL; + volatile u_int64_t *clr = NULL; int ipl; long vec = pri; sysio = bus_space_vaddr(sc->sc_bustag, sc->sc_bh); - ih = (struct intrhand *) - malloc(sizeof(struct intrhand), M_DEVBUF, M_NOWAIT); - if (ih == NULL) - return (NULL); - if ((flags & BUS_INTR_ESTABLISH_SOFTINTR) != 0) ipl = 1 << vec; else if ((vec & SBUS_INTR_COMPAT) != 0) @@ -682,16 +680,16 @@ sbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level, bus_space_handle_t maph; int slot = INTSLOT(pri); - ih->ih_map = &(&sysio->sbus_slot0_int)[slot]; - ih->ih_clr = &sysio->sbus0_clr_int[vec]; + map = &(&sysio->sbus_slot0_int)[slot]; + clr = &sysio->sbus0_clr_int[vec]; #ifdef DEBUG if (sbus_debug & SDB_INTR) { - int64_t intrmap = *ih->ih_map; + int64_t intrmap = *map; printf("SBUS %lx IRQ as %llx in slot %d\n", (long)vec, (long long)intrmap, slot); printf("\tmap addr %p clr addr %p\n", - ih->ih_map, ih->ih_clr); + map, clr); } #endif /* Enable the interrupt */ @@ -705,7 +703,7 @@ sbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level, * to the appropriate offset from sc->sc_bustag and * sc->sc_bh. */ - bus_space_map(sc->sc_bustag, (bus_addr_t)ih->ih_map, 8, + bus_space_map(sc->sc_bustag, (bus_addr_t)map, 8, BUS_SPACE_MAP_PROMADDRESS, &maph); bus_space_write_8(sc->sc_bustag, maph, 0, vec); } else { @@ -725,9 +723,9 @@ sbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level, ("OBIO %lx IRQ as %lx in slot %d\n", vec, (long)intrmap, i)); /* Register the map and clear intr registers */ - ih->ih_map = &intrptr[i]; + map = &intrptr[i]; intrptr = (int64_t *)&sysio->scsi_clr_int; - ih->ih_clr = &intrptr[i]; + clr = &intrptr[i]; /* Enable the interrupt */ intrmap |= INTMAP_V; /* @@ -739,7 +737,7 @@ sbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level, * sc->sc_bh. */ bus_space_map(sc->sc_bustag, - (bus_addr_t)ih->ih_map, 8, + (bus_addr_t)map, 8, BUS_SPACE_MAP_PROMADDRESS, &maph); bus_space_write_8(sc->sc_bustag, maph, 0, (u_long)intrmap); @@ -751,11 +749,12 @@ sbus_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int pri, int level, if (sbus_debug & SDB_INTR) { long i; for (i = 0; i < 400000000; i++); } #endif - ih->ih_fun = handler; - ih->ih_arg = arg; - ih->ih_number = vec; - ih->ih_pil = ipl; + ih = bus_intr_allocate(t0, handler, arg, vec, ipl, map, clr, what); + if (ih == NULL) + return (ih); + intr_establish(ih->ih_pil, ih); + return (ih); } diff --git a/sys/arch/sparc64/dev/schizo.c b/sys/arch/sparc64/dev/schizo.c index b810b820fb1..fdffac2237b 100644 --- a/sys/arch/sparc64/dev/schizo.c +++ b/sys/arch/sparc64/dev/schizo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: schizo.c,v 1.15 2003/06/11 03:16:12 henric Exp $ */ +/* $OpenBSD: schizo.c,v 1.16 2003/06/24 21:54:39 henric Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -82,7 +82,7 @@ paddr_t schizo_bus_mmap(bus_space_tag_t, bus_addr_t, off_t, int, int); int _schizo_bus_map(bus_space_tag_t, bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); void *_schizo_intr_establish(bus_space_tag_t, bus_space_tag_t, int, int, int, - int (*)(void *), void *); + int (*)(void *), void *, const char *); paddr_t _schizo_bus_mmap(bus_space_tag_t, bus_space_tag_t, bus_addr_t, off_t, int, int); int schizo_dmamap_create(bus_dma_tag_t, bus_dma_tag_t, bus_size_t, int, @@ -437,7 +437,7 @@ _schizo_bus_mmap(bus_space_tag_t t, bus_space_tag_t t0, bus_addr_t paddr, void * _schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, - int level, int flags, int (*handler)(void *), void *arg) + int level, int flags, int (*handler)(void *), void *arg, const char *what) { struct schizo_pbm *pbm = t->cookie; struct intrhand *ih = NULL; @@ -445,11 +445,6 @@ _schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, int ino; long vec = INTVEC(ihandle); - ih = (struct intrhand *)malloc(sizeof(struct intrhand), M_DEVBUF, - M_NOWAIT); - if (ih == NULL) - return (NULL); - vec = INTVEC(ihandle); ino = INTINO(vec); @@ -468,11 +463,10 @@ _schizo_intr_establish(bus_space_tag_t t, bus_space_tag_t t0, int ihandle, intrclrptr = &pbmreg->iclr[ino]; } - ih->ih_map = intrmapptr; - ih->ih_clr = intrclrptr; - ih->ih_fun = handler; - ih->ih_pil = level; - ih->ih_number = ino; + ih = bus_intr_allocate(t0, handler, arg, ino, level, intrmapptr, + intrclrptr, what); + if (ih == NULL) + return (NULL); intr_establish(ih->ih_pil, ih); diff --git a/sys/arch/sparc64/dev/stp_sbus.c b/sys/arch/sparc64/dev/stp_sbus.c index ff6173e5a2c..13070497042 100644 --- a/sys/arch/sparc64/dev/stp_sbus.c +++ b/sys/arch/sparc64/dev/stp_sbus.c @@ -1,4 +1,4 @@ -/* $OpenBSD: stp_sbus.c,v 1.2 2003/06/23 19:47:03 jason Exp $ */ +/* $OpenBSD: stp_sbus.c,v 1.3 2003/06/24 21:54:39 henric Exp $ */ /* $NetBSD: stp4020.c,v 1.23 2002/06/01 23:51:03 lukem Exp $ */ /*- @@ -166,10 +166,10 @@ stpattach(parent, self, aux) * the lower level for PC card I/O. */ bus_intr_establish(sa->sa_bustag, sa->sa_intr[1].sbi_pri, - IPL_NONE, 0, stp4020_statintr, sc); + IPL_NONE, 0, stp4020_statintr, sc, self->dv_xname); bus_intr_establish(sa->sa_bustag, sa->sa_intr[0].sbi_pri, - IPL_NONE, 0, stp4020_iointr, sc); + IPL_NONE, 0, stp4020_iointr, sc, self->dv_xname); stpattach_common(sc, sa->sa_frequency); } diff --git a/sys/arch/sparc64/dev/zs.c b/sys/arch/sparc64/dev/zs.c index 76f7643a15a..5c3f822fc68 100644 --- a/sys/arch/sparc64/dev/zs.c +++ b/sys/arch/sparc64/dev/zs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: zs.c,v 1.12 2003/02/17 01:29:20 henric Exp $ */ +/* $OpenBSD: zs.c,v 1.13 2003/06/24 21:54:39 henric Exp $ */ /* $NetBSD: zs.c,v 1.29 2001/05/30 15:24:24 lukem Exp $ */ /*- @@ -375,7 +375,9 @@ zs_attach(zsc, zsd, pri) * to the interrupt handlers aren't used. Note, we only do this * once since both SCCs interrupt at the same level and vector. */ - bus_intr_establish(zsc->zsc_bustag, pri, IPL_SERIAL, 0, zshard, zsc); + if (bus_intr_establish(zsc->zsc_bustag, pri, IPL_SERIAL, 0, zshard, + zsc, zsc->zsc_dev.dv_xname) == NULL) + panic("zsattach: could not establish interrupt"); if (!(zsc->zsc_softintr = softintr_establish(softpri, zssoft, zsc))) panic("zsattach: could not establish soft interrupt"); |