diff options
author | Felix Fietkau <nbd@openwrt.org> | 2009-03-22 22:10:54 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2009-03-22 22:10:54 +0000 |
commit | 9f8694d894e9c1b35d9467a2af7e24849ed08571 (patch) | |
tree | 3b19c05493062557f21f72756db254ee9e8b2dd0 /target/linux/atheros/patches-2.6.28/110-ar2313_ethernet.patch | |
parent | fc93ee1a9b58dec522070780c0a360fa1809c01c (diff) | |
download | upstream-9f8694d894e9c1b35d9467a2af7e24849ed08571.tar.gz upstream-9f8694d894e9c1b35d9467a2af7e24849ed08571.tar.bz2 upstream-9f8694d894e9c1b35d9467a2af7e24849ed08571.zip |
atheros: fix mdio bus registration for multiple ethernet interfaces
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14984 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/atheros/patches-2.6.28/110-ar2313_ethernet.patch')
-rw-r--r-- | target/linux/atheros/patches-2.6.28/110-ar2313_ethernet.patch | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/target/linux/atheros/patches-2.6.28/110-ar2313_ethernet.patch b/target/linux/atheros/patches-2.6.28/110-ar2313_ethernet.patch index ea61bcd3e3..8d1d24f748 100644 --- a/target/linux/atheros/patches-2.6.28/110-ar2313_ethernet.patch +++ b/target/linux/atheros/patches-2.6.28/110-ar2313_ethernet.patch @@ -25,7 +25,7 @@ obj-$(CONFIG_DECLANCE) += declance.o --- /dev/null +++ b/drivers/net/ar231x.c -@@ -0,0 +1,1267 @@ +@@ -0,0 +1,1268 @@ +/* + * ar231x.c: Linux driver for the Atheros AR231x Ethernet device. + * @@ -301,23 +301,24 @@ + sp->mii_bus->write = ar231x_mdiobus_write; + sp->mii_bus->reset = ar231x_mdiobus_reset; + sp->mii_bus->name = "ar231x_eth_mii"; -+ snprintf(sp->mii_bus->id, MII_BUS_ID_SIZE, "0"); ++ snprintf(sp->mii_bus->id, MII_BUS_ID_SIZE, "%d", pdev->id); + sp->mii_bus->irq = kmalloc(sizeof(int), GFP_KERNEL); + *sp->mii_bus->irq = PHY_POLL; + + mdiobus_register(sp->mii_bus); + + if (ar231x_mdiobus_probe(dev) != 0) { -+ printk(KERN_ERR "ar231x: mdiobus_probe failed"); ++ printk(KERN_ERR "%s: mdiobus_probe failed\n", dev->name); + rx_tasklet_cleanup(dev); + ar231x_init_cleanup(dev); + unregister_netdev(dev); + kfree(dev); -+ } else { -+ /* start link poll timer */ -+ ar231x_setup_timer(dev); ++ return -ENODEV; + } + ++ /* start link poll timer */ ++ ar231x_setup_timer(dev); ++ + return 0; +} + |