Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/mii Simplify mii_phy_activate(). Remark in mii_phy_...
details: https://anonhg.NetBSD.org/src/rev/abbedaf45819
branches: trunk
changeset: 748837:abbedaf45819
user: dyoung <dyoung%NetBSD.org@localhost>
date: Fri Nov 06 18:41:25 2009 +0000
description:
Simplify mii_phy_activate(). Remark in mii_phy_activate() and
mii_phy_detach() comments that we may need to invalidate the parent's
media setting. No functional change intended.
diffstat:
sys/dev/mii/mii_physubr.c | 20 ++++++++------------
1 files changed, 8 insertions(+), 12 deletions(-)
diffs (51 lines):
diff -r 0637c9d0cf50 -r abbedaf45819 sys/dev/mii/mii_physubr.c
--- a/sys/dev/mii/mii_physubr.c Fri Nov 06 18:34:22 2009 +0000
+++ b/sys/dev/mii/mii_physubr.c Fri Nov 06 18:41:25 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mii_physubr.c,v 1.64 2009/05/12 14:31:27 cegger Exp $ */
+/* $NetBSD: mii_physubr.c,v 1.65 2009/11/06 18:41:25 dyoung Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000, 2001 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.64 2009/05/12 14:31:27 cegger Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mii_physubr.c,v 1.65 2009/11/06 18:41:25 dyoung Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -536,19 +536,13 @@
int
mii_phy_activate(device_t self, enum devact act)
{
- int rv = 0;
-
switch (act) {
- case DVACT_ACTIVATE:
- rv = EOPNOTSUPP;
- break;
-
case DVACT_DEACTIVATE:
- /* Nothing special to do. */
- break;
+ /* XXX Invalidate parent's media setting? */
+ return 0;
+ default:
+ return EOPNOTSUPP;
}
-
- return (rv);
}
/* ARGSUSED1 */
@@ -557,6 +551,8 @@
{
struct mii_softc *sc = device_private(self);
+ /* XXX Invalidate parent's media setting? */
+
if (sc->mii_flags & MIIF_DOINGAUTO)
callout_stop(&sc->mii_nway_ch);
Home |
Main Index |
Thread Index |
Old Index