diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2002-01-24 03:06:55 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2002-01-24 03:06:55 +0000 |
commit | 43f35412d58c301de3ac99693767213c5a8f3dd7 (patch) | |
tree | bf8f1955c3f435e063511c7ee3f6c37bb0240433 /sys/arch/sparc64 | |
parent | 4a47826ed5a50d37402511d7814ea34045212674 (diff) |
Save the interrupt cookies and fix the printfs for failure.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/dev/ce4231.c | 16 | ||||
-rw-r--r-- | sys/arch/sparc64/dev/ce4231var.h | 3 |
2 files changed, 11 insertions, 8 deletions
diff --git a/sys/arch/sparc64/dev/ce4231.c b/sys/arch/sparc64/dev/ce4231.c index 255c24bb35b..73353959070 100644 --- a/sys/arch/sparc64/dev/ce4231.c +++ b/sys/arch/sparc64/dev/ce4231.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ce4231.c,v 1.4 2002/01/20 23:21:54 ericj Exp $ */ +/* $OpenBSD: ce4231.c,v 1.5 2002/01/24 03:06:54 jason Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -243,14 +243,16 @@ ce4231_attach(parent, self, aux) return; } - if (bus_intr_establish(ea->ea_bustag, ea->ea_intrs[0], IPL_AUDIO, 0, - ce4231_cintr, sc) == NULL) { - printf(": couldn't establish interrupt1\n"); + sc->sc_cih = bus_intr_establish(ea->ea_bustag, ea->ea_intrs[0], + IPL_AUDIO, 0, ce4231_cintr, sc); + if (sc->sc_cih == NULL) { + printf(": couldn't establish capture interrupt\n"); return; } - if (bus_intr_establish(ea->ea_bustag, ea->ea_intrs[1], IPL_AUDIO, 0, - ce4231_pintr, sc) == NULL) { - printf(": couldn't establish interrupt1\n"); + sc->sc_pih = bus_intr_establish(ea->ea_bustag, ea->ea_intrs[1], + IPL_AUDIO, 0, ce4231_pintr, sc); + if (sc->sc_pih == NULL) { + printf(": couldn't establish play interrupt1\n"); return; } diff --git a/sys/arch/sparc64/dev/ce4231var.h b/sys/arch/sparc64/dev/ce4231var.h index 4edb1c9dbd0..33fb3387dea 100644 --- a/sys/arch/sparc64/dev/ce4231var.h +++ b/sys/arch/sparc64/dev/ce4231var.h @@ -1,4 +1,4 @@ -/* $OpenBSD: ce4231var.h,v 1.2 2001/10/02 00:26:24 jason Exp $ */ +/* $OpenBSD: ce4231var.h,v 1.3 2002/01/24 03:06:54 jason Exp $ */ /* * Copyright (c) 1999 Jason L. Wright (jason@thought.net) @@ -88,4 +88,5 @@ struct ce4231_softc { u_int32_t sc_lastaddr; struct cs_dma *sc_dmas; /* dma list */ struct cs_dma *sc_nowplaying; + void *sc_pih, *sc_cih; }; |