ar71xx: change PHY select logic, and update phy_masks
authorGabor Juhos <juhosg@openwrt.org>
Sun, 21 Mar 2010 18:16:07 +0000 (18:16 +0000)
committerGabor Juhos <juhosg@openwrt.org>
Sun, 21 Mar 2010 18:16:07 +0000 (18:16 +0000)
SVN-Revision: 20358

22 files changed:
target/linux/ar71xx/files/arch/mips/ar71xx/dev-ap91-eth.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap81.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ap83.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-aw-nr580.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-dir-615-c1.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w04nu.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-mzk-w300nh.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb42.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-pb44.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-rb4xx.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tew-632brp.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr1043nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr841n.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-tl-wr941nd.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-ubnt.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wndr3700.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wnr2000.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wp543.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wrt400n.c
target/linux/ar71xx/files/arch/mips/ar71xx/mach-wzr-hp-g300nh.c
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx.h
target/linux/ar71xx/files/drivers/net/ag71xx/ag71xx_phy.c

index 571901e670b50085a02a3c8943ea4a5df5b83f4f..c48af45cfbf9d2a32afc49b5f4106983af5f6e65 100644 (file)
@@ -48,7 +48,6 @@ void __init ap91_eth_init(u8 *mac_addr, const char *port_names[])
 
        /* WAN port */
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0x0;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_data.fifo_cfg1 = 0x0fff0000;
@@ -57,7 +56,6 @@ void __init ap91_eth_init(u8 *mac_addr, const char *port_names[])
 
        /* LAN ports */
        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth1_data.phy_mask = 0x0;
        ar71xx_eth1_data.speed = SPEED_1000;
        ar71xx_eth1_data.duplex = DUPLEX_FULL;
        ar71xx_eth1_data.fifo_cfg1 = 0x0fff0000;
index 6fa950f70d605c1694704735e893a4c82d92968b..cd865b001e9f194fa3e0687dd6989342c30781e9 100644 (file)
@@ -113,7 +113,6 @@ static void __init ap81_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_data.has_ar8216 = 1;
index 72c00163166e733b1ed7c844bb96f92248ffefc9..9aa17dce1a4185e48f6df613b74600062c126ff2 100644 (file)
@@ -206,7 +206,6 @@ static void __init ap83_generic_setup(void)
        ar71xx_add_device_eth(0);
 
        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
-       ar71xx_eth1_data.phy_mask = 0x0;
        ar71xx_eth1_data.speed = SPEED_1000;
        ar71xx_eth1_data.duplex = DUPLEX_FULL;
 
index a6f1daf4619f1a974fd3f3a0bf3017191461992a..b9b037a7ca49dc045d7a4dfbeeeb6dcba31d003f 100644 (file)
@@ -80,7 +80,6 @@ static void __init aw_nr580_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index 5eb594c31ab913c9a881e6bd7c757e7917a7658c..f5eb7b2e43d0ee443b3c1bcae4fc7f0962f4c821 100644 (file)
@@ -144,7 +144,6 @@ static void __init dir_615c1_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index 1e5a9338155d199cb8ac58650aaa097db0318b30..42d0f81e6aeec648404f87628edfa4c8c1a69236 100644 (file)
@@ -135,7 +135,6 @@ static void __init mzk_w04nu_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_data.has_ar8216 = 1;
index 3a38c8285196ab60f4f2aff6073c9479061b0807..ed431d824c94fc339de54057c4e85799b589438b 100644 (file)
@@ -134,7 +134,6 @@ static void __init mzk_w300nh_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_data.has_ar8216 = 1;
index 96a976f8a82644651e344b52a48d9fa9dc923162..576da4ba7a67bb0f61aeadcdf452b267fbcc1c7b 100644 (file)
@@ -55,7 +55,6 @@ static void __init pb42_init(void)
        ar71xx_eth0_data.phy_mask = PB42_WAN_PHYMASK;
 
        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth1_data.phy_mask = PB42_LAN_PHYMASK;
        ar71xx_eth1_data.speed = SPEED_100;
        ar71xx_eth1_data.duplex = DUPLEX_FULL;
 
index 052884f5c7151cbb448bf9a136a1a58a6acb3875..aa746665e373df60147fec186be316e89cf7d708 100644 (file)
@@ -179,7 +179,6 @@ static void __init pb44_init(void)
        ar71xx_add_device_eth(0);
 
        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
