Patchwork [U-Boot,V2,7/8] net/designware: Set ANAR to 0x1e1

login
register
mail settings
Submitter Amit Virdi
Date March 26, 2012, 10:09 a.m.
Message ID <1332756599-19304-8-git-send-email-amit.virdi@st.com>
Download mbox | patch
Permalink /patch/148690/
State Accepted
Delegated to: Joe Hershberger
Headers show

Comments

Amit Virdi - March 26, 2012, 10:09 a.m.
From: Armando Visconti <armando.visconti@st.com>

This patch forces the advertised capabilities during auto
negotiation to always be 10/100 Mbps and half/full as duplexing.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Amit Virdi <amit.virdi@st.com>
---
 drivers/net/designware.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
Joe Hershberger - April 4, 2012, 5:36 p.m.
On Mon, Mar 26, 2012 at 5:09 AM, Amit Virdi <amit.virdi@st.com> wrote:
> From: Armando Visconti <armando.visconti@st.com>
>
> This patch forces the advertised capabilities during auto
> negotiation to always be 10/100 Mbps and half/full as duplexing.
>
> Signed-off-by: Armando Visconti <armando.visconti@st.com>
> Signed-off-by: Amit Virdi <amit.virdi@st.com>

Applied.

Thanks,
-Joe

Patch

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 56f0c7a..987469a 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -399,6 +399,9 @@  static int configure_phy(struct eth_device *dev)
 		return -1;
 
 #if defined(CONFIG_DW_AUTONEG)
+	/* Set Auto-Neg Advertisement capabilities to 10/100 half/full */
+	eth_mdio_write(dev, phy_addr, MII_ADVERTISE, 0x1E1);
+
 	bmcr = BMCR_ANENABLE | BMCR_ANRESTART;
 #else
 	bmcr = BMCR_SPEED100 | BMCR_FULLDPLX;