cpmac fix (closes #3124)
authorMatteo Croce <rootkit85@yahoo.it>
Mon, 21 Apr 2008 02:00:04 +0000 (02:00 +0000)
committerMatteo Croce <rootkit85@yahoo.it>
Mon, 21 Apr 2008 02:00:04 +0000 (02:00 +0000)
SVN-Revision: 10896

target/linux/ar7/patches-2.6.24/170-cpmac_eth_fix.patch [new file with mode: 0644]

diff --git a/target/linux/ar7/patches-2.6.24/170-cpmac_eth_fix.patch b/target/linux/ar7/patches-2.6.24/170-cpmac_eth_fix.patch
new file mode 100644 (file)
index 0000000..b2af254
--- /dev/null
@@ -0,0 +1,14 @@
+diff -pruN linux-2.6.24.2.old/drivers/net/cpmac.c linux-2.6.24.2/drivers/net/cpmac.c
+--- linux-2.6.24.2.old/drivers/net/cpmac.c     2008-03-20 20:33:01.000000000 +0100
++++ linux-2.6.24.2/drivers/net/cpmac.c 2008-03-20 20:47:31.000000000 +0100
+@@ -1178,9 +1179,7 @@ static int __devinit cpmac_probe(struct 
+       priv->msg_enable = netif_msg_init(debug_level, 0xff);
+       memcpy(dev->dev_addr, pdata->dev_addr, sizeof(dev->dev_addr));
+-      snprintf(priv->phy_name, BUS_ID_SIZE, PHY_ID_FMT, mdio_bus_id, phy_id);
+-
+-      priv->phy = phy_connect(dev, priv->phy_name, &cpmac_adjust_link, 0,
++      priv->phy = phy_connect(dev, cpmac_mii.phy_map[phy_id]->dev.bus_id, &cpmac_adjust_link, 0,
+                               PHY_INTERFACE_MODE_MII);
+       if (IS_ERR(priv->phy)) {
+               if (netif_msg_drv(priv))