Module Name: src
Committed By: dyoung
Date: Tue Sep 15 19:29:17 UTC 2009
Modified Files:
src/sys/dev/ic: rtl8169.c rtl81x9.c
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.127 -r1.128 src/sys/dev/ic/rtl8169.c
cvs rdiff -u -r1.86 -r1.87 src/sys/dev/ic/rtl81x9.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/rtl8169.c
diff -u src/sys/dev/ic/rtl8169.c:1.127 src/sys/dev/ic/rtl8169.c:1.128
--- src/sys/dev/ic/rtl8169.c:1.127 Sat Sep 5 08:23:24 2009
+++ src/sys/dev/ic/rtl8169.c Tue Sep 15 19:29:17 2009
@@ -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;
}
/*
Index: src/sys/dev/ic/rtl81x9.c
diff -u src/sys/dev/ic/rtl81x9.c:1.86 src/sys/dev/ic/rtl81x9.c:1.87
--- src/sys/dev/ic/rtl81x9.c:1.86 Mon Apr 27 14:52:50 2009
+++ src/sys/dev/ic/rtl81x9.c Tue Sep 15 19:29:17 2009
@@ -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;
}
/*