]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
net: emaclite: Disable autonegotiation for 1000Mbit/s
authorMichal Simek <monstr@monstr.eu>
Wed, 14 Sep 2011 08:32:25 +0000 (10:32 +0200)
committerMichal Simek <monstr@monstr.eu>
Thu, 27 Sep 2012 07:12:21 +0000 (09:12 +0200)
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 <monstr@monstr.eu>
drivers/net/xilinx_emaclite.c

index 34d26e4f28ece0495906be4ee8d5d69f71c389de..d0d98932174f3292d56dd1373eef07e2a54a3608 100644 (file)
@@ -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);