Here's the other part of the diff, touching drivers in mvme68k, mvme88k
sparc and vax.
Index: arch/mvme68k/dev/if_ie.c
===================================================================
RCS file: /cvs/src/sys/arch/mvme68k/dev/if_ie.c,v
retrieving revision 1.41
diff -u -p -r1.41 if_ie.c
--- arch/mvme68k/dev/if_ie.c 5 Sep 2013 20:55:57 -0000 1.41
+++ arch/mvme68k/dev/if_ie.c 16 Oct 2013 13:28:54 -0000
@@ -1870,19 +1870,25 @@ void
mc_reset(sc)
struct ie_softc *sc;
{
+ struct arpcom *ac = sc->sc_arpcom;
struct ether_multi *enm;
struct ether_multistep step;
+ if (ac->ac_multirangecnt > 0) {
+ ac->ac_if.if_flags |= IFF_ALLMULTI;
+ ieioctl(&ac->ac_if, SIOCSIFFLAGS, (void *)0);
+ goto setflag;
+ }
+
/*
* Step through the list of addresses.
*/
sc->mcast_count = 0;
- ETHER_FIRST_MULTI(step, &sc->sc_arpcom, enm);
+ ETHER_FIRST_MULTI(step, ac, enm);
while (enm) {
- if (sc->mcast_count >= MAXMCAST ||
- bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
- sc->sc_arpcom.ac_if.if_flags |= IFF_ALLMULTI;
- ieioctl(&sc->sc_arpcom.ac_if, SIOCSIFFLAGS, (void *)0);
+ if (sc->mcast_count >= MAXMCAST) {
+ ac->ac_if.if_flags |= IFF_ALLMULTI;
+ ieioctl(&ac->ac_if, SIOCSIFFLAGS, (void *)0);
goto setflag;
}
Index: arch/mvme88k/dev/if_ie.c
===================================================================
RCS file: /cvs/src/sys/arch/mvme88k/dev/if_ie.c,v
retrieving revision 1.46
diff -u -p -r1.46 if_ie.c
--- arch/mvme88k/dev/if_ie.c 5 Sep 2013 20:55:57 -0000 1.46
+++ arch/mvme88k/dev/if_ie.c 16 Oct 2013 13:28:54 -0000
@@ -1857,19 +1857,25 @@ void
mc_reset(sc)
struct ie_softc *sc;
{
+ struct arpcom *ac = sc->sc_arpcom;
struct ether_multi *enm;
struct ether_multistep step;
+ if (ac->ac_multirangecnt > 0) {
+ ac->ac_if.if_flags |= IFF_ALLMULTI;
+ ieioctl(&ac->ac_if, SIOCSIFFLAGS, (void *)0);
+ goto setflag;
+ }
+
/*
* Step through the list of addresses.
*/
sc->mcast_count = 0;
- ETHER_FIRST_MULTI(step, &sc->sc_arpcom, enm);
+ ETHER_FIRST_MULTI(step, ac, enm);
while (enm) {
- if (sc->mcast_count >= MAXMCAST ||
- bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
- sc->sc_arpcom.ac_if.if_flags |= IFF_ALLMULTI;
- ieioctl(&sc->sc_arpcom.ac_if, SIOCSIFFLAGS, (void *)0);
+ if (sc->mcast_count >= MAXMCAST) {
+ ac->ac_if.if_flags |= IFF_ALLMULTI;
+ ieioctl(&ac->ac_if, SIOCSIFFLAGS, (void *)0);
goto setflag;
}
Index: arch/sparc/dev/be.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc/dev/be.c,v
retrieving revision 1.44
diff -u -p -r1.44 be.c
--- arch/sparc/dev/be.c 5 Sep 2013 20:55:58 -0000 1.44
+++ arch/sparc/dev/be.c 16 Oct 2013 13:28:54 -0000
@@ -1158,6 +1158,9 @@ be_mcreset(sc)
else
br->rx_cfg &= ~BE_BR_RXCFG_PMISC;
+ if (ac->ac_multirangecnt > 0)
+ ifp->if_flags |= IFF_ALLMULTI;
+
if (ifp->if_flags & IFF_ALLMULTI) {
br->htable3 = 0xffff;
br->htable2 = 0xffff;
@@ -1170,25 +1173,6 @@ be_mcreset(sc)
ETHER_FIRST_MULTI(step, ac, enm);
while (enm != NULL) {
- if (bcmp(enm->enm_addrlo, enm->enm_addrhi, ETHER_ADDR_LEN)) {
- /*
- * We must listen to a range of multicast
- * addresses. For now, just accept all
- * multicasts, rather than trying to set only
- * those filter bits needed to match the range.
- * (At this time, the only use of address
- * ranges is for IP multicast routing, for
- * which the range is big enough to require
- * all bits set.)
- */
- br->htable3 = 0xffff;
- br->htable2 = 0xffff;
- br->htable1 = 0xffff;
- br->htable0 = 0xffff;
- ifp->if_flags |= IFF_ALLMULTI;
- return;
- }
-
crc = 0xffffffff;
for (i = 0; i < ETHER_ADDR_LEN; i++) {
Index: arch/sparc/dev/if_ie.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc/dev/if_ie.c,v
retrieving revision 1.43
diff -u -p -r1.43 if_ie.c
--- arch/sparc/dev/if_ie.c 5 Sep 2013 20:55:58 -0000 1.43
+++ arch/sparc/dev/if_ie.c 16 Oct 2013 13:28:54 -0000
@@ -2017,19 +2017,25 @@ static void
mc_reset(sc)
struct ie_softc *sc;
{
+ struct arpcom *ac = sc->sc_arpcom;
struct ether_multi *enm;
struct ether_multistep step;
+ if (ac->ac_multirangecnt > 0) {
+ ac->ac_if.if_flags |= IFF_ALLMULTI;
+ ieioctl(&ac->ac_if, SIOCSIFFLAGS, (void *)0);
+ goto setflag;
+ }
+
/*
* Step through the list of addresses.
*/
sc->mcast_count = 0;
- ETHER_FIRST_MULTI(step, &sc->sc_arpcom, enm);
+ ETHER_FIRST_MULTI(step, ac, enm);
while (enm) {
- if (sc->mcast_count >= MAXMCAST ||
- bcmp(enm->enm_addrlo, enm->enm_addrhi, 6) != 0) {
- sc->sc_arpcom.ac_if.if_flags |= IFF_ALLMULTI;
- ieioctl(&sc->sc_arpcom.ac_if, SIOCSIFFLAGS, (void *)0);
+ if (sc->mcast_count >= MAXMCAST) {
+ ac->ac_if.if_flags |= IFF_ALLMULTI;
+ ieioctl(&ac->ac_if, SIOCSIFFLAGS, (void *)0);
goto setflag;
}
Index: arch/sparc/dev/qe.c
===================================================================
RCS file: /cvs/src/sys/arch/sparc/dev/qe.c,v
retrieving revision 1.34
diff -u -p -r1.34 qe.c
--- arch/sparc/dev/qe.c 5 Sep 2013 20:55:58 -0000 1.34
+++ arch/sparc/dev/qe.c 16 Oct 2013 13:28:54 -0000
@@ -805,7 +805,9 @@ qe_mcreset(sc)
u_int8_t octet, *ladrp = (u_int8_t *)&hash[0];
int i, j;
-allmulti:
+ if (ac->ac_multirangecnt > 0)
+ ifp->if_flags |= IFF_ALLMULTI;
+
if (ifp->if_flags & IFF_ALLMULTI) {
mr->iac = QE_MR_IAC_ADDRCHG | QE_MR_IAC_LOGADDR;
for (i = 100; i > 0; i--) {
@@ -822,22 +824,6 @@ allmulti:
ETHER_FIRST_MULTI(step, ac, enm);
while (enm != NULL) {
- if (bcmp(enm->enm_addrlo, enm->enm_addrhi,
- ETHER_ADDR_LEN)) {
- /*
- * We must listen to a range of multicast
- * addresses. For now, just accept all
- * multicasts, rather than trying to set only
- * those filter bits needed to match the range.
- * (At this time, the only use of address
- * ranges is for IP multicast routing, for
- * which the range is big enough to require
- * all bits set.)
- */
- ifp->if_flags |= IFF_ALLMULTI;
- goto allmulti;
- }
-
crc = 0xffffffff;
for (i = 0; i < ETHER_ADDR_LEN; i++) {
Index: arch/vax/if/if_qe.c
===================================================================
RCS file: /cvs/src/sys/arch/vax/if/if_qe.c,v
retrieving revision 1.25
diff -u -p -r1.25 if_qe.c
--- arch/vax/if/if_qe.c 20 Sep 2010 06:33:47 -0000 1.25
+++ arch/vax/if/if_qe.c 23 Oct 2013 17:37:58 -0000
@@ -747,7 +747,8 @@ qe_setup(struct qe_softc *sc)
struct ether_multistep step;
struct qe_cdata *qc = sc->sc_qedata;
struct ifnet *ifp = &sc->sc_if;
- u_int8_t *enaddr = sc->sc_ac.ac_enaddr;
+ struct arpcom *ac = &sc->sc_ac;
+ u_int8_t *enaddr = ac->ac_enaddr;
int i, j, k, idx, s;
s = splnet();
@@ -770,12 +771,14 @@ qe_setup(struct qe_softc *sc)
*/
j = 3; k = 0;
ifp->if_flags &= ~IFF_ALLMULTI;
- ETHER_FIRST_MULTI(step, &sc->sc_ac, enm);
+
+ if (ac->ac_multirangecnt > 0) {
+ ifp->if_flags |= IFF_ALLMULTI;
+ goto setit;
+ }
+
+ ETHER_FIRST_MULTI(step, ac, enm);
while (enm != NULL) {
- if (memcmp(enm->enm_addrlo, enm->enm_addrhi, 6)) {
- ifp->if_flags |= IFF_ALLMULTI;
- break;
- }
for (i = 0; i < ETHER_ADDR_LEN; i++)
qc->qc_setup[i * 8 + j + k] = enm->enm_addrlo[i];
j++;
@@ -788,6 +791,8 @@ qe_setup(struct qe_softc *sc)
}
ETHER_NEXT_MULTI(step, enm);
}
+
+setit:
idx = sc->sc_nexttx;
qc->qc_xmit[idx].qe_buf_len = -64;
Index: arch/vax/if/sgec.c
===================================================================
RCS file: /cvs/src/sys/arch/vax/if/sgec.c,v
retrieving revision 1.20
diff -u -p -r1.20 sgec.c
--- arch/vax/if/sgec.c 26 Sep 2011 21:44:04 -0000 1.20
+++ arch/vax/if/sgec.c 23 Oct 2013 17:37:57 -0000
@@ -767,7 +767,8 @@ ze_setup(sc)
struct ether_multistep step;
struct ze_cdata *zc = sc->sc_zedata;
struct ifnet *ifp = &sc->sc_if;
- u_int8_t *enaddr = sc->sc_ac.ac_enaddr;
+ struct arpcom *ac = &sc->sc_ac;
+ u_int8_t *enaddr = ac->ac_enaddr;
int j, idx, s, reg;
s = splnet();
@@ -790,12 +791,14 @@ ze_setup(sc)
*/
j = 16;
ifp->if_flags &= ~IFF_ALLMULTI;
- ETHER_FIRST_MULTI(step, &sc->sc_ac, enm);
+
+ if (ac->ac_multirangecnt > 0) {
+ ifp->if_flags |= IFF_ALLMULTI;
+ goto setit;
+ }
+
+ ETHER_FIRST_MULTI(step, ac, enm);
while (enm != NULL) {
- if (bcmp(enm->enm_addrlo, enm->enm_addrhi, 6)) {
- ifp->if_flags |= IFF_ALLMULTI;
- break;
- }
bcopy(enm->enm_addrlo, &zc->zc_setup[j], ETHER_ADDR_LEN);
j += 8;
ETHER_NEXT_MULTI(step, enm);
@@ -805,6 +808,7 @@ ze_setup(sc)
}
}
+setit:
/*
* Fiddle with the receive logic.
*/