Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Stopgap for PR kern/47957: when reinitializing th...
details: https://anonhg.NetBSD.org/src/rev/cdc97c920bef
branches: trunk
changeset: 787575:cdc97c920bef
user: martin <martin%NetBSD.org@localhost>
date: Mon Jun 24 19:43:58 2013 +0000
description:
Stopgap for PR kern/47957: when reinitializing the chip in if_timeout,
avoid pmf operations as we are called from softint context.
This is not a 100% solution, since we still may end up panicing if
initialization fails.
Instead of hacking around it on a per driver level, wouldn't it be better
to have a single global workqueue and dispatch the if_slowtimo() calls
via that?
diffstat:
sys/dev/ic/athn.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r b7ec50388244 -r cdc97c920bef sys/dev/ic/athn.c
--- a/sys/dev/ic/athn.c Mon Jun 24 17:28:35 2013 +0000
+++ b/sys/dev/ic/athn.c Mon Jun 24 19:43:58 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: athn.c,v 1.5 2013/04/10 12:46:50 christos Exp $ */
+/* $NetBSD: athn.c,v 1.6 2013/06/24 19:43:58 martin Exp $ */
/* $OpenBSD: athn.c,v 1.75 2013/01/14 09:50:31 jsing Exp $ */
/*-
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.5 2013/04/10 12:46:50 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: athn.c,v 1.6 2013/06/24 19:43:58 martin Exp $");
#ifndef _MODULE
#include "athn_usb.h" /* for NATHN_USB */
@@ -2675,7 +2675,8 @@
if (sc->sc_tx_timer > 0) {
if (--sc->sc_tx_timer == 0) {
aprint_error_dev(sc->sc_dev, "device timeout\n");
- athn_stop(ifp, 1);
+ /* see athn_init, no need to call athn_stop here */
+ /* athn_stop(ifp, 0); */
(void)athn_init(ifp);
ifp->if_oerrors++;
return;
@@ -2816,7 +2817,7 @@
KASSERT(!cpu_intr_p());
if (device_is_active(sc->sc_dev)) {
- athn_stop(ifp, 0); /* XXX: necessary? */
+ athn_stop(ifp, 0); /* see athn_watchdog() */
} else {
short flags = ifp->if_flags;
ifp->if_flags &= ~IFF_UP;
Home |
Main Index |
Thread Index |
Old Index