Skip to content
Commit 62f0c338 authored by Mikhail Zolotaryov's avatar Mikhail Zolotaryov Committed by David S. Miller
Browse files

powerpc 4xx EMAC driver: device name reported on timeout is not correct



Hi,

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: default avatarMikhail Zolotaryov <lebon@lebon.org.ua>
Acked-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent ed734a97
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment