ar71xx: ag71xx: Add connect message: fixed phy
authorDaniel F. Dickinson <cshored@thecshore.com>
Wed, 25 Jul 2018 23:15:32 +0000 (19:15 -0400)
committerJohn Crispin <john@phrozen.org>
Mon, 30 Jul 2018 08:43:35 +0000 (10:43 +0200)
It's a little noisier but makes it obvious when the ar7240 switch was
connected to the MDIO bus, and to which phy device (or the failure
to do so).

Signed-off-by: Daniel F. Dickinson <cshored@thecshore.com>
target/linux/ar71xx/files/drivers/net/ethernet/atheros/ag71xx/ag71xx_phy.c

index 223340341ffa386982e5519364d9cc7b31cb0927..1683fce882f6d9a172f0efe0e87a9f886e7a024f 100644 (file)
@@ -97,6 +97,13 @@ static int ag71xx_phy_connect_fixed(struct ag71xx *ag)
        ag->duplex = pdata->duplex;
        ag->speed = pdata->speed;
 
+       if (!ret) {
+               dev_info(dev, "connected to fixed PHY at %s [uid=%08x, driver=%s]\n",
+                           phydev_name(ag->phy_dev),
+                           ag->phy_dev->phy_id, ag->phy_dev->drv->name);
+       } else {
+               pr_err("Failed to connect to fixed PHY\n");
+       }
        return ret;
 }