summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorBrad Smith <brad@cvs.openbsd.org>2006-04-28 06:14:47 +0000
committerBrad Smith <brad@cvs.openbsd.org>2006-04-28 06:14:47 +0000
commitd994d7aeeedb153cf4d041c105b290cb53fa20c5 (patch)
tree0a44ea5b5d9ee7d74b7ab94a8a6b34eaca651a6f /sys
parentc41440d236192eec5db017281748488b0837d1b7 (diff)
and store a copy of the current interface flags in the softc.
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/if_sis.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pci/if_sis.c b/sys/dev/pci/if_sis.c
index b1369c59944..256b8feed8d 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.66 2006/03/25 22:41:45 djm Exp $ */
+/* $OpenBSD: if_sis.c,v 1.67 2006/04/28 06:14:46 brad Exp $ */
/*
* Copyright (c) 1997, 1998, 1999
* Bill Paul <wpaul@ctr.columbia.edu>. All rights reserved.
@@ -1646,6 +1646,10 @@ sis_init(void *xsc)
sis_stop(sc);
sc->sis_stopped = 0;
+ /* Configure interrupt holdoff register. */
+ if (sc->sis_type == SIS_TYPE_83815 && sc->sis_srr == NS_SRR_16A)
+ CSR_WRITE_4(sc, NS_IHR, NS_IHR_VALUE);
+
mii = &sc->sc_mii;
/* Set MAC address */
@@ -1885,7 +1889,7 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
switch(command) {
case SIOCSIFADDR:
ifp->if_flags |= IFF_UP;
- if ((ifp->if_flags & IFF_RUNNING) == 0)
+ if (!(ifp->if_flags & IFF_RUNNING))
sis_init(sc);
#ifdef INET
if (ifa->ifa_addr->sa_family == AF_INET)
@@ -1910,13 +1914,14 @@ sis_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
(ifp->if_flags ^ sc->sc_if_flags) & IFF_ALLMULTI) {
sis_setmulti(sc);
} else {
- if ((ifp->if_flags & IFF_RUNNING) == 0)
+ if (!(ifp->if_flags & IFF_RUNNING))
sis_init(sc);
}
} else {
if (ifp->if_flags & IFF_RUNNING)
sis_stop(sc);
}
+ sc->sc_if_flags = ifp->if_flags;
break;
case SIOCSIFMTU:
if (ifr->ifr_mtu < ETHERMIN || ifr->ifr_mtu > ETHERMTU)