Module Name:    src
Committed By:   ozaki-r
Date:           Wed Oct  8 01:45:14 UTC 2014

Modified Files:
        src/sys/dev/pci: if_vioif.c

Log Message:
Don't turn promisc off in vioif_deferred_init if already configured as promisc


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/pci/if_vioif.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/pci/if_vioif.c
diff -u src/sys/dev/pci/if_vioif.c:1.8 src/sys/dev/pci/if_vioif.c:1.9
--- src/sys/dev/pci/if_vioif.c:1.8	Wed Aug 13 14:35:46 2014
+++ src/sys/dev/pci/if_vioif.c	Wed Oct  8 01:45:14 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_vioif.c,v 1.8 2014/08/13 14:35:46 pooka Exp $	*/
+/*	$NetBSD: if_vioif.c,v 1.9 2014/10/08 01:45:14 ozaki-r Exp $	*/
 
 /*
  * Copyright (c) 2010 Minoura Makoto.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.8 2014/08/13 14:35:46 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vioif.c,v 1.9 2014/10/08 01:45:14 ozaki-r Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -650,12 +650,13 @@ vioif_deferred_init(device_t self)
 	struct ifnet *ifp = &sc->sc_ethercom.ec_if;
 	int r;
 
+	if (ifp->if_flags & IFF_PROMISC)
+		return
+
 	r =  vioif_set_promisc(sc, false);
 	if (r != 0)
 		aprint_error_dev(self, "resetting promisc mode failed, "
 				 "errror code %d\n", r);
-	else
-		ifp->if_flags &= ~IFF_PROMISC;
 }
 
 /*

Reply via email to