-       ar71xx_eth1_data.phy_mask = PB44_LAN_PHYMASK;
        ar71xx_eth1_data.speed = SPEED_1000;
        ar71xx_eth1_data.duplex = DUPLEX_FULL;
        ar71xx_eth1_pll_data.pll_1000 = 0x110000;
index bf1a39f3b43526d83bae14d52081ac0b27334048..0527e13a9f282aa0e8b789cf225590f769d0810e 100644 (file)
@@ -177,10 +177,10 @@ static void __init rb411_setup(void)
        rb4xx_generic_setup();
        rb4xx_add_device_spi();
 
-       ar71xx_add_device_mdio(0xfffffffe);
+       ar71xx_add_device_mdio(0xfffffffc);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-       ar71xx_eth0_data.phy_mask = 0x00000001;
+       ar71xx_eth0_data.phy_mask = 0x00000003;
 
        ar71xx_add_device_eth(0);
 
@@ -216,7 +216,6 @@ static void __init rb433_setup(void)
        ar71xx_add_device_mdio(0xffffffe9);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-       ar71xx_eth0_data.phy_mask = 0x00000006;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
@@ -249,7 +248,6 @@ static void __init rb450_generic_setup(int gige)
        ar71xx_add_device_mdio(0xffffffe0);
 
        ar71xx_eth0_data.phy_if_mode = (gige) ? PHY_INTERFACE_MODE_RGMII : PHY_INTERFACE_MODE_MII;
-       ar71xx_eth0_data.phy_mask = 0x0000000f;
        ar71xx_eth0_data.speed = (gige) ? SPEED_1000 : SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
@@ -284,7 +282,6 @@ static void __init rb493_setup(void)
        ar71xx_add_device_mdio(0x3fffff00);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-       ar71xx_eth0_data.phy_mask = 0;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index 4abb8e4ed1e24c4c75dce398a1529315e39f4f26..2bf9ad9b0355bdf7aaf11f516c1b7c1796297380 100644 (file)
@@ -120,7 +120,6 @@ static void __init tew_632brp_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index fd8e5fce8def2fdddaa2dafb151ee20106e3c90f..3b7b764c227060559499c730e244f89f2d413f9d 100644 (file)
@@ -130,7 +130,6 @@ static void __init tl_wr1043nd_setup(void)
 
        ar71xx_eth0_data.mii_bus_dev = &tl_wr1043nd_rtl8366rb_device.dev;
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
-       ar71xx_eth0_data.phy_mask = 0x0;
        ar71xx_eth0_data.speed = SPEED_1000;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_pll_data.pll_1000 = 0x1a000000;
index 9f9e3c6e8aaba0e3fef7e49e3846da66e51b88b8..1b849e18b8e5a181abb5e71c8bdbc66fa27d7360 100644 (file)
@@ -120,7 +120,6 @@ static void __init tl_wr841n_v1_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0x0;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index 67af5b0f1ad6df706332f46539fac0f898770807..0c648939f9b31df4a971ee51fac86d2fa500ff9f 100644 (file)
@@ -121,7 +121,6 @@ static void __init tl_wr941nd_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0x0;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index 5b1c504f39b2d49443766d630962ebd784718542..3cd5a63ef506b0db3a208c05182a48b6fbb5b9a8 100644 (file)
@@ -136,9 +136,6 @@ static void __init ubnt_generic_setup(void)
 #define UBNT_RS_WAN_PHYMASK    (1 << 20)
 #define UBNT_RS_LAN_PHYMASK    ((1 << 16) | (1 << 17) | (1 << 18) | (1 << 19))
 
