summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Nortmann <bernhard.nortmann@web.de>2015-09-14 15:29:45 +0200
committerJoe Hershberger <joe.hershberger@ni.com>2015-09-29 21:54:45 -0500
commit4917c061a206b1c220307599bbda84b9bc4d44f2 (patch)
tree0abd8757bb5a848a292df635fff6bfe7dc518431
parentc163e4367908ea625ca962ca6312fc88790b5242 (diff)
downloadtalos-obmc-uboot-4917c061a206b1c220307599bbda84b9bc4d44f2.tar.gz
talos-obmc-uboot-4917c061a206b1c220307599bbda84b9bc4d44f2.zip
net: avoid eth_unregister() call when function is unavailable
CONFIG_NETCONSOLE causes common/bootm.c to call eth_unregister() for network device shutdown. However, with CONFIG_DM_ETH this function is no longer defined. This is a workaround to avoid the call in that case, and solely rely on eth_halt(). In case this is insufficient, a proper way to unregister / remove network devices needs to be implemented. Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
-rw-r--r--common/bootm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/common/bootm.c b/common/bootm.c
index 667c93471b..c0d0d09411 100644
--- a/common/bootm.c
+++ b/common/bootm.c
@@ -474,7 +474,9 @@ ulong bootm_disable_interrupts(void)
#ifdef CONFIG_NETCONSOLE
/* Stop the ethernet stack if NetConsole could have left it up */
eth_halt();
+# ifndef CONFIG_DM_ETH
eth_unregister(eth_get_dev());
+# endif
#endif
#if defined(CONFIG_CMD_USB)
OpenPOWER on IntegriCloud