Module Name:    src
Committed By:   martin
Date:           Mon Apr  6 07:38:17 UTC 2015

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

Log Message:
Make sure to halt (not just stop) the bge_tick callout during detach.


To generate a diff of this commit:
cvs rdiff -u -r1.280 -r1.281 src/sys/dev/pci/if_bge.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_bge.c
diff -u src/sys/dev/pci/if_bge.c:1.280 src/sys/dev/pci/if_bge.c:1.281
--- src/sys/dev/pci/if_bge.c:1.280	Tue Feb 17 23:07:56 2015
+++ src/sys/dev/pci/if_bge.c	Mon Apr  6 07:38:17 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_bge.c,v 1.280 2015/02/17 23:07:56 enami Exp $	*/
+/*	$NetBSD: if_bge.c,v 1.281 2015/04/06 07:38:17 martin Exp $	*/
 
 /*
  * Copyright (c) 2001 Wind River Systems
@@ -79,7 +79,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.280 2015/02/17 23:07:56 enami Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bge.c,v 1.281 2015/04/06 07:38:17 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -5749,7 +5749,10 @@ bge_stop(struct ifnet *ifp, int disable)
 {
 	struct bge_softc *sc = ifp->if_softc;
 
-	callout_stop(&sc->bge_timeout);
+	if (disable)
+		callout_halt(&sc->bge_timeout, NULL);
+	else
+		callout_stop(&sc->bge_timeout);
 
 	/* Disable host interrupts. */
 	BGE_SETBIT(sc, BGE_PCI_MISC_CTL, BGE_PCIMISCCTL_MASK_PCI_INTR);

Reply via email to