[PATCH u-boot 2/5] net: aspeednic: Do not start hardware in initialize

OpenBMC Patches openbmc-patches at stwcx.xyz
Sat Mar 12 05:40:41 AEDT 2016


From: "Milton D. Miller II" <miltonm at us.ibm.com>

Delete the call to aspeenic_init from the aspeenic_initialize
function.  Instead rely on the framework to call the write_hwaddr
method to set the MAC address for the operating system to use.

The aspeednic driver was calling init before registering the
hardware, causing the dma engine to be left running writing
incoming ethernet packets to memory when handing control to the
operating system.

The initialize function is specifically documented to not touch
the hardware or probe in doc/README.drivers.net.

Also, the init method can take a significant amount of time
especially when NC-SI and retries are involved.  In addition
extra work is being performed to find the MAC address which the
framework will do again later.

Signed-off-by: Milton Miller <miltonm at us.ibm.com>
---
 drivers/net/aspeednic.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
index b8ce24c..90c0f0d 100644
--- a/drivers/net/aspeednic.c
+++ b/drivers/net/aspeednic.c
@@ -574,8 +574,6 @@ int aspeednic_initialize(bd_t *bis)
     udelay(10 * 1000);
   }
 
-  dev->init(dev, bis);
-
   eth_register(dev);
 
 #if defined(CONFIG_MII) || defined(CONFIG_CMD_MII)
-- 
2.7.1




More information about the openbmc mailing list