netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH] Mixed PCI/ISA device name conflicts
Date: Mon, 22 Dec 2003 09:11:15 -0800	[thread overview]
Message-ID: <20031222091115.42dd5f1f.shemminger@osdl.org> (raw)

PCI is getting initialized before the old ISA probing code, so on mixed
ISA/PCI systems a PCI card will get eth0 before the ISA probing starts.
Then when the first ISA card is probed it will (unsuccessfully) try and claim
eth0.

This fixes it by just having the ISA code skip eth0.  It relies on the convention
that if the ioaddr is one, the device should be skipped.

Patch against net-drivers-2.5-exp

diff -Nru a/net/core/dev.c b/net/core/dev.c
--- a/net/core/dev.c	Fri Dec 19 14:47:46 2003
+++ b/net/core/dev.c	Fri Dec 19 14:47:46 2003
@@ -382,6 +382,7 @@
  *	The found settings are set for the device to be used
  *	later in the device probing.
  *	Returns 0 if no settings found.
+ *	        1 if device already exists
  */
 unsigned long netdev_boot_base(const char *prefix, int unit)
 {
@@ -390,6 +391,9 @@
 	int i;
 
 	sprintf(name, "%s%d", prefix, unit);
+	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;

             reply	other threads:[~2003-12-22 17:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-22 17:11 Stephen Hemminger [this message]
2004-03-23  1:56 ` [PATCH] Mixed PCI/ISA device name conflicts Jeff Garzik
     [not found]   ` <20040329153236.0cf427c9@dell_ss3.pdx.osdl.net>
     [not found]     ` <407C33A4.3010804@pobox.com>
2004-04-16 16:46       ` Stephen Hemminger
2004-04-19 16:49         ` Jeff Garzik

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=20031222091115.42dd5f1f.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=netdev@oss.sgi.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).