From patchwork Thu May 30 10:28:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 247528 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0D97F2C0097 for ; Thu, 30 May 2013 20:28:56 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968181Ab3E3K2i (ORCPT ); Thu, 30 May 2013 06:28:38 -0400 Received: from mail-we0-f170.google.com ([74.125.82.170]:61358 "EHLO mail-we0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968192Ab3E3K2P (ORCPT ); Thu, 30 May 2013 06:28:15 -0400 Received: by mail-we0-f170.google.com with SMTP id u59so69298wes.15 for ; Thu, 30 May 2013 03:28:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references:in-reply-to:references:content-type:x-gm-message-state; bh=+3TuB0USXPHJX7+J3QvYZgnUirKdTlfFtrh1PC9iMgw=; b=Qsoe9Hi2KAneMBFHtQLYMzgCMhookwCO8OCFjNFcEvqntE8dzFW14m/WYY/3+6iUE1 kBuSdgGzcQi/eyn5f46IieabZBE/x6S1fOap84BMGW6fgViPH+9FMSZIF43T18U8Jxyj W6aXp7wI8xxTD1b16L9Z+Uoi7LCZM+A3WA1ran3Z75Rugaql53Isp/90IiAhw1wCtLN5 VK9B9ImrKy5Fz9kY8jL2o2SLw3PFxv5Aq4pSrBxOf1nQdZZrbSXifeo4MBgbVQXSWigu 0cEiWaIJngdMcxB3nCX6dd493A9aKiK48g2Ti7ODIRKNism0KY2EzcRcKaA8S4fLxRU5 6aSQ== X-Received: by 10.180.185.225 with SMTP id ff1mr3894491wic.36.1369909693487; Thu, 30 May 2013 03:28:13 -0700 (PDT) Received: from localhost (nat-63.starnet.cz. [178.255.168.63]) by mx.google.com with ESMTPSA id fu14sm37040386wic.0.2013.05.30.03.28.12 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Thu, 30 May 2013 03:28:12 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org Cc: Michal Simek , Michal Simek , renner@efe-gmbh.de, Bill Pemberton , Greg Kroah-Hartman , netdev@vger.kernel.org Subject: [PATCH v2 1/6] net: emaclite: Report failures in mdio setup Date: Thu, 30 May 2013 12:28:03 +0200 Message-Id: <286fceaa6f4268594b89707d6e5d9ce5bd309c2d.1369909618.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.8.2.3 In-Reply-To: References: In-Reply-To: References: X-Gm-Message-State: ALoCoQkCsFhC7BdosVtJ9enLxNDHhyhXp1iM36ynuDjn6QUQgRw/vyaDjsyYuzh0Hy+i2d9hN3c/ Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Be more verbose when any problem happens. Signed-off-by: Michal Simek --- Changes in v2: None drivers/net/ethernet/xilinx/xilinx_emaclite.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) -- 1.8.2.3 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;