Skip to content

Commit

Permalink
net/fsl: Make xgmac_mdio read error message useful
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Shruti Kanetkar authored and David S. Miller committed Jun 11, 2014
1 parent 6e765a0 commit 55fd364
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/net/ethernet/freescale/xgmac_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 55fd364

Please sign in to comment.