diff options
author | Michal Simek <michal.simek@xilinx.com> | 2013-05-30 00:28:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-05-30 17:08:43 -0700 |
commit | ccfecdfe16a872ed3e8322ea48e34502568eb849 (patch) | |
tree | bc71ffd067ad05024bedaf4518abc40e78ae9c08 /drivers/net/ethernet/xilinx/xilinx_emaclite.c | |
parent | cafe89024bd0b1bd088f4c539bcc980cb37c7ce5 (diff) | |
download | linux-stable-ccfecdfe16a872ed3e8322ea48e34502568eb849.tar.gz linux-stable-ccfecdfe16a872ed3e8322ea48e34502568eb849.tar.bz2 linux-stable-ccfecdfe16a872ed3e8322ea48e34502568eb849.zip |
net: emaclite: Report failures in mdio setup
Be more verbose when any problem happens.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xilinx/xilinx_emaclite.c')
-rw-r--r-- | drivers/net/ethernet/xilinx/xilinx_emaclite.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c index 919b983114e9..a16dc3508998 100644 --- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c +++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c @@ -852,8 +852,10 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) /* Don't register the MDIO bus if the phy_node or its parent node * can't be found. */ - if (!np) + if (!np) { + dev_err(dev, "Failed to register mdio bus.\n"); return -ENODEV; + } /* Enable the MDIO bus by asserting the enable bit in MDIO Control * register. @@ -862,8 +864,10 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) XEL_MDIOCTRL_MDIOEN_MASK); bus = mdiobus_alloc(); - if (!bus) + if (!bus) { + dev_err(dev, "Failed to allocal mdiobus\n"); return -ENOMEM; + } of_address_to_resource(np, 0, &res); snprintf(bus->id, MII_BUS_ID_SIZE, "%.8llx", @@ -879,8 +883,10 @@ static int xemaclite_mdio_setup(struct net_local *lp, struct device *dev) lp->mii_bus = bus; rc = of_mdiobus_register(bus, np); - if (rc) + if (rc) { + dev_err(dev, "Failed to register mdio bus.\n"); goto err_register; + } return 0; |