From 72735aa75a4bd5ae40e3722ad96b1220f415026d Mon Sep 17 00:00:00 2001 From: bjh21 Date: Sat, 16 Dec 2000 18:24:36 +0000 Subject: [PATCH] Correct embarrassing null-pointer-dereference bug. Also fixes interrupt enabling. Default to 10base2 for now, since automatic media selection doesn't work. --- sys/arch/arm26/podulebus/if_eh.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arch/arm26/podulebus/if_eh.c b/sys/arch/arm26/podulebus/if_eh.c index b1180d1e9ed1..f39d0d0502db 100644 --- a/sys/arch/arm26/podulebus/if_eh.c +++ b/sys/arch/arm26/podulebus/if_eh.c @@ -1,4 +1,4 @@ -/* $NetBSD: if_eh.c,v 1.1 2000/12/01 14:28:37 bjh21 Exp $ */ +/* $NetBSD: if_eh.c,v 1.2 2000/12/16 18:24:36 bjh21 Exp $ */ /*- * Copyright (c) 2000 Ben Harris @@ -53,7 +53,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: if_eh.c,v 1.1 2000/12/01 14:28:37 bjh21 Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_eh.c,v 1.2 2000/12/16 18:24:36 bjh21 Exp $"); #include #include @@ -199,7 +199,7 @@ eh_attach(struct device *parent, struct device *self, void *aux) &sc->sc_datah); sc->sc_ctlt = pa->pa_fast_t; bus_space_subregion(sc->sc_ctlt, pa->pa_fast_h, EH_CTRL, 1, - &sc->sc_ctlt); + &sc->sc_ctlh); /* dsc->cr_proto? */ /* dsc->rcr_proto? */ @@ -224,7 +224,7 @@ eh_attach(struct device *parent, struct device *self, void *aux) for (i = 0; i < 16; i++) dsc->sc_reg_map[i] = i; - sc->sc_ctrl = 0xff; + sc->sc_ctrl = 0x00; /* XXX XXX XXX Ethernet address */ switch (sc->sc_type) { @@ -238,7 +238,7 @@ eh_attach(struct device *parent, struct device *self, void *aux) printf("%s: rigged demo mode\n", self->dv_xname); dp8390_config(dsc, media, sizeof(media) / sizeof(media[0]), - IFM_ETHER | IFM_AUTO); + IFM_ETHER | IFM_10_2); dp8390_stop(dsc); #if 0