Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/mii Disable link down power save mode and energy eff...
details: https://anonhg.NetBSD.org/src/rev/aa3de79c180a
branches: trunk
changeset: 340072:aa3de79c180a
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Fri Aug 21 12:22:22 2015 +0000
description:
Disable link down power save mode and energy efficient ethernet on RTL8211F.
diffstat:
sys/dev/mii/rgephy.c | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r cb934da276aa -r aa3de79c180a sys/dev/mii/rgephy.c
--- a/sys/dev/mii/rgephy.c Fri Aug 21 12:02:07 2015 +0000
+++ b/sys/dev/mii/rgephy.c Fri Aug 21 12:22:22 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rgephy.c,v 1.39 2015/03/31 21:01:02 jmcneill Exp $ */
+/* $NetBSD: rgephy.c,v 1.40 2015/08/21 12:22:22 jmcneill Exp $ */
/*
* Copyright (c) 2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.39 2015/03/31 21:01:02 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.40 2015/08/21 12:22:22 jmcneill Exp $");
/*
@@ -637,10 +637,9 @@
} else if (sc->mii_mpd_rev == 6) {
/* RTL8211F */
phycr1 = PHY_READ(sc, RGEPHY_MII_PHYCR1);
- if ((phycr1 & RGEPHY_PHYCR1_MDI_MMCE) != 0) {
- phycr1 &= ~RGEPHY_PHYCR1_MDI_MMCE;
- PHY_WRITE(sc, RGEPHY_MII_PHYCR1, phycr1);
- }
+ phycr1 &= ~RGEPHY_PHYCR1_MDI_MMCE;
+ phycr1 &= ~RGEPHY_PHYCR1_ALDPS_EN;
+ PHY_WRITE(sc, RGEPHY_MII_PHYCR1, phycr1);
} else {
PHY_WRITE(sc, 0x1F, 0x0000);
PHY_WRITE(sc, 0x0e, 0x0000);
@@ -657,4 +656,14 @@
/* Step2: Restart NWay */
/* NWay enable and Restart NWay */
PHY_WRITE(sc, MII_BMCR, BMCR_RESET | BMCR_AUTOEN | BMCR_STARTNEG);
+
+ if (sc->mii_mpd_rev == 6) {
+ /* RTL8211F */
+ delay(10000);
+ /* disable EEE */
+ PHY_WRITE(sc, RGEPHY_MII_MACR, 0x0007);
+ PHY_WRITE(sc, RGEPHY_MII_MAADR, 0x003c);
+ PHY_WRITE(sc, RGEPHY_MII_MACR, 0x4007);
+ PHY_WRITE(sc, RGEPHY_MII_MAADR, 0x0000);
+ }
}
Home |
Main Index |
Thread Index |
Old Index