linux-sg2042/drivers/net/ibm_newemac
Mikhail Zolotaryov 62f0c338d1 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: Mikhail Zolotaryov <lebon@lebon.org.ua>
Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-03-21 16:50:20 -07:00
..
Kconfig Merge commit 'origin' 2008-10-15 11:31:54 +11:00
Makefile
core.c powerpc 4xx EMAC driver: device name reported on timeout is not correct 2009-03-21 16:50:20 -07:00
core.h ibm_newemac: Fix EMAC soft reset on 460EX/GT 2008-10-08 15:27:14 -07:00
debug.c ibm_newemac: Parameterize EMAC Multicast Match Handling 2008-07-09 16:30:46 +10:00
debug.h ibm_newemac: Update file headers copyright notices 2007-12-07 15:09:06 -05:00
emac.h ibm_newemac: Parameterize EMAC Multicast Match Handling 2008-07-09 16:30:46 +10:00
mal.c net: Add init_dummy_netdev() and fix EMAC driver using it 2009-01-14 21:05:05 -08:00
mal.h net: Add init_dummy_netdev() and fix EMAC driver using it 2009-01-14 21:05:05 -08:00
phy.c net: variables reach -1, but 0 tested 2009-02-02 21:39:02 -08:00
phy.h ibm_newemac: Add support for GPCS, SGMII and M88E1112 PHY 2008-10-02 13:06:42 -04:00
rgmii.c ibm_newemac: Add MII mode support to the EMAC RGMII bridge. 2008-07-15 12:39:05 +10:00
rgmii.h ibm_newemac: Update file headers copyright notices 2007-12-07 15:09:06 -05:00
tah.c ibm_newemac: Fix section mismatch warnings 2008-04-25 02:08:06 -04:00
tah.h ibm_newemac: Update file headers copyright notices 2007-12-07 15:09:06 -05:00
zmii.c ibm_newemac: Fix section mismatch warnings 2008-04-25 02:08:06 -04:00
zmii.h ibm_newemac: Update file headers copyright notices 2007-12-07 15:09:06 -05:00