diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2007-06-15 02:29:51 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2007-06-15 02:29:51 +0000 |
commit | 65e5e5e874060baadd35956cbf4d0ed819375794 (patch) | |
tree | 5de13adf5430f5f460c494abd9c90fe77b31e857 /sys/dev | |
parent | 27bf9710bca3de933c3f247d153944ef3ff3dc72 (diff) |
the multicast filter is operated on as an array of u_int16_t's, not the
u_int32_t's like its described as in the chip descriptors. fixing this
stops the driver from overwriting the field next to the multicast filter
that specifies the number of tx descriptors we give the nic.
we were accidentally telling the chip we had 32 thousand tx descriptors
when we only have 100. trying to complete the 101th tx descriptor causes
panics.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/if_vic.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/pci/if_vic.c b/sys/dev/pci/if_vic.c index a9e11f918de..b47d12c3d21 100644 --- a/sys/dev/pci/if_vic.c +++ b/sys/dev/pci/if_vic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vic.c,v 1.48 2007/05/26 17:13:30 jason Exp $ */ +/* $OpenBSD: if_vic.c,v 1.49 2007/06/15 02:29:50 dlg Exp $ */ /* * Copyright (c) 2006 Reyk Floeter <reyk@openbsd.org> @@ -852,6 +852,7 @@ vic_iff(struct vic_softc *sc) struct ether_multi *enm; struct ether_multistep step; u_int32_t crc; + u_int16_t *mcastfil = (u_int16_t *)sc->sc_data->vd_mcastfil; u_int flags = 0; bzero(&sc->sc_data->vd_mcastfil, sizeof(sc->sc_data->vd_mcastfil)); @@ -869,7 +870,7 @@ vic_iff(struct vic_softc *sc) crc = ether_crc32_le(enm->enm_addrlo, ETHER_ADDR_LEN); crc >>= 26; - sc->sc_data->vd_mcastfil[crc >> 4] |= htole16(1 << (crc & 0xf)); + mcastfil[crc >> 4] |= htole16(1 << (crc & 0xf)); ETHER_NEXT_MULTI(step, enm); } |