Enable receive filter in sis_rxfilter().

While I'm here add a check for driver running state for multicast
filter handling.

Suggested by:	brad@OpenBSD.org
This commit is contained in:
Pyun YongHyeon 2015-01-12 07:37:06 +00:00
parent b1752aa0ea
commit 8e5e237669

View File

@ -758,7 +758,8 @@ sis_rxfilter_ns(struct sis_softc *sc)
if_maddr_runlock(ifp);
}
CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter);
/* Turn the receive filter on */
CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE);
CSR_READ_4(sc, SIS_RXFILT_CTL);
}
@ -820,7 +821,8 @@ sis_rxfilter_sis(struct sis_softc *sc)
CSR_WRITE_4(sc, SIS_RXFILT_DATA, hashes[i]);
}
CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter);
/* Turn the receive filter on */
CSR_WRITE_4(sc, SIS_RXFILT_CTL, filter | SIS_RXFILTCTL_ENABLE);
CSR_READ_4(sc, SIS_RXFILT_CTL);
}
@ -2015,8 +2017,6 @@ sis_initl(struct sis_softc *sc)
}
sis_rxfilter(sc);
/* Turn the receive filter on */
SIS_SETBIT(sc, SIS_RXFILT_CTL, SIS_RXFILTCTL_ENABLE);
/*
* Load the address of the RX and TX lists.
@ -2138,7 +2138,8 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
case SIOCADDMULTI:
case SIOCDELMULTI:
SIS_LOCK(sc);
sis_rxfilter(sc);
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
sis_rxfilter(sc);
SIS_UNLOCK(sc);
break;
case SIOCGIFMEDIA: