summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-05-27 21:48:23 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-05-27 21:48:23 +0000
commite3eae3f873d625a76aa4967376664609aa6066ea (patch)
treebadb50d98e680b2b0dbea6c4239d52b609f11705
parent9c50cfa2ba36ad5ed27b2170990cb610b7fe79e2 (diff)
With the National variants of the sis(4) chip make sure to
check for multicast ranges and then switch into allmulti mode, before touching the receive filter. This fixes an issue noticed by a few devlopers where sis(4) will stop receiving traffic when switched into allmulti mode. ok claudio@
-rw-r--r--sys/dev/pci/if_sis.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index 3b893db5e2b..51f455db82b 100644
--- a/sys/dev/pci/if_sis.c
+++ b/sys/dev/pci/if_sis.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_sis.c,v 1.69 2006/04/28 17:18:13 brad Exp $ */
+/* $OpenBSD: if_sis.c,v 1.70 2006/05/27 21:48:22 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -729,6 +729,15 @@ allmulti:
return;
}
+ ETHER_FIRST_MULTI(step, ac, enm);
+ while (enm != NULL) {
+ if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
+ ifp->if_flags |= IFF_ALLMULTI;
+ goto allmulti;
+ }
+ ETHER_NEXT_MULTI(step, enm);
+ }
+
/*
* We have to explicitly enable the multicast hash table
* on the NatSemi chip if we want to use it, which we do.
@@ -746,11 +755,6 @@ allmulti:
ETHER_FIRST_MULTI(step, ac, enm);
while (enm != NULL) {
- if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
- ifp->if_flags |= IFF_ALLMULTI;
- goto allmulti;
- }
-
h = sis_mchash(sc, enm->enm_addrlo);
index = h >> 3;
bit = h & 0x1F;