netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michal Simek <michal.simek@xilinx.com>
To: linux-kernel@vger.kernel.org
Cc: Michal Simek <monstr@monstr.eu>,
	Michal Simek <michal.simek@xilinx.com>,
	Bill Pemberton <wfp5p@virginia.edu>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	netdev@vger.kernel.org
Subject: [PATCH 06/11] net: emaclite: Report failures in mdio setup
Date: Wed, 29 May 2013 17:33:06 +0200	[thread overview]
Message-ID: <eaeecf9ad936704028401e97b315d2bfc18ad175.1369841519.git.michal.simek@xilinx.com> (raw)
In-Reply-To: <131c9262c3094ee3c664bd729a66e0709ceae82c.1369841519.git.michal.simek@xilinx.com>
In-Reply-To: <131c9262c3094ee3c664bd729a66e0709ceae82c.1369841519.git.michal.simek@xilinx.com>

[-- Attachment #1: Type: text/plain, Size: 1445 bytes --]

Be more verbose when any problem happens.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---
 drivers/net/ethernet/xilinx/xilinx_emaclite.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
index 919b983..a16dc35 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;

--
1.8.2.3


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

  parent reply	other threads:[~2013-05-29 15:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-29 15:33 [PATCH 01/11] phy: Clean coding style in vitesse phy Michal Simek
2013-05-29 15:33 ` [PATCH 02/11] phy: Add Vitesse 8211 phy ID Michal Simek
2013-05-29 15:33 ` [PATCH 03/11] phy: Use macros instead of hardcoded values in marvell phy driver Michal Simek
2013-05-29 15:33 ` [PATCH 04/11] phy: Add Marvell 88E1116R phy ID Michal Simek
2013-05-29 15:33 ` [PATCH 05/11] phy: Add Marvell 88E1510 " Michal Simek
2013-05-29 15:33 ` Michal Simek [this message]
2013-05-29 15:33 ` [PATCH 07/11] net: emaclite: Support multiple phys connected to one MDIO bus Michal Simek
2013-05-29 15:33 ` [PATCH 08/11] net: emaclite: Let's make xemaclite_adjust_link static Michal Simek
2013-05-29 15:33 ` [PATCH 09/11] net: emaclite: Do not use microblaze and ppc IO functions Michal Simek
2013-05-29 16:04   ` Michal Simek
2013-05-29 15:33 ` [PATCH 10/11] net: emaclite: Enable emaclite for Xilinx Arm Zynq platform Michal Simek
2013-05-29 15:33 ` [PATCH 11/11] net: emaclite: Update driver header Michal Simek
2013-05-29 17:11   ` Sergei Shtylyov
2013-05-30  5:14     ` Michal Simek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eaeecf9ad936704028401e97b315d2bfc18ad175.1369841519.git.michal.simek@xilinx.com \
    --to=michal.simek@xilinx.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=netdev@vger.kernel.org \
    --cc=wfp5p@virginia.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).