summaryrefslogtreecommitdiff
path: root/sys/dev/pci
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2007-05-31 01:04:58 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2007-05-31 01:04:58 +0000
commitb819199d42bb838e005bda35a43b6dd88423f824 (patch)
tree80b4c4729aa817050ba910032fab56d64f01c086 /sys/dev/pci
parent79c8ff5debd12ee33782fea0b9cd6605e7b52a62 (diff)
only call em_init() when IFF_UP is set, not unconditional.
prevents another round of autonegotiation (and thus, few seconds outage) with every address change that had to be reintroduced a few revs ago because of the watchdog timeout problems people were seeing. this gives the benifit from both with the problems of neither ;) tested by daniel polak on a system that saw the watchdog timeouts before ok theo
Diffstat (limited to 'sys/dev/pci')
-rw-r--r--sys/dev/pci/if_em.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/pci/if_em.c b/sys/dev/pci/if_em.c
index 37b7753e372..21889c0f8eb 100644
--- a/sys/dev/pci/if_em.c
+++ b/sys/dev/pci/if_em.c
@@ -31,7 +31,7 @@ POSSIBILITY OF SUCH DAMAGE.
***************************************************************************/
-/* $OpenBSD: if_em.c,v 1.171 2007/05/31 00:47:53 ckuethe Exp $ */
+/* $OpenBSD: if_em.c,v 1.172 2007/05/31 01:04:57 henning Exp $ */
/* $FreeBSD: if_em.c,v 1.46 2004/09/29 18:28:28 mlaier Exp $ */
#include <dev/pci/if_em.h>
@@ -503,8 +503,10 @@ em_ioctl(struct ifnet *ifp, u_long command, caddr_t data)
case SIOCSIFADDR:
IOCTL_DEBUGOUT("ioctl rcv'd: SIOCSIFADDR (Set Interface "
"Addr)");
- ifp->if_flags |= IFF_UP;
- em_init(sc);
+ if (!(ifp->if_flags & IFF_UP)) {
+ ifp->if_flags |= IFF_UP;
+ em_init(sc);
+ }
#ifdef INET
if (ifa->ifa_addr->sa_family == AF_INET)
arp_ifinit(&sc->interface_data, ifa);