Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic Simplify activation routines. Don't block interr...
details: https://anonhg.NetBSD.org/src/rev/f0ad46c26668
branches: trunk
changeset: 747453:f0ad46c26668
user: dyoung <dyoung%NetBSD.org@localhost>
date: Tue Sep 15 20:51:12 2009 +0000
description:
Simplify activation routines. Don't block interrupts, if_deactivate()
does it. Compile-tested, only.
diffstat:
sys/dev/ic/wi.c | 22 +++++++---------------
1 files changed, 7 insertions(+), 15 deletions(-)
diffs (51 lines):
diff -r 4f509be4dc8f -r f0ad46c26668 sys/dev/ic/wi.c
--- a/sys/dev/ic/wi.c Tue Sep 15 19:41:30 2009 +0000
+++ b/sys/dev/ic/wi.c Tue Sep 15 20:51:12 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wi.c,v 1.230 2009/05/12 14:25:18 cegger Exp $ */
+/* $NetBSD: wi.c,v 1.231 2009/09/15 20:51:12 dyoung Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -99,7 +99,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.230 2009/05/12 14:25:18 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wi.c,v 1.231 2009/09/15 20:51:12 dyoung Exp $");
#define WI_HERMES_AUTOINC_WAR /* Work around data write autoinc bug. */
#define WI_HERMES_STATS_WAR /* Work around stats counter bug. */
@@ -603,27 +603,19 @@
return 0;
}
-#ifdef __NetBSD__
int
wi_activate(device_t self, enum devact act)
{
- struct wi_softc *sc = (struct wi_softc *)self;
- int rv = 0, s;
-
- s = splnet();
+ struct wi_softc *sc = device_private(self);
+
switch (act) {
- case DVACT_ACTIVATE:
- rv = EOPNOTSUPP;
- break;
-
case DVACT_DEACTIVATE:
if_deactivate(&sc->sc_if);
- break;
+ return 0;
+ default:
+ return EOPNOTSUPP;
}
- splx(s);
- return rv;
}
-#endif /* __NetBSD__ */
int
wi_intr(void *arg)
Home |
Main Index |
Thread Index |
Old Index