Re: [PATCH] network driver updates

Manfred Spraul (manfred@colorfullife.com)
Wed, 14 Feb 2001 18:56:06 +0100


This is a multi-part message in MIME format.
--------------713F0A6DBC754855474028D0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

David Hinds wrote:
>
> Say the driver is linked into the kernel. Hot plug drivers should not
> all complain about not finding their hardware.
>

That's handled by pci_module_init(), check <linux/pci.h>:
if CONFIG_HOTPLUG is enabled, then pci_module_init() never returns with
-ENODEV.

Which means that eisa cards will never be probed in a hotplug enabled
kernel.

And loading the current 3c59x.c into a non CONFIG_HOTPLUG non EISA
kernel results in a disconnected driver:
it's _not_ registered as a pci driver, pci_module_init() calls
pci_unregister_driver().

What about the attached patch?
--------------713F0A6DBC754855474028D0
Content-Type: text/plain; charset=us-ascii;
name="patch-hinds"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="patch-hinds"

--- 2.4/drivers/net/3c59x.c Wed Feb 14 10:50:50 2001
+++ build-2.4/drivers/net/3c59x.c Wed Feb 14 18:51:55 2001
@@ -2661,13 +2661,16 @@

rc = pci_module_init(&vortex_driver);
if (rc < 0) {
- rc = vortex_eisa_init();
- if (rc > 0)
- vortex_have_eisa = 1;
+ if (rc != -ENODEV)
+ return rc;
} else {
vortex_have_pci = 1;
}

+ if (vortex_eisa_init() > 0) {
+ vortex_have_eisa = 1;
+ rc = 0;
+ }
return rc;
}

--------------713F0A6DBC754855474028D0--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/