Merge tag 'v3.3-rc4' into for-3.4 in order to resolve the conflict
[firefly-linux-kernel-4.4.55.git] / drivers / net / ethernet / octeon / octeon_mgmt.c
index bc1d946b7971b6c1ede4fc7616aa5609d153b26c..cd827ff4a021f74284574f75cc27de97b4c3e7fe 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/capability.h>
 #include <linux/dma-mapping.h>
 #include <linux/init.h>
+#include <linux/module.h>
 #include <linux/interrupt.h>
 #include <linux/platform_device.h>
 #include <linux/netdevice.h>
@@ -669,7 +670,7 @@ static void octeon_mgmt_adjust_link(struct net_device *netdev)
 static int octeon_mgmt_init_phy(struct net_device *netdev)
 {
        struct octeon_mgmt *p = netdev_priv(netdev);
-       char phy_id[20];
+       char phy_id[MII_BUS_ID_SIZE + 3];
 
        if (octeon_is_simulation()) {
                /* No PHYs in the simulator. */
@@ -677,7 +678,7 @@ static int octeon_mgmt_init_phy(struct net_device *netdev)
                return 0;
        }
 
-       snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "0", p->port);
+       snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT, "mdio-octeon-0", p->port);
 
        p->phydev = phy_connect(netdev, phy_id, octeon_mgmt_adjust_link, 0,
                                PHY_INTERFACE_MODE_MII);