summaryrefslogtreecommitdiff
path: root/sys/dev/sbus
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-11-28 05:42:25 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-11-28 05:42:25 +0000
commita49e00c75e71ca45bae7c9392217d459ac28dca6 (patch)
treeac8f5f2c4bbc11fd99ebb02e3eb1ad91142481ba /sys/dev/sbus
parentb8c114e45206188bcb3d1e1c3f6ba8cf28a617b4 (diff)
be sure to call ether_ioctl, like everyone else.
also, complain if we don't get an interrupt established. current state: be doesn't interrupt, qe gets rx/tx sbus dma errors *sigh*
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r--sys/dev/sbus/be.c15
-rw-r--r--sys/dev/sbus/qe.c14
2 files changed, 23 insertions, 6 deletions
diff --git a/sys/dev/sbus/be.c b/sys/dev/sbus/be.c
index 38859b1d1b0..750e915c4e6 100644
--- a/sys/dev/sbus/be.c
+++ b/sys/dev/sbus/be.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: be.c,v 1.4 2001/11/27 02:33:15 jason Exp $ */
+/* $OpenBSD: be.c,v 1.5 2001/11/28 05:42:24 jason Exp $ */
/* $NetBSD: be.c,v 1.26 2001/03/20 15:39:20 pk Exp $ */
/*-
@@ -296,9 +296,11 @@ beattach(parent, self, aux)
sc->sc_burst &= qec->sc_burst;
/* Establish interrupt handler */
- if (sa->sa_nintr)
- (void)bus_intr_establish(sa->sa_bustag, sa->sa_pri, IPL_NET,
- 0, beintr, sc);
+ if (sa->sa_nintr == 0 || bus_intr_establish(sa->sa_bustag, sa->sa_pri,
+ IPL_NET, 0, beintr, sc) == NULL) {
+ printf(": no interrupt established\n");
+ return;
+ }
myetheraddr(sc->sc_arpcom.ac_enaddr);
printf(" address %s\n", ether_sprintf(sc->sc_arpcom.ac_enaddr));
@@ -982,6 +984,11 @@ beioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return (error);
+ }
+
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
diff --git a/sys/dev/sbus/qe.c b/sys/dev/sbus/qe.c
index 6abecc4a46a..e85f6d82091 100644
--- a/sys/dev/sbus/qe.c
+++ b/sys/dev/sbus/qe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: qe.c,v 1.4 2001/11/27 02:33:15 jason Exp $ */
+/* $OpenBSD: qe.c,v 1.5 2001/11/28 05:42:24 jason Exp $ */
/* $NetBSD: qe.c,v 1.16 2001/03/30 17:30:18 christos Exp $ */
/*-
@@ -248,7 +248,12 @@ qeattach(parent, self, aux)
qestop(sc);
/* Note: no interrupt level passed */
- (void)bus_intr_establish(sa->sa_bustag, 0, IPL_NET, 0, qeintr, sc);
+ if (bus_intr_establish(sa->sa_bustag, 0, IPL_NET, 0, qeintr, sc) ==
+ NULL) {
+ printf(": no interrupt established\n");
+ return;
+ }
+
myetheraddr(sc->sc_arpcom.ac_enaddr);
/*
@@ -924,6 +929,11 @@ qeioctl(ifp, cmd, data)
s = splnet();
+ if ((error = ether_ioctl(ifp, &sc->sc_arpcom, cmd, data)) > 0) {
+ splx(s);
+ return (error);
+ }
+
switch (cmd) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;