netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Do not register ne2k-pci device until initialized
@ 2009-05-02 16:28 Lubomir Rintel
  2009-05-02 17:05 ` Jeff Garzik
  0 siblings, 1 reply; 6+ messages in thread
From: Lubomir Rintel @ 2009-05-02 16:28 UTC (permalink / raw)
  To: netdev, Andrew Morton, Linux Kernel Mailing List, stable

Doing it in reverse order causes uevent to be sent before
we have a MAC address, which confuses udev.

Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
---
 drivers/net/ne2k-pci.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c
index eb66f65..7d83896 100644
--- a/drivers/net/ne2k-pci.c
+++ b/drivers/net/ne2k-pci.c
@@ -374,18 +374,17 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev,
 	dev->ethtool_ops = &ne2k_pci_ethtool_ops;
 	NS8390_init(dev, 0);
 
+	memcpy(dev->dev_addr, SA_prom, 6);
+	memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
+
 	i = register_netdev(dev);
 	if (i)
 		goto err_out_free_netdev;
 
-	for(i = 0; i < 6; i++)
-		dev->dev_addr[i] = SA_prom[i];
 	printk("%s: %s found at %#lx, IRQ %d, %pM.\n",
 	       dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq,
 	       dev->dev_addr);
 
-	memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
-
 	return 0;
 
 err_out_free_netdev:

-- 
"Excuse all the blood" -- Dead


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-05-03 16:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-02 16:28 [PATCH] Do not register ne2k-pci device until initialized Lubomir Rintel
2009-05-02 17:05 ` Jeff Garzik
2009-05-02 17:58   ` Andreas Mohr
2009-05-02 20:52     ` David Miller
2009-05-03 16:34     ` Krzysztof Halasa
2009-05-02 20:52   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).