Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/mii Let mii_phy_setmedia() handle the IFM_AUTO case, ...
details: https://anonhg.NetBSD.org/src/rev/b468937c7c20
branches: trunk
changeset: 481629:b468937c7c20
user: thorpej <thorpej%NetBSD.org@localhost>
date: Wed Feb 02 23:34:56 2000 +0000
description:
Let mii_phy_setmedia() handle the IFM_AUTO case, too.
diffstat:
sys/dev/mii/dmphy.c | 15 ++-------------
sys/dev/mii/exphy.c | 15 ++-------------
sys/dev/mii/icsphy.c | 15 ++-------------
sys/dev/mii/inphy.c | 15 ++-------------
sys/dev/mii/iophy.c | 15 ++-------------
sys/dev/mii/lxtphy.c | 15 ++-------------
sys/dev/mii/mii_physubr.c | 5 ++++-
sys/dev/mii/nsphy.c | 15 ++-------------
sys/dev/mii/nsphyter.c | 15 ++-------------
sys/dev/mii/qsphy.c | 15 ++-------------
sys/dev/mii/sqphy.c | 15 ++-------------
sys/dev/mii/tqphy.c | 15 ++-------------
sys/dev/mii/ukphy.c | 15 ++-------------
13 files changed, 28 insertions(+), 157 deletions(-)
diffs (truncated from 367 to 300 lines):
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/dmphy.c
--- a/sys/dev/mii/dmphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/dmphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dmphy.c,v 1.4 2000/02/02 17:50:43 thorpej Exp $ */
+/* $NetBSD: dmphy.c,v 1.5 2000/02/02 23:34:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999, 2000 The NetBSD Foundation, Inc.
@@ -183,18 +183,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/exphy.c
--- a/sys/dev/mii/exphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/exphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: exphy.c,v 1.22 2000/02/02 17:50:43 thorpej Exp $ */
+/* $NetBSD: exphy.c,v 1.23 2000/02/02 23:34:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -188,18 +188,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/icsphy.c
--- a/sys/dev/mii/icsphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/icsphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: icsphy.c,v 1.16 2000/02/02 17:50:43 thorpej Exp $ */
+/* $NetBSD: icsphy.c,v 1.17 2000/02/02 23:34:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -183,18 +183,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/inphy.c
--- a/sys/dev/mii/inphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/inphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: inphy.c,v 1.17 2000/02/02 17:50:44 thorpej Exp $ */
+/* $NetBSD: inphy.c,v 1.18 2000/02/02 23:34:56 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -183,18 +183,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/iophy.c
--- a/sys/dev/mii/iophy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/iophy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: iophy.c,v 1.7 2000/02/02 17:50:44 thorpej Exp $ */
+/* $NetBSD: iophy.c,v 1.8 2000/02/02 23:34:56 thorpej Exp $ */
/*
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -185,18 +185,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/lxtphy.c
--- a/sys/dev/mii/lxtphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/lxtphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: lxtphy.c,v 1.18 2000/02/02 17:50:44 thorpej Exp $ */
+/* $NetBSD: lxtphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -183,18 +183,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/mii_physubr.c
--- a/sys/dev/mii/mii_physubr.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/mii_physubr.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mii_physubr.c,v 1.11 2000/02/02 17:50:45 thorpej Exp $ */
+/* $NetBSD: mii_physubr.c,v 1.12 2000/02/02 23:34:57 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -76,6 +76,9 @@
struct ifmedia_entry *ife = mii->mii_media.ifm_cur;
int bmcr, anar;
+ if (IFM_SUBTYPE(ife->ifm_media) == IFM_AUTO)
+ (void) mii_phy_auto(sc, 1);
+
/*
* Table index is stored in the media entry.
*/
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/nsphy.c
--- a/sys/dev/mii/nsphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/nsphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nsphy.c,v 1.24 2000/02/02 17:50:45 thorpej Exp $ */
+/* $NetBSD: nsphy.c,v 1.25 2000/02/02 23:34:57 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -215,18 +215,7 @@
PHY_WRITE(sc, MII_NSPHY_PCR, reg);
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/nsphyter.c
--- a/sys/dev/mii/nsphyter.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/nsphyter.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nsphyter.c,v 1.4 2000/02/02 17:50:46 thorpej Exp $ */
+/* $NetBSD: nsphyter.c,v 1.5 2000/02/02 23:34:57 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -180,18 +180,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/qsphy.c
--- a/sys/dev/mii/qsphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/qsphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: qsphy.c,v 1.18 2000/02/02 17:50:46 thorpej Exp $ */
+/* $NetBSD: qsphy.c,v 1.19 2000/02/02 23:34:57 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -183,18 +183,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
- (void) mii_phy_auto(sc, 1);
- break;
- default:
- mii_phy_setmedia(sc);
- }
+ mii_phy_setmedia(sc);
break;
case MII_TICK:
diff -r 590efb9620dd -r b468937c7c20 sys/dev/mii/sqphy.c
--- a/sys/dev/mii/sqphy.c Wed Feb 02 23:28:08 2000 +0000
+++ b/sys/dev/mii/sqphy.c Wed Feb 02 23:34:56 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sqphy.c,v 1.16 2000/02/02 17:50:46 thorpej Exp $ */
+/* $NetBSD: sqphy.c,v 1.17 2000/02/02 23:34:57 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -183,18 +183,7 @@
if ((mii->mii_ifp->if_flags & IFF_UP) == 0)
break;
- switch (IFM_SUBTYPE(ife->ifm_media)) {
- case IFM_AUTO:
- /*
- * If we're already in auto mode, just return.
- */
- if (PHY_READ(sc, MII_BMCR) & BMCR_AUTOEN)
- return (0);
Home |
Main Index |
Thread Index |
Old Index