From e3eae3f873d625a76aa4967376664609aa6066ea Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sat, 27 May 2006 21:48:23 +0000 Subject: 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@ --- sys/dev/pci/if_sis.c | 16 ++++++++++------ 1 file 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 . 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; -- cgit v1.2.3