All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Cédric Le Goater" <clg@kaod.org>
To: openbmc@lists.ozlabs.org
Subject: [PATCH uboot v2016.05-aspeed-openbmc 2/9] net: aspeednic: Do not start hardware in initialize
Date: Wed, 29 Jun 2016 18:09:44 +0200	[thread overview]
Message-ID: <1467216591-8616-3-git-send-email-clg@kaod.org> (raw)
In-Reply-To: <1467216591-8616-1-git-send-email-clg@kaod.org>

From: "Milton D. Miller II" <miltonm@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@us.ibm.com>
Signed-off-by: Joel Stanley <joel@jms.id.au>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
---
 drivers/net/aspeednic.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/net/aspeednic.c b/drivers/net/aspeednic.c
index 7ce7056d88a2..71e5548fbc05 100644
--- a/drivers/net/aspeednic.c
+++ b/drivers/net/aspeednic.c
@@ -557,8 +557,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.1.4

  parent reply	other threads:[~2016-06-29 16:10 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-29 16:09 [PATCH uboot v2016.05-aspeed-openbmc 0/9] aspeed: fixes and cleanups Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 1/9] net: aspeednic: Create aspeed_write_hwaddr from set_mac_address Cédric Le Goater
2016-06-29 16:09 ` Cédric Le Goater [this message]
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 3/9] net: aspeednic: Do not fill in a random MAC address Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 4/9] net/aspeednic: start mac after ring buffers are initialized Cédric Le Goater
2016-06-30  7:13   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 5/9] aspeed/ast-g4: select the correct cpu Cédric Le Goater
2016-06-30  7:14   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 6/9] aspeed/ast-g4: use literal defines in misc_init_r() Cédric Le Goater
2016-06-30  7:16   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 7/9] aspeed: add a common Kconfig file for Aspeed boards Cédric Le Goater
2016-06-30  7:17   ` Joel Stanley
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 8/9] aspeed/ast-g4: add a force saveenv config Cédric Le Goater
2016-06-30  7:11   ` Joel Stanley
2016-06-30 16:32     ` Cédric Le Goater
2016-06-29 16:09 ` [PATCH uboot v2016.05-aspeed-openbmc 9/9] ast-g4/g5: large cleanup Cédric Le Goater
2016-06-30  6:29   ` Joel Stanley
2016-06-30  7:46     ` Cédric Le Goater
2016-06-30  8:34       ` Cédric Le Goater
2016-06-30 16:38         ` Cédric Le Goater
2016-07-01  7:06           ` Joel Stanley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467216591-8616-3-git-send-email-clg@kaod.org \
    --to=clg@kaod.org \
    --cc=openbmc@lists.ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.