Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/mii Remove duplicated code. The code to check IFF_UP...
details: https://anonhg.NetBSD.org/src/rev/e851f80f7d7a
branches: trunk
changeset: 787327:e851f80f7d7a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Tue Jun 11 07:22:08 2013 +0000
description:
Remove duplicated code. The code to check IFF_UP and autonegotiation
is in mii_phy_tick(), too.
diffstat:
sys/dev/mii/ihphy.c | 17 ++---------------
sys/dev/mii/tlphy.c | 16 ++--------------
2 files changed, 4 insertions(+), 29 deletions(-)
diffs (75 lines):
diff -r 19ae73e42bfe -r e851f80f7d7a sys/dev/mii/ihphy.c
--- a/sys/dev/mii/ihphy.c Tue Jun 11 07:22:07 2013 +0000
+++ b/sys/dev/mii/ihphy.c Tue Jun 11 07:22:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ihphy.c,v 1.5 2013/06/09 09:31:32 msaitoh Exp $ */
+/* $NetBSD: ihphy.c,v 1.6 2013/06/11 07:22:08 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.5 2013/06/09 09:31:32 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ihphy.c,v 1.6 2013/06/11 07:22:08 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -214,19 +214,6 @@
if (IFM_INST(ife->ifm_media) != sc->mii_inst)
return 0;
- /*
- * Only used for autonegotiation.
- */
- if ((IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO) &&
- (IFM_SUBTYPE(ife->ifm_media) != IFM_1000_T)) {
- /*
- * Reset autonegotiation timer to 0 just to make sure
- * the future autonegotiation start with 0.
- */
- sc->mii_ticks = 0;
- break;
- }
-
if (mii_phy_tick(sc) == EJUSTRETURN)
return 0;
break;
diff -r 19ae73e42bfe -r e851f80f7d7a sys/dev/mii/tlphy.c
--- a/sys/dev/mii/tlphy.c Tue Jun 11 07:22:07 2013 +0000
+++ b/sys/dev/mii/tlphy.c Tue Jun 11 07:22:08 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tlphy.c,v 1.60 2013/06/09 09:15:51 msaitoh Exp $ */
+/* $NetBSD: tlphy.c,v 1.61 2013/06/11 07:22:08 msaitoh Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -59,7 +59,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tlphy.c,v 1.60 2013/06/09 09:15:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tlphy.c,v 1.61 2013/06/11 07:22:08 msaitoh Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -261,18 +261,6 @@
return (0);
/*
- * Is the interface even up?
- */
- if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
- return (0);
-
- /*
- * Only used for autonegotiation.
- */
- if (IFM_SUBTYPE(ife->ifm_media) != IFM_AUTO)
- break;
-
- /*
* XXX WHAT ABOUT CHECKING LINK ON THE BNC/AUI?!
*/
Home |
Main Index |
Thread Index |
Old Index