From: Mikhail Zolotaryov <lebon@lebon.org.ua>
To: linux-kernel@vger.kernel.org
Cc: linuxppc-dev@ozlabs.org, Josh Boyer <jwboyer@linux.vnet.ibm.com>
Subject: [PATCH] powerpc 4xx EMAC driver: device name reported on timeout is not correct
Date: Tue, 10 Mar 2009 20:32:32 +0200 [thread overview]
Message-ID: <49B6B240.8030701@lebon.org.ua> (raw)
[-- Attachment #1: Type: text/plain, Size: 807 bytes --]
Hi,
not critical problem here.
IBM EMAC driver performs device reset (drivers/net/ibm_newemac/core.c:
emac_probe() -> emac_init_phy() -> emac_reset()) before registering
appropriate net_device (emac_probe() -> register_netdev()), so
net_device name contains raw format string during EMAC reset ("eth%d").
If the case of reset timeout, emac_report_timeout_error() function is
called to report an error. The problem is this function uses net_device
name to report device related, which is not correct, as a result in the
kernel log buffer we see:
eth%d: reset timeout
The solution is to print device_node full_name instead. After applying
the patch proposed, error string is like the following:
/plb/opb/ethernet@ef600e00: reset timeout
Signed-off-by: Mikhail Zolotaryov <lebon@lebon.org.ua>
[-- Attachment #2: emac_report_timeout_error.patch --]
[-- Type: text/plain, Size: 441 bytes --]
--- linux-2.6/drivers/net/ibm_newemac/core.c.orig 2009-03-10 20:24:12.000000000 +0200
+++ linux-2.6/drivers/net/ibm_newemac/core.c 2009-03-10 20:29:12.000000000 +0200
@@ -134,7 +134,7 @@
EMAC_FTR_440EP_PHY_CLK_FIX))
DBG(dev, "%s" NL, error);
else if (net_ratelimit())
- printk(KERN_ERR "%s: %s\n", dev->ndev->name, error);
+ printk(KERN_ERR "%s: %s\n", dev->ofdev->node->full_name, error);
}
/* EMAC PHY clock workaround:
next reply other threads:[~2009-03-10 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 18:32 Mikhail Zolotaryov [this message]
2009-03-20 5:38 ` [PATCH] powerpc 4xx EMAC driver: device name reported on timeout is not correct Benjamin Herrenschmidt
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=49B6B240.8030701@lebon.org.ua \
--to=lebon@lebon.org.ua \
--cc=jwboyer@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/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