diff options
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 | ||||
-rw-r--r-- | include/linux/stmmac.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e85ffbd54830..860519c4d9a1 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | |||
@@ -307,7 +307,13 @@ static int stmmac_init_phy(struct net_device *dev) | |||
307 | priv->speed = 0; | 307 | priv->speed = 0; |
308 | priv->oldduplex = -1; | 308 | priv->oldduplex = -1; |
309 | 309 | ||
310 | snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x", priv->plat->bus_id); | 310 | if (priv->plat->phy_bus_name) |
311 | snprintf(bus_id, MII_BUS_ID_SIZE, "%s-%x", | ||
312 | priv->plat->phy_bus_name, priv->plat->bus_id); | ||
313 | else | ||
314 | snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x", | ||
315 | priv->plat->bus_id); | ||
316 | |||
311 | snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id, | 317 | snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id, |
312 | priv->plat->phy_addr); | 318 | priv->plat->phy_addr); |
313 | pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id); | 319 | pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id); |
diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 0dddc9e42b6b..172b5e15df2e 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h | |||
@@ -39,6 +39,7 @@ struct stmmac_mdio_bus_data { | |||
39 | }; | 39 | }; |
40 | 40 | ||
41 | struct plat_stmmacenet_data { | 41 | struct plat_stmmacenet_data { |
42 | char *phy_bus_name; | ||
42 | int bus_id; | 43 | int bus_id; |
43 | int phy_addr; | 44 | int phy_addr; |
44 | int interface; | 45 | int interface; |