net/fsl: Make xgmac_mdio read error message useful
authorShruti Kanetkar <Shruti@Freescale.com>
Wed, 11 Jun 2014 18:41:40 +0000 (13:41 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 11 Jun 2014 22:50:59 +0000 (15:50 -0700)
Print the device address, the register number and the PHY ID for
which the MDIO read operation failed

Signed-off-by: Shruti Kanetkar <Shruti@Freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/xgmac_mdio.c

index d449fcb901999cce522a0301a26692ff6df34b0f..0c9d55c862aeb40bb8251bc10825549ac01aa6b3 100644 (file)
@@ -162,7 +162,9 @@ static int xgmac_mdio_read(struct mii_bus *bus, int phy_id, int regnum)
 
        /* Return all Fs if nothing was there */
        if (in_be32(&regs->mdio_stat) & MDIO_STAT_RD_ER) {
-               dev_err(&bus->dev, "MDIO read error\n");
+               dev_err(&bus->dev,
+                       "Error while reading PHY%d reg at %d.%d\n",
+                       phy_id, dev_addr, regnum);
                return 0xffff;
        }