From 433df3f12e59014c33d73c0a3d76fea36dfccb3d Mon Sep 17 00:00:00 2001 From: kettenis Date: Thu, 4 Aug 2016 14:14:05 +0000 Subject: [PATCH] After fixing up some of the AR8035 PHY registers, issue a reset. This seems to fix autonegotiation at 100BaseTX. Drop the bit of code that powers up the PHY as the reset should already take care of that. ok patrick@ --- sys/arch/armv7/imx/if_fec.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/arch/armv7/imx/if_fec.c b/sys/arch/armv7/imx/if_fec.c index 32b8729bb39..ad06d3162f3 100644 --- a/sys/arch/armv7/imx/if_fec.c +++ b/sys/arch/armv7/imx/if_fec.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_fec.c,v 1.11 2016/07/27 11:45:02 patrick Exp $ */ +/* $OpenBSD: if_fec.c,v 1.12 2016/08/04 14:14:05 kettenis Exp $ */ /* * Copyright (c) 2012-2013 Patrick Wildt * @@ -486,10 +486,7 @@ fec_phy_init(struct fec_softc *sc, struct mii_softc *child) reg = fec_miibus_readreg(dev, phy, 0x1e); fec_miibus_writereg(dev, phy, 0x1e, reg | 0x0100); - /* phy power */ - reg = fec_miibus_readreg(dev, phy, 0x00); - if (reg & 0x0800) - fec_miibus_writereg(dev, phy, 0x00, reg & ~0x0800); + PHY_RESET(child); } if (child->mii_oui == MII_OUI_MICREL && -- 2.20.1