Commit 38ddc59d authored by LABBE Corentin's avatar LABBE Corentin Committed by David S. Miller

net: stmmac: replace all pr_xxx by their netdev_xxx counterpart

The stmmac driver use lots of pr_xxx functions to print information.
This is bad since we cannot know which device logs the information.
(moreover if two stmmac device are present)

Furthermore, it seems that it assumes wrongly that all logs will always
be subsequent by using a dev_xxx then some indented pr_xxx like this:
kernel: sun7i-dwmac 1c50000.ethernet: no reset control found
kernel:  Ring mode enabled
kernel:  No HW DMA feature register supported
kernel:  Normal descriptors
kernel:  TX Checksum insertion supported

So this patch replace all pr_xxx by their netdev_xxx counterpart.
Excepts for some printing where netdev "cause" unpretty output like:
sun7i-dwmac 1c50000.ethernet (unnamed net_device) (uninitialized): no reset control found
In those case, I keep dev_xxx.

In the same time I remove some "stmmac:" print since
this will be a duplicate with that dev_xxx displays.
Signed-off-by: default avatarCorentin Labbe <clabbe.montjoie@gmail.com>
Acked-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 29c58472
...@@ -260,7 +260,7 @@ int stmmac_mdio_reset(struct mii_bus *bus) ...@@ -260,7 +260,7 @@ int stmmac_mdio_reset(struct mii_bus *bus)
#endif #endif
if (data->phy_reset) { if (data->phy_reset) {
pr_debug("stmmac_mdio_reset: calling phy_reset\n"); netdev_dbg(ndev, "stmmac_mdio_reset: calling phy_reset\n");
data->phy_reset(priv->plat->bsp_priv); data->phy_reset(priv->plat->bsp_priv);
} }
...@@ -325,7 +325,7 @@ int stmmac_mdio_register(struct net_device *ndev) ...@@ -325,7 +325,7 @@ int stmmac_mdio_register(struct net_device *ndev)
else else
err = mdiobus_register(new_bus); err = mdiobus_register(new_bus);
if (err != 0) { if (err != 0) {
pr_err("%s: Cannot register as MDIO bus\n", new_bus->name); netdev_err(ndev, "Cannot register the MDIO bus\n");
goto bus_register_fail; goto bus_register_fail;
} }
...@@ -372,16 +372,16 @@ int stmmac_mdio_register(struct net_device *ndev) ...@@ -372,16 +372,16 @@ int stmmac_mdio_register(struct net_device *ndev)
irq_str = irq_num; irq_str = irq_num;
break; break;
} }
pr_info("%s: PHY ID %08x at %d IRQ %s (%s)%s\n", netdev_info(ndev, "PHY ID %08x at %d IRQ %s (%s)%s\n",
ndev->name, phydev->phy_id, addr, phydev->phy_id, addr,
irq_str, phydev_name(phydev), irq_str, phydev_name(phydev),
act ? " active" : ""); act ? " active" : "");
found = 1; found = 1;
} }
} }
if (!found && !mdio_node) { if (!found && !mdio_node) {
pr_warn("%s: No PHY found\n", ndev->name); netdev_warn(ndev, "No PHY found\n");
mdiobus_unregister(new_bus); mdiobus_unregister(new_bus);
mdiobus_free(new_bus); mdiobus_free(new_bus);
return -ENODEV; return -ENODEV;
......
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