[PATCH u-boot 2/5] net: aspeednic: Do not start hardware in initialize
Cyril Bur
cyrilbur at gmail.com
Tue Mar 15 11:14:14 AEDT 2016
On Fri, 11 Mar 2016 12:40:41 -0600
OpenBMC Patches <openbmc-patches at stwcx.xyz> wrote:
> 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>
Reviewed-by: Cyril Bur <cyrilbur at gmail.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)
More information about the openbmc
mailing list