Commit 66dbee35 authored by Stephen Hemminger's avatar Stephen Hemminger

[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.
parent bf31652c
...@@ -432,6 +432,14 @@ unsigned long netdev_boot_base(const char *prefix, int unit) ...@@ -432,6 +432,14 @@ unsigned long netdev_boot_base(const char *prefix, int unit)
int i; int i;
sprintf(name, "%s%d", prefix, unit); 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++) for (i = 0; i < NETDEV_BOOT_SETUP_MAX; i++)
if (!strcmp(name, s[i].name)) if (!strcmp(name, s[i].name))
return s[i].map.base_addr; return s[i].map.base_addr;
......
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