diff --git a/drivers/net/ethernet/broadcom/genet/bcmmii.c b/drivers/net/ethernet/broadcom/genet/bcmmii.c index 5335244e4577..3b027e4e701d 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmmii.c +++ b/drivers/net/ethernet/broadcom/genet/bcmmii.c @@ -301,6 +301,7 @@ int bcmgenet_mii_probe(struct net_device *dev) priv->old_pause = -1; if (dn) { + netdev_warn(dev, "%s: dn is %s, phy_dn is %s", __func__, dn->full_name, priv->phy_dn->full_name); phydev = of_phy_connect(dev, priv->phy_dn, bcmgenet_mii_setup, phy_flags, priv->phy_interface); if (!phydev) { diff --git a/drivers/net/mdio/of_mdio.c b/drivers/net/mdio/of_mdio.c index 094494a68ddf..1697d77bc613 100644 --- a/drivers/net/mdio/of_mdio.c +++ b/drivers/net/mdio/of_mdio.c @@ -353,9 +353,12 @@ struct mdio_device *of_mdio_find_device(struct device_node *np) return NULL; d = bus_find_device_by_of_node(&mdio_bus_type, np); - if (!d) + if (!d) { + pr_err("%s: does not find %s on mdio bus", __func__, np->full_name); return NULL; + } + pr_warn("%s: going to get %s's mdio device", __func__, np->full_name); return to_mdio_device(d); } EXPORT_SYMBOL(of_mdio_find_device); @@ -372,11 +375,15 @@ struct phy_device *of_phy_find_device(struct device_node *phy_np) struct mdio_device *mdiodev; mdiodev = of_mdio_find_device(phy_np); - if (!mdiodev) + if (!mdiodev) { + pr_err("%s: mdio does not find %s", __func__, phy_np->full_name); return NULL; + } - if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) + if (mdiodev->flags & MDIO_DEVICE_FLAG_PHY) { + pr_err("%s: going to get %s's phy_device", __func__, phy_np->full_name); return to_phy_device(&mdiodev->dev); + } put_device(&mdiodev->dev); @@ -404,11 +411,13 @@ struct phy_device *of_phy_connect(struct net_device *dev, struct phy_device *phy = of_phy_find_device(phy_np); int ret; + netdev_warn(dev, "%s: dn full_name %s", __func__, phy_np->full_name); if (!phy) return NULL; phy->dev_flags |= flags; + netdev_warn(dev, "%s: going to connect %s directly", __func__, phy_np->full_name); ret = phy_connect_direct(dev, phy, hndlr, iface); /* refcount is held by phy_connect_direct() on success */