-#define UBNT_RSPRO_WAN_PHYMASK (1 << 4)
-#define UBNT_RSPRO_LAN_PHYMASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3))
-
 static void __init ubnt_rs_setup(void)
 {
        ubnt_generic_setup();
@@ -149,8 +146,6 @@ static void __init ubnt_rs_setup(void)
        ar71xx_eth0_data.phy_mask = UBNT_RS_WAN_PHYMASK;
 
        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth1_data.phy_mask = UBNT_RS_LAN_PHYMASK;
-
        ar71xx_eth1_data.speed = SPEED_100;
        ar71xx_eth1_data.duplex = DUPLEX_FULL;
 
@@ -169,6 +164,9 @@ MIPS_MACHINE(AR71XX_MACH_UBNT_RS, "UBNT-RS", "Ubiquiti RouterStation",
 MIPS_MACHINE(AR71XX_MACH_UBNT_AR71XX, "Ubiquiti AR71xx-based board",
             "Ubiquiti RouterStation", ubnt_rs_setup);
 
+#define UBNT_RSPRO_WAN_PHYMASK (1 << 4)
+#define UBNT_RSPRO_LAN_PHYMASK ((1 << 0) | (1 << 1) | (1 << 2) | (1 << 3))
+
 static void __init ubnt_rspro_setup(void)
 {
        ubnt_generic_setup();
@@ -179,8 +177,6 @@ static void __init ubnt_rspro_setup(void)
        ar71xx_eth0_data.phy_mask = UBNT_RSPRO_WAN_PHYMASK;
 
        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
-       ar71xx_eth1_data.phy_mask = UBNT_RSPRO_LAN_PHYMASK;
-
        ar71xx_eth1_data.speed = SPEED_1000;
        ar71xx_eth1_data.duplex = DUPLEX_FULL;
 
@@ -235,7 +231,6 @@ static void __init ubnt_m_setup(void)
        ar71xx_add_device_mdio(~0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-       ar71xx_eth0_data.phy_mask = 0;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_data.fifo_cfg1 = 0x0010ffff;
@@ -272,7 +267,6 @@ static void __init ubnt_nano_m_setup(void)
        ubnt_m_setup();
 
        ar71xx_eth1_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth1_data.phy_mask = 0;
        ar71xx_eth1_data.speed = SPEED_1000;
        ar71xx_eth1_data.duplex = DUPLEX_FULL;
        ar71xx_eth1_data.fifo_cfg1 = 0x0010ffff;
index 3dd97789a0d7e564e4d103161867d9e1d4d1008c..62931e6a11ff87d508e8f2a374ff8a3009e87555 100644 (file)
@@ -173,7 +173,6 @@ static void __init wndr3700_setup(void)
        ar71xx_eth0_pll_data.pll_1000 = 0x11110000;
        ar71xx_eth0_data.mii_bus_dev = &wndr3700_rtl8366s_device.dev;
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_1000;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index bf4be894657c40b5804019e0a5d918f231d561c8..73422d6badbac14816fb0873cf7e019c541836f2 100644 (file)
@@ -122,7 +122,6 @@ static void __init wnr2000_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_data.has_ar8216 = 1;
index bf8b9f562374ff14567c037606f10513d7d01fa2..22585842e20160320e0641a08b6ae6673f5f046a 100644 (file)
@@ -79,7 +79,7 @@ static void __init wp543_setup(void)
        ar71xx_add_device_mdio(0xfffffff7);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_MII;
-       ar71xx_eth0_data.phy_mask = 0x00000008;
+       ar71xx_eth0_data.phy_mask = 0x08;
        ar71xx_eth0_data.reset_bit = RESET_MODULE_GE0_MAC |
                                     RESET_MODULE_GE0_PHY;
        ar71xx_add_device_eth(0);
index 3d50afcbb21339b386daf8eb07a14f3ad05f0422..886f94728ee6643e732d763533cc9cdeffd80d0a 100644 (file)
@@ -143,7 +143,6 @@ static void __init wrt400n_setup(void)
        ar71xx_add_device_mdio(0x0);
 
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_100;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
        ar71xx_eth0_data.has_ar8216 = 1;
index c6fb241c51ab5f4ef4db14031c59846157cabe66..b52cc601fccb1f4fd8630008c6efc879402f1faf 100644 (file)
@@ -234,7 +234,6 @@ static void __init wzrhpg300nh_setup(void)
        ar71xx_eth0_pll_data.pll_1000 = 0x1e000100;
        ar71xx_eth0_data.mii_bus_dev = &wzrhpg300nh_rtl8366s_device.dev;
        ar71xx_eth0_data.phy_if_mode = PHY_INTERFACE_MODE_RGMII;
-       ar71xx_eth0_data.phy_mask = 0xf;
        ar71xx_eth0_data.speed = SPEED_1000;
        ar71xx_eth0_data.duplex = DUPLEX_FULL;
 
index 841c67fb98a35d99e6398c37bd05cb87913b4464..5be89987bb406f22ad0470edc8d1d24e4f974fc0 100644 (file)
@@ -38,7 +38,7 @@
 #define ETH_FCS_LEN    4
 
 #define AG71XX_DRV_NAME                "ag71xx"
-#define AG71XX_DRV_VERSION     "0.5.32"
+#define AG71XX_DRV_VERSION     "0.5.33"
 
 #define AG71XX_NAPI_WEIGHT     64
 #define AG71XX_OOM_REFILL      (1 + HZ/10)
index 4425b740e52bc3e9725c537c0c685305fd048ddd..9c76544aff6734fe5e011492f6e17557ca4b8d8f 100644 (file)
@@ -47,10 +47,6 @@ void ag71xx_phy_start(struct ag71xx *ag)
        if (ag->phy_dev) {
                phy_start(ag->phy_dev);
        } else {
-               struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
-
-               ag->duplex = pdata->duplex;
-               ag->speed = pdata->speed;
                ag->link = 1;
                ag71xx_link_adjust(ag);
        }
@@ -61,9 +57,7 @@ void ag71xx_phy_stop(struct ag71xx *ag)
        if (ag->phy_dev) {
                phy_stop(ag->phy_dev);
        } else {
-               ag->duplex = -1;
                ag->link = 0;
-               ag->speed = 0;
                ag71xx_link_adjust(ag);
        }
 }
@@ -81,12 +75,16 @@ static int ag71xx_phy_connect_fixed(struct ag71xx *ag)
        case SPEED_1000:
                break;
        default:
-               printk(KERN_ERR "%s: invalid speed specified\n",
-                       dev->name);
+               printk(KERN_ERR "%s: invalid speed specified\n", dev->name);
                ret = -EINVAL;
                break;
        }
 
+       printk(KERN_DEBUG "%s: using fixed link parameters\n", dev->name);
+
+       ag->duplex = pdata->duplex;
+       ag->speed = pdata->speed;
+
        return ret;
 }
 
@@ -95,7 +93,6 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag)
        struct net_device *dev = ag->dev;
        struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
        struct phy_device *phydev = NULL;
