patch-1.3.18 linux/drivers/net/3c509.c

Next file: linux/drivers/net/8390.c
Previous file: linux/drivers/net/3c507.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.17/linux/drivers/net/3c509.c linux/drivers/net/3c509.c
@@ -171,6 +171,14 @@
 	   ID_PORT.  We find cards past the first by setting the 'current_tag'
 	   on cards as they are found.  Cards with their tag set will not
 	   respond to subsequent ID sequences. */
+
+	if (check_region(ID_PORT,1)) {
+	  static int once = 1;
+	  if (once) printk("3c509: Somebody has reserved 0x%x, can't do ID_PORT lookup, nor card auto-probing\n",ID_PORT);
+	  once = 0;
+	  return -ENODEV;
+	}
+
 	outb(0x00, ID_PORT);
 	outb(0x00, ID_PORT);
 	for(i = 0; i < 255; i++) {
@@ -698,9 +706,17 @@
 static struct device dev_3c509 = {
 	"        " /*"3c509"*/, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, el3_probe };
 
+int io = 0;
+int irq = 0;
+
 int
 init_module(void)
 {
+	dev_3c509.base_addr = io;
+	dev_3c509.irq       = irq;
+	if (!EISA_bus) {
+		printk("3c509: WARNING! Module load-time probing works reliably only for EISA-bus!\n");
+	}
 	if (register_netdev(&dev_3c509) != 0)
 		return -EIO;
 	return 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this