diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-04-05 04:55:58 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-04-05 04:55:58 +0000 |
commit | 74a9f2e1b4d3ab45a9f72cb5b556c9f521524ab3 (patch) | |
tree | 7c4cdb103ab1b388c9852a88bd6fb1e73eba0b5c /drivers/net/ne2k-pci.c | |
parent | ee6374c8b0d333c08061c6a97bc77090d7461225 (diff) |
Merge with Linux 2.4.3.
Note that mingetty does no longer work with serial console, you have to
switch to another getty like getty_ps. This commit also includes a
fix for a setitimer bug which did prevent getty_ps from working on
older kernels.
Diffstat (limited to 'drivers/net/ne2k-pci.c')
-rw-r--r-- | drivers/net/ne2k-pci.c | 28 |
1 files changed, 18 insertions, 10 deletions
diff --git a/drivers/net/ne2k-pci.c b/drivers/net/ne2k-pci.c index 8234f838a..755aa1579 100644 --- a/drivers/net/ne2k-pci.c +++ b/drivers/net/ne2k-pci.c @@ -239,7 +239,7 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, } } - dev = init_etherdev(NULL, 0); + dev = alloc_etherdev(0); if (!dev) { printk (KERN_ERR "ne2k-pci: cannot allocate ethernet device\n"); goto err_out_free_res; @@ -312,17 +312,11 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, /* Allocate dev->priv and fill in 8390 specific dev fields. */ if (ethdev_init(dev)) { - printk (KERN_ERR "%s: unable to get memory for dev->priv.\n", dev->name); + printk (KERN_ERR "ne2kpci(%s): unable to get memory for dev->priv.\n", + pdev->slot_name); goto err_out_free_netdev; } - printk("%s: %s found at %#lx, IRQ %d, ", - dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq); - for(i = 0; i < 6; i++) { - printk("%2.2X%s", SA_prom[i], i == 5 ? ".\n": ":"); - dev->dev_addr[i] = SA_prom[i]; - } - ei_status.name = pci_clone_list[chip_idx].name; ei_status.tx_start_page = start_page; ei_status.stop_page = stop_page; @@ -346,13 +340,27 @@ static int __devinit ne2k_pci_init_one (struct pci_dev *pdev, dev->open = &ne2k_pci_open; dev->stop = &ne2k_pci_close; NS8390_init(dev, 0); + + i = register_netdev(dev); + if (i) + goto err_out_free_8390; + + printk("%s: %s found at %#lx, IRQ %d, ", + dev->name, pci_clone_list[chip_idx].name, ioaddr, dev->irq); + for(i = 0; i < 6; i++) { + printk("%2.2X%s", SA_prom[i], i == 5 ? ".\n": ":"); + dev->dev_addr[i] = SA_prom[i]; + } + return 0; +err_out_free_8390: + kfree(dev->priv); err_out_free_netdev: - unregister_netdev (dev); kfree (dev); err_out_free_res: release_region (ioaddr, NE_IO_EXTENT); + pci_set_drvdata (pdev, NULL); return -ENODEV; } |