]> git.kernelconcepts.de Git - karo-tx-uboot.git/commitdiff
Fix loading freeze when netconsole is active
authorFrederic Leroy <fredo@starox.org>
Tue, 10 Sep 2013 10:02:31 +0000 (12:02 +0200)
committerTom Rini <trini@ti.com>
Fri, 20 Sep 2013 14:30:53 +0000 (10:30 -0400)
Netconsole calls eth_halt() before giving control to another operating
system.
But the state machine of netconsole don't take it into account.
Thus, netconsole calls network functions of an halted network device,
making the whole system freeze.
Rather than modifying the state machine of netconsole, we just unregister
the current network device before booting. It does work because
nc_send_packet() verifies that the current network device is not null.

Signed-off-by: Frédéric Leroy <fredo@starox.org>
common/cmd_bootm.c

index 16d08f35248f9d691a0a1cf8c6733a111218dacf..349f1658bd6c4d7d856599ed36809a59c2b336a6 100644 (file)
@@ -558,6 +558,7 @@ static ulong bootm_disable_interrupts(void)
 #ifdef CONFIG_NETCONSOLE
        /* Stop the ethernet stack if NetConsole could have left it up */
        eth_halt();
+       eth_unregister(eth_get_dev());
 #endif
 
 #if defined(CONFIG_CMD_USB)