mirror of
https://xff.cz/git/u-boot/
synced 2025-09-02 09:12:08 +02:00
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>
This commit is contained in:
committed by
Joe Hershberger
parent
c163e43679
commit
4917c061a2
@@ -474,7 +474,9 @@ ulong bootm_disable_interrupts(void)
|
|||||||
#ifdef CONFIG_NETCONSOLE
|
#ifdef CONFIG_NETCONSOLE
|
||||||
/* Stop the ethernet stack if NetConsole could have left it up */
|
/* Stop the ethernet stack if NetConsole could have left it up */
|
||||||
eth_halt();
|
eth_halt();
|
||||||
|
# ifndef CONFIG_DM_ETH
|
||||||
eth_unregister(eth_get_dev());
|
eth_unregister(eth_get_dev());
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(CONFIG_CMD_USB)
|
#if defined(CONFIG_CMD_USB)
|
||||||
|
Reference in New Issue
Block a user