Commit f081f8b4 authored by Paul Thompson's avatar Paul Thompson Committed by Stephen Hemminger

[NET]: Fix probing messages in 3c509.c

Currently, 3c509.c prints this on detection:
eth%d: 3c5x9 at 0x280, BNC port, address  00 20 af 2f d4 81, IRQ 5.
   ^^
parent 1781cfa9
...@@ -300,10 +300,11 @@ static int nopnp; ...@@ -300,10 +300,11 @@ static int nopnp;
* *
* Both call el3_common_init/el3_common_remove. */ * Both call el3_common_init/el3_common_remove. */
static void __init el3_common_init(struct net_device *dev) static int __init el3_common_init(struct net_device *dev)
{ {
struct el3_private *lp = dev->priv; struct el3_private *lp = dev->priv;
short i; short i;
int err;
spin_lock_init(&lp->lock); spin_lock_init(&lp->lock);
...@@ -314,10 +315,29 @@ static void __init el3_common_init(struct net_device *dev) ...@@ -314,10 +315,29 @@ static void __init el3_common_init(struct net_device *dev)
dev->if_port |= (dev->mem_start & 0x08); dev->if_port |= (dev->mem_start & 0x08);
} }
/* The EL3-specific entries in the device structure. */
dev->open = &el3_open;
dev->hard_start_xmit = &el3_start_xmit;
dev->stop = &el3_close;
dev->get_stats = &el3_get_stats;
dev->set_multicast_list = &set_multicast_list;
dev->tx_timeout = el3_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
dev->do_ioctl = netdev_ioctl;
err = register_netdev(dev);
if (err) {
printk(KERN_ERR "Failed to register 3c5x9 at %#3.3lx, IRQ %d.\n",
dev->base_addr, dev->irq);
release_region(dev->base_addr, EL3_IO_EXTENT);
return err;
}
{ {
const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"}; const char *if_names[] = {"10baseT", "AUI", "undefined", "BNC"};
printk("%s: 3c5x9 at %#3.3lx, %s port, address ", printk("%s: 3c5x9 found at %#3.3lx, %s port, address ",
dev->name, dev->base_addr, if_names[(dev->if_port & 0x03)]); dev->name, dev->base_addr,
if_names[(dev->if_port & 0x03)]);
} }
/* Read in the station address. */ /* Read in the station address. */
...@@ -327,16 +347,8 @@ static void __init el3_common_init(struct net_device *dev) ...@@ -327,16 +347,8 @@ static void __init el3_common_init(struct net_device *dev)
if (el3_debug > 0) if (el3_debug > 0)
printk(KERN_INFO "%s" KERN_INFO "%s", versionA, versionB); printk(KERN_INFO "%s" KERN_INFO "%s", versionA, versionB);
return 0;
/* The EL3-specific entries in the device structure. */
dev->open = &el3_open;
dev->hard_start_xmit = &el3_start_xmit;
dev->stop = &el3_close;
dev->get_stats = &el3_get_stats;
dev->set_multicast_list = &set_multicast_list;
dev->tx_timeout = el3_tx_timeout;
dev->watchdog_timeo = TX_TIMEOUT;
dev->do_ioctl = netdev_ioctl;
} }
static void el3_common_remove (struct net_device *dev) static void el3_common_remove (struct net_device *dev)
...@@ -564,9 +576,8 @@ static int __init el3_probe(int card_idx) ...@@ -564,9 +576,8 @@ static int __init el3_probe(int card_idx)
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800) #if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
lp->dev = &idev->dev; lp->dev = &idev->dev;
#endif #endif
el3_common_init(dev); err = el3_common_init(dev);
err = register_netdev(dev);
if (err) if (err)
goto out1; goto out1;
...@@ -588,7 +599,6 @@ static int __init el3_probe(int card_idx) ...@@ -588,7 +599,6 @@ static int __init el3_probe(int card_idx)
return 0; return 0;
out1: out1:
release_region(ioaddr, EL3_IO_EXTENT);
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800) #if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
if (idev) if (idev)
pnp_device_detach(idev); pnp_device_detach(idev);
...@@ -662,11 +672,9 @@ static int __init el3_mca_probe(struct device *device) { ...@@ -662,11 +672,9 @@ static int __init el3_mca_probe(struct device *device) {
lp->dev = device; lp->dev = device;
lp->type = EL3_MCA; lp->type = EL3_MCA;
device->driver_data = dev; device->driver_data = dev;
el3_common_init(dev); err = el3_common_init(dev);
err = register_netdev(dev);
if (err) { if (err) {
release_region(ioaddr, EL3_IO_EXTENT);
return -ENOMEM; return -ENOMEM;
} }
...@@ -723,11 +731,9 @@ static int __init el3_eisa_probe (struct device *device) ...@@ -723,11 +731,9 @@ static int __init el3_eisa_probe (struct device *device)
lp->dev = device; lp->dev = device;
lp->type = EL3_EISA; lp->type = EL3_EISA;
eisa_set_drvdata (edev, dev); eisa_set_drvdata (edev, dev);
el3_common_init(dev); err = el3_common_init(dev);
err = register_netdev(dev);
if (err) { if (err) {
release_region(ioaddr, EL3_IO_EXTENT);
return err; return err;
} }
......
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