diff options
author | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-06-24 22:38:48 +0000 |
---|---|---|
committer | Aaron Campbell <aaron@cvs.openbsd.org> | 2001-06-24 22:38:48 +0000 |
commit | 0aac485864603a9e612c34bd2918dd84479ab699 (patch) | |
tree | 51cbd57a6ec77d8c349e2f449c2fbe9502d97612 /sys/dev/pci/if_vr.c | |
parent | 8ef40d7fecd9e0320e76b2da5842bed282399055 (diff) |
Program the address filter in vr_init(). Apparently the rhine cards are smart
enough to read their own Ethernet address from the EEPROM and program their
unicast filters automatically, but to support setting the Ethernet address with
ifconfig on vr(4) cards we need to do this. From FreeBSD.
Diffstat (limited to 'sys/dev/pci/if_vr.c')
-rw-r--r-- | sys/dev/pci/if_vr.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index f095cb9b426..f4d2ead0bd8 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.16 2001/06/24 20:27:02 fgsch Exp $ */ +/* $OpenBSD: if_vr.c,v 1.17 2001/06/24 22:38:47 aaron Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1348,7 +1348,7 @@ vr_init(xsc) struct vr_softc *sc = xsc; struct ifnet *ifp = &sc->arpcom.ac_if; struct mii_data *mii = &sc->sc_mii; - int s; + int s, i; s = splimp(); @@ -1358,6 +1358,12 @@ vr_init(xsc) vr_stop(sc); vr_reset(sc); + /* + * Set our station address. + */ + for (i = 0; i < ETHER_ADDR_LEN; i++) + CSR_WRITE_1(sc, VR_PAR0 + i, sc->arpcom.ac_enaddr[i]); + VR_CLRBIT(sc, VR_RXCFG, VR_RXCFG_RX_THRESH); VR_SETBIT(sc, VR_RXCFG, VR_RXTHRESH_STORENFWD); |