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: do not call mii_act...
details: https://anonhg.NetBSD.org/src/rev/d8093c07a79c
branches: trunk
changeset: 747450:d8093c07a79c
user: dyoung <dyoung%NetBSD.org@localhost>
date: Tue Sep 15 19:29:17 2009 +0000
description:
Simplify activation routines: do not call mii_activate(), it is a
no-op. Do not block interrupts, if_deactivate() will take care of
that for us.
diffstat:
sys/dev/ic/rtl8169.c | 17 +++++------------
sys/dev/ic/rtl81x9.c | 18 +++++-------------
2 files changed, 10 insertions(+), 25 deletions(-)
diffs (87 lines):
diff -r f69daf392a66 -r d8093c07a79c sys/dev/ic/rtl8169.c
--- a/sys/dev/ic/rtl8169.c Tue Sep 15 19:20:29 2009 +0000
+++ b/sys/dev/ic/rtl8169.c Tue Sep 15 19:29:17 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtl8169.c,v 1.127 2009/09/05 08:23:24 tsutsui Exp $ */
+/* $NetBSD: rtl8169.c,v 1.128 2009/09/15 19:29:17 dyoung Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.127 2009/09/05 08:23:24 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.128 2009/09/15 19:29:17 dyoung Exp $");
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
/*
@@ -889,21 +889,14 @@
re_activate(device_t self, enum devact act)
{
struct rtk_softc *sc = device_private(self);
- int s, error = 0;
- s = splnet();
switch (act) {
- case DVACT_ACTIVATE:
- error = EOPNOTSUPP;
- break;
case DVACT_DEACTIVATE:
- mii_activate(&sc->mii, act, MII_PHY_ANY, MII_OFFSET_ANY);
if_deactivate(&sc->ethercom.ec_if);
- break;
+ return 0;
+ default:
+ return EOPNOTSUPP;
}
- splx(s);
-
- return error;
}
/*
diff -r f69daf392a66 -r d8093c07a79c sys/dev/ic/rtl81x9.c
--- a/sys/dev/ic/rtl81x9.c Tue Sep 15 19:20:29 2009 +0000
+++ b/sys/dev/ic/rtl81x9.c Tue Sep 15 19:29:17 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtl81x9.c,v 1.86 2009/04/27 14:52:50 tsutsui Exp $ */
+/* $NetBSD: rtl81x9.c,v 1.87 2009/09/15 19:29:17 dyoung Exp $ */
/*
* Copyright (c) 1997, 1998
@@ -86,7 +86,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.86 2009/04/27 14:52:50 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl81x9.c,v 1.87 2009/09/15 19:29:17 dyoung Exp $");
#include "bpfilter.h"
#include "rnd.h"
@@ -799,22 +799,14 @@
rtk_activate(device_t self, enum devact act)
{
struct rtk_softc *sc = device_private(self);
- int s, error;
- error = 0;
- s = splnet();
switch (act) {
- case DVACT_ACTIVATE:
- error = EOPNOTSUPP;
- break;
case DVACT_DEACTIVATE:
- mii_activate(&sc->mii, act, MII_PHY_ANY, MII_OFFSET_ANY);
if_deactivate(&sc->ethercom.ec_if);
- break;
+ return 0;
+ default:
+ return EOPNOTSUPP;
}
- splx(s);
-
- return error;
}
/*
Home |
Main Index |
Thread Index |
Old Index