Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/pci Make sure to halt (not just stop) the bge_tick c...



details:   https://anonhg.NetBSD.org/src/rev/4017286391b0
branches:  trunk
changeset: 337194:4017286391b0
user:      martin <martin%NetBSD.org@localhost>
date:      Mon Apr 06 07:38:17 2015 +0000

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

diffstat:

 sys/dev/pci/if_bge.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 155a0c319014 -r 4017286391b0 sys/dev/pci/if_bge.c
--- a/sys/dev/pci/if_bge.c      Mon Apr 06 06:26:21 2015 +0000
+++ b/sys/dev/pci/if_bge.c      Mon Apr 06 07:38:17 2015 +0000
@@ -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 @@
 {
        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);



Home | Main Index | Thread Index | Old Index