summaryrefslogtreecommitdiff
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2004-04-19 04:49:10 -0400
committerStephen Hemminger <shemminger@osdl.org>2004-04-19 04:49:10 -0400
commit66dbee3519317165af92518fa4cc841731b2f238 (patch)
tree7ae693a9c94ba87b5453d5f1719f0a8303091b9f /net/core/dev.c
parentbf31652c0229b2724679e94db2e0d5f8c0a26756 (diff)
[PATCH] Mixed PCI/ISA device name conflicts
In systems with mixed network cards, and all drivers compiled into the kernel; the PCI device (eth0) will get probed first, before the ISA. The problem is that the ISA device can mistakenly try to probe for eth0. The problem is that the ISA driver will not detect the failure until it goes to call register_netdevice, and not all drivers have perfect error unwind code. This patch short circuits the device probe, so it won't bother looking for devices that already are registered.
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index ef7eb00b09d8..43c273e74a7d 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -432,6 +432,14 @@ unsigned long netdev_boot_base(const char *prefix, int unit)
int i;
sprintf(name, "%s%d", prefix, unit);
+
+ /*
+ * If device already registered then return base of 1
+ * to indicate not to probe for this interface
+ */
+ if (__dev_get_by_name(name))
+ return 1;
+
for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++)
if (!strcmp(name, s[i].name))
return s[i].map.base_addr;