Check presence of Sbus interrupt properties before using them.
This commit is contained in:
parent
d5a471ccc9
commit
633fd1e1cc
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: am7930_sparc.c,v 1.44 1999/03/14 22:29:00 jonathan Exp $ */
|
||||
/* $NetBSD: am7930_sparc.c,v 1.45 1999/11/21 15:23:01 pk Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Rolf Grossmann
|
||||
|
@ -215,7 +215,8 @@ am7930attach_sbus(parent, self, aux)
|
|||
return;
|
||||
}
|
||||
sc->sc_bh = bh;
|
||||
am7930_sparc_attach(sc, sa->sa_pri);
|
||||
if (sa->sa_nintr != 0)
|
||||
am7930_sparc_attach(sc, sa->sa_pri);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: com_obio.c,v 1.3 1999/11/12 05:20:03 matt Exp $ */
|
||||
/* $NetBSD: com_obio.c,v 1.4 1999/11/21 15:23:01 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -185,9 +185,11 @@ com_obio_attach(parent, self, aux)
|
|||
sc->sc_frequency = COM_FREQ;
|
||||
com_attach_subr(sc);
|
||||
|
||||
(void)bus_intr_establish(sc->sc_iot, sa->sa_pri, 0, comintr, sc);
|
||||
|
||||
evcnt_attach(&osc->osc_com.sc_dev, "intr", &osc->osc_intrcnt);
|
||||
if (sa->sa_nintr != 0) {
|
||||
(void)bus_intr_establish(sc->sc_iot, sa->sa_pri,
|
||||
0, comintr, sc);
|
||||
evcnt_attach(&osc->osc_com.sc_dev, "intr", &osc->osc_intrcnt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Shutdown hook for buggy BIOSs that don't recognize the UART
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: fd.c,v 1.67 1999/03/24 05:51:10 mrg Exp $ */
|
||||
/* $NetBSD: fd.c,v 1.68 1999/11/21 15:23:01 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993, 1994, 1995 Charles M. Hannum.
|
||||
|
@ -484,7 +484,8 @@ fdcattach_obio(parent, self, aux)
|
|||
bp = sa->sa_bp;
|
||||
}
|
||||
|
||||
fdcattach(fdc, sa->sa_pri, bp);
|
||||
if (sa->sa_nintr != 0)
|
||||
fdcattach(fdc, sa->sa_pri, bp);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tctrl.c,v 1.2 1999/08/11 00:46:06 matt Exp $ */
|
||||
/* $NetBSD: tctrl.c,v 1.3 1999/11/21 15:23:02 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998 The NetBSD Foundation, Inc.
|
||||
|
@ -170,8 +170,11 @@ tctrl_attach(struct device *parent, struct device *self, void *aux)
|
|||
tctrl_write(sc, TS102_REG_UCTRL_STS, TS102_UCTRL_STS_RXNE_STA);
|
||||
}
|
||||
|
||||
(void)bus_intr_establish(sc->sc_memt, sa->sa_pri, 0, tctrl_intr, sc);
|
||||
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
|
||||
if (sa->sa_nintr != 0) {
|
||||
(void)bus_intr_establish(sc->sc_memt, sa->sa_pri,
|
||||
0, tctrl_intr, sc);
|
||||
evcnt_attach(&sc->sc_dev, "intr", &sc->sc_intrcnt);
|
||||
}
|
||||
|
||||
/* See what the external status is
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: zs.c,v 1.70 1999/11/07 16:36:16 pk Exp $ */
|
||||
/* $NetBSD: zs.c,v 1.71 1999/11/21 15:23:02 pk Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1996 The NetBSD Foundation, Inc.
|
||||
|
@ -292,7 +292,8 @@ zs_attach_obio(parent, self, aux)
|
|||
struct sbus_attach_args *sa = &uoba->uoba_sbus;
|
||||
zsc->zsc_bustag = sa->sa_bustag;
|
||||
zsc->zsc_dmatag = sa->sa_dmatag;
|
||||
zs_attach(zsc, sa->sa_pri);
|
||||
if (sa->sa_nintr != 0)
|
||||
zs_attach(zsc, sa->sa_pri);
|
||||
} else {
|
||||
struct obio4_attach_args *oba = &uoba->uoba_oba4;
|
||||
zsc->zsc_bustag = oba->oba_bustag;
|
||||
|
|
Loading…
Reference in New Issue