diff options
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c index db157a47000c..72ec711fcba2 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c | |||
@@ -204,6 +204,7 @@ int stmmac_mdio_register(struct net_device *ndev) | |||
204 | struct stmmac_priv *priv = netdev_priv(ndev); | 204 | struct stmmac_priv *priv = netdev_priv(ndev); |
205 | struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data; | 205 | struct stmmac_mdio_bus_data *mdio_bus_data = priv->plat->mdio_bus_data; |
206 | struct device_node *mdio_node = priv->plat->mdio_node; | 206 | struct device_node *mdio_node = priv->plat->mdio_node; |
207 | struct device *dev = ndev->dev.parent; | ||
207 | int addr, found; | 208 | int addr, found; |
208 | 209 | ||
209 | if (!mdio_bus_data) | 210 | if (!mdio_bus_data) |
@@ -237,7 +238,7 @@ int stmmac_mdio_register(struct net_device *ndev) | |||
237 | else | 238 | else |
238 | err = mdiobus_register(new_bus); | 239 | err = mdiobus_register(new_bus); |
239 | if (err != 0) { | 240 | if (err != 0) { |
240 | netdev_err(ndev, "Cannot register the MDIO bus\n"); | 241 | dev_err(dev, "Cannot register the MDIO bus\n"); |
241 | goto bus_register_fail; | 242 | goto bus_register_fail; |
242 | } | 243 | } |
243 | 244 | ||
@@ -285,14 +286,12 @@ int stmmac_mdio_register(struct net_device *ndev) | |||
285 | irq_str = irq_num; | 286 | irq_str = irq_num; |
286 | break; | 287 | break; |
287 | } | 288 | } |
288 | netdev_info(ndev, "PHY ID %08x at %d IRQ %s (%s)%s\n", | 289 | phy_attached_info(phydev); |
289 | phydev->phy_id, addr, irq_str, phydev_name(phydev), | ||
290 | act ? " active" : ""); | ||
291 | found = 1; | 290 | found = 1; |
292 | } | 291 | } |
293 | 292 | ||
294 | if (!found && !mdio_node) { | 293 | if (!found && !mdio_node) { |
295 | netdev_warn(ndev, "No PHY found\n"); | 294 | dev_warn(dev, "No PHY found\n"); |
296 | mdiobus_unregister(new_bus); | 295 | mdiobus_unregister(new_bus); |
297 | mdiobus_free(new_bus); | 296 | mdiobus_free(new_bus); |
298 | return -ENODEV; | 297 | return -ENODEV; |