diff options
Diffstat (limited to 'drivers/net/gianfar.c')
-rw-r--r-- | drivers/net/gianfar.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index c672ecfc9595..1b8deca8b9f8 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -238,8 +238,8 @@ static int gfar_of_init(struct net_device *dev) | |||
238 | goto err_out; | 238 | goto err_out; |
239 | } | 239 | } |
240 | 240 | ||
241 | snprintf(priv->phy_bus_id, BUS_ID_SIZE, PHY_ID_FMT, "0", | 241 | snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id), |
242 | fixed_link[0]); | 242 | PHY_ID_FMT, "0", fixed_link[0]); |
243 | } else { | 243 | } else { |
244 | phy = of_find_node_by_phandle(*ph); | 244 | phy = of_find_node_by_phandle(*ph); |
245 | 245 | ||
@@ -256,7 +256,7 @@ static int gfar_of_init(struct net_device *dev) | |||
256 | of_node_put(mdio); | 256 | of_node_put(mdio); |
257 | 257 | ||
258 | gfar_mdio_bus_name(bus_name, mdio); | 258 | gfar_mdio_bus_name(bus_name, mdio); |
259 | snprintf(priv->phy_bus_id, BUS_ID_SIZE, "%s:%02x", | 259 | snprintf(priv->phy_bus_id, sizeof(priv->phy_bus_id), "%s:%02x", |
260 | bus_name, *id); | 260 | bus_name, *id); |
261 | } | 261 | } |
262 | 262 | ||
@@ -1973,6 +1973,8 @@ static void adjust_link(struct net_device *dev) | |||
1973 | case 1000: | 1973 | case 1000: |
1974 | tempval = | 1974 | tempval = |
1975 | ((tempval & ~(MACCFG2_IF)) | MACCFG2_GMII); | 1975 | ((tempval & ~(MACCFG2_IF)) | MACCFG2_GMII); |
1976 | |||
1977 | ecntrl &= ~(ECNTRL_R100); | ||
1976 | break; | 1978 | break; |
1977 | case 100: | 1979 | case 100: |
1978 | case 10: | 1980 | case 10: |