From: Andrzej Krzysztofowicz <ankry@green.mif.pg.gda.pl>
To: alan@lxorguk.ukuu.org.uk (Alan Cox),
andrewm@uow.edu.au, p_gortmaker@yahoo.com
Cc: linux-kernel@vger.kernel.org (kernel list)
Subject: [PATCH] net #3
Date: Wed, 30 May 2001 02:41:09 +0200 (CEST) [thread overview]
Message-ID: <200105300041.CAA04507@green.mif.pg.gda.pl> (raw)
The following patch fixes some ISA PnP #ifdefs (enable modular,
disable when non-available) for 3c509 and smc-ultra.
Some other drivers also seem to need fixing (finishing ISA PnP support
inside them).
Andrzej
************************** PATCH 3 *****************************
diff -uNr linux-2.4.5-ac4/drivers/net/3c509.c linux/drivers/net/3c509.c
--- linux-2.4.5-ac4/drivers/net/3c509.c Wed May 30 01:09:53 2001
+++ linux/drivers/net/3c509.c Wed May 30 01:10:45 2001
@@ -175,7 +175,7 @@
};
#endif /* CONFIG_MCA */
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
static struct isapnp_device_id el3_isapnp_adapters[] __initdata = {
{ ISAPNP_ANY_ID, ISAPNP_ANY_ID,
ISAPNP_VENDOR('T', 'C', 'M'), ISAPNP_FUNCTION(0x5090),
@@ -201,8 +201,8 @@
MODULE_DEVICE_TABLE(isapnp, el3_isapnp_adapters);
static u16 el3_isapnp_phys_addr[8][3];
+#endif /* CONFIG_ISAPNP || CONFIG_ISAPNP_MODULE */
static int nopnp;
-#endif /* CONFIG_ISAPNP */
int __init el3_probe(struct net_device *dev)
{
@@ -212,9 +212,10 @@
u16 phys_addr[3];
static int current_tag;
int mca_slot = -1;
-#ifdef CONFIG_ISAPNP
+ static int printed_version;
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
static int pnp_cards;
-#endif /* CONFIG_ISAPNP */
+#endif /* CONFIG_ISAPNP || CONFIG_ISAPNP_MODULE */
if (dev) SET_MODULE_OWNER(dev);
@@ -318,7 +319,7 @@
}
#endif /* CONFIG_MCA */
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
if (nopnp == 1)
goto no_pnp;
@@ -354,7 +355,7 @@
}
}
no_pnp:
-#endif /* CONFIG_ISAPNP */
+#endif /* CONFIG_ISAPNP || CONFIG_ISAPNP_MODULE */
/* Select an open I/O location at 0x1*0 to do contention select. */
for ( ; id_port < 0x200; id_port += 0x10) {
@@ -400,7 +401,7 @@
phys_addr[i] = htons(id_read_eeprom(i));
}
-#ifdef CONFIG_ISAPNP
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
if (nopnp == 0) {
/* The ISA PnP 3c509 cards respond to the ID sequence.
This check is needed in order not to register them twice. */
@@ -420,7 +421,7 @@
}
}
}
-#endif /* CONFIG_ISAPNP */
+#endif /* CONFIG_ISAPNP || CONFIG_ISAPNP_MODULE */
{
unsigned int iobase = id_read_eeprom(8);
diff -uNr linux-2.4.5-ac4/drivers/net/smc-ultra.c linux/drivers/net/smc-ultra.c
--- linux-2.4.5-ac4/drivers/net/smc-ultra.c Wed May 30 01:09:53 2001
+++ linux/drivers/net/smc-ultra.c Wed May 30 01:10:45 2001
@@ -80,7 +80,7 @@
int ultra_probe(struct net_device *dev);
static int ultra_probe1(struct net_device *dev, int ioaddr);
-#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
static int ultra_probe_isapnp(struct net_device *dev);
#endif
@@ -100,7 +100,7 @@
const unsigned char *buf, const int start_page);
static int ultra_close_card(struct net_device *dev);
-#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
static struct isapnp_device_id ultra_device_ids[] __initdata = {
{ ISAPNP_VENDOR('S','M','C'), ISAPNP_FUNCTION(0x8416),
ISAPNP_VENDOR('S','M','C'), ISAPNP_FUNCTION(0x8416),
@@ -140,7 +140,7 @@
else if (base_addr != 0) /* Don't probe at all. */
return -ENXIO;
-#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
/* Look for any installed ISAPnP cards */
if (isapnp_present() && (ultra_probe_isapnp(dev) == 0))
return 0;
@@ -279,7 +279,7 @@
return retval;
}
-#if defined CONFIG_ISAPNP || defined CONFIG_ISAPNP_MODULE
+#if defined(CONFIG_ISAPNP) || (defined(CONFIG_ISAPNP_MODULE) && defined(MODULE))
static int __init ultra_probe_isapnp(struct net_device *dev)
{
int i;
--
=======================================================================
Andrzej M. Krzysztofowicz ankry@mif.pg.gda.pl
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Technical University of Gdansk
next reply other threads:[~2001-05-30 0:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-05-30 0:41 Andrzej Krzysztofowicz [this message]
2001-05-30 5:49 ` [PATCH] net #3 Paul Gortmaker
2001-05-30 10:53 ` Andrzej Krzysztofowicz
2001-05-30 12:03 ` Keith Owens
2001-05-30 9:11 ` David Woodhouse
2001-05-30 10:11 ` Andrzej Krzysztofowicz
2001-05-30 10:39 ` Jeff Garzik
2001-05-30 11:02 ` Andrzej Krzysztofowicz
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=200105300041.CAA04507@green.mif.pg.gda.pl \
--to=ankry@green.mif.pg.gda.pl \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=andrewm@uow.edu.au \
--cc=linux-kernel@vger.kernel.org \
--cc=p_gortmaker@yahoo.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).