From 6c11d5c4706f9c85903328b037e7d1edd28fb448 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Wed, 14 Sep 2011 10:32:25 +0200 Subject: [PATCH] net: emaclite: Disable autonegotiation for 1000Mbit/s Phy can use 1000baseT but emaclite can work just with 10/100 Mbit/s. That's why driver has to setup phydev capability and setup what speeds can be used. Based on this setting generic phydev code disable autonegotiation for 1000baseT. Signed-off-by: Michal Simek --- drivers/net/xilinx_emaclite.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/net/xilinx_emaclite.c b/drivers/net/xilinx_emaclite.c index 34d26e4f28e..d0d98932174 100644 --- a/drivers/net/xilinx_emaclite.c +++ b/drivers/net/xilinx_emaclite.c @@ -261,9 +261,14 @@ static int setup_phy(struct eth_device *dev) /* interface - look at tsec */ phydev = phy_connect(emaclite->bus, emaclite->phyaddr, dev, 0); - - phydev->supported &= supported; - phydev->advertising = phydev->supported; + /* + * Phy can support 1000baseT but device NOT that's why phydev->supported + * must be setup for 1000baseT. phydev->advertising setups what speeds + * will be used for autonegotiation where 1000baseT must be disabled. + */ + phydev->supported = supported | SUPPORTED_1000baseT_Half | + SUPPORTED_1000baseT_Full; + phydev->advertising = supported; emaclite->phydev = phydev; phy_config(phydev); phy_startup(phydev); -- 2.47.3