lkml.org 
[lkml]   [2003]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[patch 2.6] 3c509.c Fix printed dev id. with patch;(
	This time with the patch attached...

Paul
set@pobox.com
--- drivers/net/3c509.c.orig 2003-08-24 18:16:28.000000000 -0400
+++ drivers/net/3c509.c 2003-08-24 22:33:32.000000000 -0400
@@ -300,10 +300,11 @@
*
* 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;
short i;
+ int err;

spin_lock_init(&lp->lock);

@@ -314,10 +315,29 @@
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"};
- printk("%s: 3c5x9 at %#3.3lx, %s port, address ",
- dev->name, dev->base_addr, if_names[(dev->if_port & 0x03)]);
+ printk("%s: 3c5x9 found at %#3.3lx, %s port, address ",
+ dev->name, dev->base_addr,
+ if_names[(dev->if_port & 0x03)]);
}

/* Read in the station address. */
@@ -327,16 +347,8 @@

if (el3_debug > 0)
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)
@@ -564,9 +576,8 @@
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
lp->dev = &idev->dev;
#endif
- el3_common_init(dev);
+ err = el3_common_init(dev);

- err = register_netdev(dev);
if (err)
goto out1;

@@ -588,7 +599,6 @@
return 0;

out1:
- release_region(ioaddr, EL3_IO_EXTENT);
#if defined(__ISAPNP__) && !defined(CONFIG_X86_PC9800)
if (idev)
pnp_device_detach(idev);
@@ -662,11 +672,9 @@
lp->dev = device;
lp->type = EL3_MCA;
device->driver_data = dev;
- el3_common_init(dev);
+ err = el3_common_init(dev);

- err = register_netdev(dev);
if (err) {
- release_region(ioaddr, EL3_IO_EXTENT);
return -ENOMEM;
}

@@ -723,11 +731,9 @@
lp->dev = device;
lp->type = EL3_EISA;
eisa_set_drvdata (edev, dev);
- el3_common_init(dev);
+ err = el3_common_init(dev);

- err = register_netdev(dev);
if (err) {
- release_region(ioaddr, EL3_IO_EXTENT);
return err;
}
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.031 / U:0.912 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site