Commit 109cdd66 authored by Giuseppe CAVALLARO's avatar Giuseppe CAVALLARO Committed by David S. Miller

stmmac: use MII_BUS_ID_SIZE instead of BUS_ID_SIZE

Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 596a530b
...@@ -305,8 +305,8 @@ static int stmmac_init_phy(struct net_device *dev) ...@@ -305,8 +305,8 @@ static int stmmac_init_phy(struct net_device *dev)
{ {
struct stmmac_priv *priv = netdev_priv(dev); struct stmmac_priv *priv = netdev_priv(dev);
struct phy_device *phydev; struct phy_device *phydev;
char phy_id[BUS_ID_SIZE]; /* PHY to connect */ char phy_id[MII_BUS_ID_SIZE + 3];
char bus_id[BUS_ID_SIZE]; char bus_id[MII_BUS_ID_SIZE];
priv->oldlink = 0; priv->oldlink = 0;
priv->speed = 0; priv->speed = 0;
...@@ -318,7 +318,8 @@ static int stmmac_init_phy(struct net_device *dev) ...@@ -318,7 +318,8 @@ static int stmmac_init_phy(struct net_device *dev)
} }
snprintf(bus_id, MII_BUS_ID_SIZE, "%x", priv->bus_id); snprintf(bus_id, MII_BUS_ID_SIZE, "%x", priv->bus_id);
snprintf(phy_id, BUS_ID_SIZE, PHY_ID_FMT, bus_id, priv->phy_addr); snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT, bus_id,
priv->phy_addr);
pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id); pr_debug("stmmac_init_phy: trying to attach to %s\n", phy_id);
phydev = phy_connect(dev, phy_id, &stmmac_adjust_link, 0, phydev = phy_connect(dev, phy_id, &stmmac_adjust_link, 0,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment