Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys/dev/ic Pull up following revision(s) (requested by na...
details: https://anonhg.NetBSD.org/src/rev/a023ed66e9fd
branches: netbsd-7
changeset: 799041:a023ed66e9fd
user: snj <snj%NetBSD.org@localhost>
date: Tue Mar 03 07:14:03 2015 +0000
description:
Pull up following revision(s) (requested by nakayama in ticket #558):
sys/dev/ic/tulip.c: revision 1.185
Stop the interface before detaching to avoid the race between
tlp_detach() and tlp_intr().
While there, add missing callout_destroy()s.
diffstat:
sys/dev/ic/tulip.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (45 lines):
diff -r f560d04ef2fb -r a023ed66e9fd sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c Tue Mar 03 07:11:08 2015 +0000
+++ b/sys/dev/ic/tulip.c Tue Mar 03 07:14:03 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tulip.c,v 1.184 2014/08/10 16:44:35 tls Exp $ */
+/* $NetBSD: tulip.c,v 1.184.2.1 2015/03/03 07:14:03 snj Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2002 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.184 2014/08/10 16:44:35 tls Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tulip.c,v 1.184.2.1 2015/03/03 07:14:03 snj Exp $");
#include <sys/param.h>
@@ -592,7 +592,7 @@
struct tulip_rxsoft *rxs;
struct tulip_txsoft *txs;
device_t self = sc->sc_dev;
- int i;
+ int i, s;
/*
* Succeed now if there isn't any work to do.
@@ -600,9 +600,14 @@
if ((sc->sc_flags & TULIPF_ATTACHED) == 0)
return (0);
- /* Unhook our tick handler. */
- if (sc->sc_tick)
- callout_stop(&sc->sc_tick_callout);
+ s = splnet();
+ /* Stop the interface. Callouts are stopped in it. */
+ tlp_stop(ifp, 1);
+ splx(s);
+
+ /* Destroy our callouts. */
+ callout_destroy(&sc->sc_nway_callout);
+ callout_destroy(&sc->sc_tick_callout);
if (sc->sc_flags & TULIPF_HAS_MII) {
/* Detach all PHYs */
Home |
Main Index |
Thread Index |
Old Index