summaryrefslogtreecommitdiff
path: root/sys/dev/pci/if_sis.c
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2009-06-04 20:01:03 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2009-06-04 20:01:03 +0000
commiteb09de4833e601974cdb7d952d9ac8fabcdb5f23 (patch)
tree308e28e1c850ad225c73380003d6f3c22fda06ca /sys/dev/pci/if_sis.c
parentbe6dd10ee64d2cf72726a8e274ece02579a3f181 (diff)
merge some individual SIS_SETBIT (done for natsemi chips only)
into sis_iff_ns() (called only for natsemi). from Brad.
Diffstat (limited to 'sys/dev/pci/if_sis.c')
-rw-r--r--sys/dev/pci/if_sis.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index a7d512c2c5b..0d53f67b161 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.89 2009/06/04 18:12:56 sthen Exp $ */
+/* $OpenBSD: if_sis.c,v 1.90 2009/06/04 20:01:02 sthen Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -718,13 +718,17 @@ sis_iff_ns(struct sis_softc *sc)
rxfilt = CSR_READ_4(sc, SIS_RXFILT_CTL);
rxfilt &= ~(SIS_RXFILTCTL_ALLMULTI | SIS_RXFILTCTL_ALLPHYS |
- SIS_RXFILTCTL_BROAD | NS_RXFILTCTL_MCHASH);
+ NS_RXFILTCTL_ARP | SIS_RXFILTCTL_BROAD | NS_RXFILTCTL_MCHASH |
+ NS_RXFILTCTL_PERFECT);
ifp->if_flags &= ~IFF_ALLMULTI;
/*
+ * Always accept ARP frames.
* Always accept broadcast frames.
+ * Always accept frames destined to our station address.
*/
- rxfilt |= SIS_RXFILTCTL_BROAD;
+ rxfilt |= NS_RXFILTCTL_ARP | SIS_RXFILTCTL_BROAD |
+ NS_RXFILTCTL_PERFECT;
if (ifp->if_flags & IFF_PROMISC || ac->ac_multirangecnt > 0) {
ifp->if_flags |= IFF_ALLMULTI;
@@ -1718,17 +1722,6 @@ sis_init(void *xsc)
}
/*
- * For the NatSemi chip, we have to explicitly enable the
- * reception of ARP frames, as well as turn on the 'perfect
- * match' filter where we store the station address, otherwise
- * we won't receive unicasts meant for this host.
- */
- if (sc->sis_type == SIS_TYPE_83815) {
- SIS_SETBIT(sc, SIS_RXFILT_CTL, NS_RXFILTCTL_ARP);
- SIS_SETBIT(sc, SIS_RXFILT_CTL, NS_RXFILTCTL_PERFECT);
- }
-
- /*
* Program promiscuous mode and multicast filters.
*/
sis_iff(sc);