-       int phy_count = 0;
        int phy_addr;
        int ret = 0;
 
@@ -113,50 +110,39 @@ static int ag71xx_phy_connect_multi(struct ag71xx *ag)
 
                if (phydev == NULL)
                        phydev = ag->mii_bus->phy_map[phy_addr];
-
-               phy_count++;
        }
 
-       switch (phy_count) {
-       case 0:
+       if (!phydev) {
                printk(KERN_ERR "%s: no PHY found with phy_mask=%08x\n",
                        dev->name, pdata->phy_mask);
-               ret = -ENODEV;
-               break;
-       case 1:
-               ag->phy_dev = phy_connect(dev, dev_name(&phydev->dev),
-                       &ag71xx_phy_link_adjust, 0, pdata->phy_if_mode);
-
-               if (IS_ERR(ag->phy_dev)) {
-                       printk(KERN_ERR "%s: could not connect to PHY at %s\n",
-                               dev->name, dev_name(&phydev->dev));
-                       return PTR_ERR(ag->phy_dev);
-               }
+               return -ENODEV;
+       }
 
-               /* mask with MAC supported features */
-               if (pdata->has_gbit)
-                       phydev->supported &= PHY_GBIT_FEATURES;
-               else
-                       phydev->supported &= PHY_BASIC_FEATURES;
+       ag->phy_dev = phy_connect(dev, dev_name(&phydev->dev),
+                                 &ag71xx_phy_link_adjust, 0,
+                                 pdata->phy_if_mode);
 
-               phydev->advertising = phydev->supported;
+       if (IS_ERR(ag->phy_dev)) {
+               printk(KERN_ERR "%s: could not connect to PHY at %s\n",
+                       dev->name, dev_name(&phydev->dev));
+               return PTR_ERR(ag->phy_dev);
+       }
 
-               printk(KERN_DEBUG "%s: connected to PHY at %s "
-                       "[uid=%08x, driver=%s]\n",
-                       dev->name, dev_name(&phydev->dev),
-                       phydev->phy_id, phydev->drv->name);
+       /* mask with MAC supported features */
+       if (pdata->has_gbit)
+               phydev->supported &= PHY_GBIT_FEATURES;
+       else
+               phydev->supported &= PHY_BASIC_FEATURES;
 
-               ag->link = 0;
-               ag->speed = 0;
-               ag->duplex = -1;
-               break;
+       phydev->advertising = phydev->supported;
 
-       default:
-               printk(KERN_DEBUG "%s: connected to %d PHYs\n",
-                       dev->name, phy_count);
-               ret = ag71xx_phy_connect_fixed(ag);
-               break;
-       }
+       printk(KERN_DEBUG "%s: connected to PHY at %s [uid=%08x, driver=%s]\n",
+               dev->name, dev_name(&phydev->dev),
+               phydev->phy_id, phydev->drv->name);
+
+       ag->link = 0;
+       ag->speed = 0;
+       ag->duplex = -1;
 
        return ret;
 }