From 4451212626c70758207632fefa4e08b94107bc7a Mon Sep 17 00:00:00 2001 From: Srinivas Kandagatla Date: Wed, 4 Apr 2012 04:33:19 +0000 Subject: [PATCH] --- yaml --- r: 300503 b: refs/heads/master c: f142af2e2064546ac470e8690acbd189b3584e67 h: refs/heads/master i: 300501: c0621bfce3820735cc193ad90a3c3bddca592a1e 300499: 0a44f56513a8935eafa2901810b18170962fe33d 300495: d5746fb54fc5923392bb776e161144b35212f7e4 v: v3 --- [refs] | 2 +- trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 8 +++++++- trunk/include/linux/stmmac.h | 1 + 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index 738039f59903..e9d0a143f45e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9450f7506d28276c603275f84e54fc8779fb516c +refs/heads/master: f142af2e2064546ac470e8690acbd189b3584e67 diff --git a/trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e85ffbd54830..860519c4d9a1 100644 --- a/trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -307,7 +307,13 @@ static int stmmac_init_phy(struct net_device *dev) priv->speed = 0; priv->oldduplex = -1; - snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x", priv->plat->bus_id); + if (priv->plat->phy_bus_name) + snprintf(bus_id, MII_BUS_ID_SIZE, "%s-%x", + priv->plat->phy_bus_name, priv->plat->bus_id); + else + snprintf(bus_id, MII_BUS_ID_SIZE, "stmmac-%x", + priv->plat->bus_id); + snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id, priv->plat->phy_addr); pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id); diff --git a/trunk/include/linux/stmmac.h b/trunk/include/linux/stmmac.h index 0dddc9e42b6b..172b5e15df2e 100644 --- a/trunk/include/linux/stmmac.h +++ b/trunk/include/linux/stmmac.h @@ -39,6 +39,7 @@ struct stmmac_mdio_bus_data { }; struct plat_stmmacenet_data { + char *phy_bus_name; int bus_id; int phy_addr; int interface;