瀏覽代碼

Fix loading freeze when netconsole is active

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>
Frederic Leroy 11 年之前
父節點
當前提交
8094972d59
共有 1 個文件被更改,包括 1 次插入0 次删除
  1. 1 0
      common/cmd_bootm.c

+ 1 - 0
common/cmd_bootm.c

@@ -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)