Commit 379b026e authored by Lubomir Rintel's avatar Lubomir Rintel Committed by David S. Miller

ne2k-pci: Do not register device until initialized.

Doing it in reverse order causes uevent to be sent before
we have a MAC address, which confuses udev.
Signed-off-by: default avatarLubomir Rintel <>
Acked-by: default avatarJeff Garzik <>
Signed-off-by: default avatarDavid S. Miller <>
parent 902e5ea1
......@@ -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,
memcpy(dev->perm_addr, dev->dev_addr, dev->addr_len);
return 0;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment