aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/au1000_eth.c
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-04-09 20:38:13 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:09:35 -0400
commit9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0 (patch)
tree51b2ee6bfa87bbd6faac0bc00a787354e1fb72a0 /drivers/net/au1000_eth.c
parentd080cd6301e107e79c6a0fc654319f8979f70549 (diff)
phy: Change mii_bus id field to a string
Having the id field be an int was making more complex bus topologies excessively difficult. For now, just convert it to a string, and change all instances of "bus->id = val" to snprintf(id, MII_BUS_ID_LEN, "%x", val). Signed-off-by: Andy Fleming <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/au1000_eth.c')
-rw-r--r--drivers/net/au1000_eth.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c
index 504b7ce2747d..3634b5fd7919 100644
--- a/drivers/net/au1000_eth.c
+++ b/drivers/net/au1000_eth.c
@@ -701,7 +701,7 @@ static struct net_device * au1000_probe(int port_num)
701 aup->mii_bus.write = mdiobus_write; 701 aup->mii_bus.write = mdiobus_write;
702 aup->mii_bus.reset = mdiobus_reset; 702 aup->mii_bus.reset = mdiobus_reset;
703 aup->mii_bus.name = "au1000_eth_mii"; 703 aup->mii_bus.name = "au1000_eth_mii";
704 aup->mii_bus.id = aup->mac_id; 704 snprintf(aup->mii_bus.id, MII_BUS_ID_SIZE, "%x", aup->mac_id);
705 aup->mii_bus.irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL); 705 aup->mii_bus.irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
706 for(i = 0; i < PHY_MAX_ADDR; ++i) 706 for(i = 0; i < PHY_MAX_ADDR; ++i)
707 aup->mii_bus.irq[i] = PHY_POLL; 707 aup->mii_bus.irq[i] = PHY_POLL;
@@ -709,11 +709,11 @@ static struct net_device * au1000_probe(int port_num)
709 /* if known, set corresponding PHY IRQs */ 709 /* if known, set corresponding PHY IRQs */
710#if defined(AU1XXX_PHY_STATIC_CONFIG) 710#if defined(AU1XXX_PHY_STATIC_CONFIG)
711# if defined(AU1XXX_PHY0_IRQ) 711# if defined(AU1XXX_PHY0_IRQ)
712 if (AU1XXX_PHY0_BUSID == aup->mii_bus.id) 712 if (AU1XXX_PHY0_BUSID == aup->mac_id)
713 aup->mii_bus.irq[AU1XXX_PHY0_ADDR] = AU1XXX_PHY0_IRQ; 713 aup->mii_bus.irq[AU1XXX_PHY0_ADDR] = AU1XXX_PHY0_IRQ;
714# endif 714# endif
715# if defined(AU1XXX_PHY1_IRQ) 715# if defined(AU1XXX_PHY1_IRQ)
716 if (AU1XXX_PHY1_BUSID == aup->mii_bus.id) 716 if (AU1XXX_PHY1_BUSID == aup->mac_id)
717 aup->mii_bus.irq[AU1XXX_PHY1_ADDR] = AU1XXX_PHY1_IRQ; 717 aup->mii_bus.irq[AU1XXX_PHY1_ADDR] = AU1XXX_PHY1_IRQ;
718# endif 718# endif
719#endif 719#endif