All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manfred Spraul <manfred@colorfullife.com>
To: David Hinds <dhinds@sonic.net>
Cc: Andrew Morton <andrewm@uow.edu.au>,
	Jeff Garzik <jgarzik@mandrakesoft.mandrakesoft.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] network driver updates
Date: Wed, 14 Feb 2001 18:56:06 +0100	[thread overview]
Message-ID: <3A8AC6B6.9790FF9C@colorfullife.com> (raw)
In-Reply-To: <Pine.LNX.3.96.1010214020707.28011E-100000@mandrakesoft.mandrakesoft.com> <3A8A7159.AF0E6180@colorfullife.com> <3A8A8937.A77BA18D@uow.edu.au> <20010214093859.B20503@sonic.net>

[-- Attachment #1: Type: text/plain, Size: 593 bytes --]

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?

[-- Attachment #2: patch-hinds --]
[-- Type: text/plain, Size: 432 bytes --]

--- 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;
 }
 

  parent reply	other threads:[~2001-02-14 17:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.LNX.3.96.1010214020707.28011E-100000@mandrakesoft.mandrakesoft.com>
2001-02-14 11:51 ` [PATCH] network driver updates Manfred Spraul
2001-02-14 11:54   ` Jeff Garzik
2001-02-14 13:13     ` Arnaldo Carvalho de Melo
2001-02-14 12:00   ` Jeff Garzik
2001-02-14 13:33   ` Andrew Morton
2001-02-14 17:38     ` David Hinds
2001-02-14 17:54       ` Jeff Garzik
2001-02-14 17:56       ` Manfred Spraul [this message]
2001-02-15 11:49         ` Andrew Morton
2001-02-15 17:08           ` David Hinds
2001-02-15 22:16             ` Andrew Morton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3A8AC6B6.9790FF9C@colorfullife.com \
    --to=manfred@colorfullife.com \
    --cc=andrewm@uow.edu.au \
    --cc=dhinds@sonic.net \
    --cc=jgarzik@mandrakesoft.mandrakesoft.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.