blob: bb53c40591b51ee47a0631487bb2b9ebf2717ccf [file] [log] [blame]
Milton D. Miller II8e5dd422016-03-21 12:39:24 -05001commit a7517cfcebd9ea45d65b3fbc6438602dd28cae86
2Author: Norman James <njames@us.ibm.com>
3Commit: Norman James <njames@us.ibm.com>
4
5 MAC needs to be stopped after starting
6
7 We found that u-boot network was corrupting kernel memory.
8 This is because aspeednic_init is called at startup,
9 but if the u-boot network is not used, the network driver
10 is not cleaned up. This fix is a temporary hack and just calls
11 the halt function after the init. This driver needs to be
12 reworked to not start network initially and use set_hwaddr hook
13 to setup MAC address.
14
15 Signed-off-by: Norman James <nkskjames@gmail.com>
16
17diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
18index d70c7ab..a870c4a 100644
19--- a/drivers/net/aspeednic.c
20+++ b/drivers/net/aspeednic.c
21@@ -580,6 +580,7 @@ int aspeednic_initialize(bd_t *bis)
22 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
23 miiphy_register(dev->name, faraday_mdio_read, faraday_mdio_write);
24 #endif
25+ dev->halt(dev);
26
27 return 1;
28 }
29@@ -1359,6 +1360,7 @@ static int aspeednic_recv(struct eth_device* dev)
30
31 static void aspeednic_halt(struct eth_device* dev)
32 {
33+ printf("Stopping Network\n");
34 STOP_MAC(dev);
35 }
36