* [2.6 patch] more MCA_LEGACY dependencies
@ 2004-07-02 0:25 Adrian Bunk
2004-07-02 13:07 ` Luiz Fernando N. Capitulino
0 siblings, 1 reply; 3+ messages in thread
From: Adrian Bunk @ 2004-07-02 0:25 UTC (permalink / raw)
To: mcalinux, tao
Cc: linux-kernel, jgarzik, linux-net, James.Bottomley, linux-scsi
The patch below against 2.6.7-mm5 fixes more compile errors with
MCA_LEGACY=n .
diffstat output:
drivers/net/Kconfig | 2 +-
drivers/net/at1700.c | 12 ++++++------
drivers/net/eexpress.c | 4 ++--
drivers/net/tokenring/Kconfig | 4 ++--
drivers/net/tokenring/smctr.c | 12 ++++++------
drivers/scsi/Kconfig | 4 ++--
drivers/scsi/aha1542.c | 2 +-
7 files changed, 20 insertions(+), 20 deletions(-)
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
--- linux-2.6.7-mm5-full/drivers/scsi/Kconfig.old 2004-07-02 02:02:01.000000000 +0200
+++ linux-2.6.7-mm5-full/drivers/scsi/Kconfig 2004-07-02 02:02:52.000000000 +0200
@@ -628,7 +628,7 @@
config SCSI_FD_MCS
tristate "Future Domain MCS-600/700 SCSI support"
- depends on MCA && SCSI
+ depends on MCA_LEGACY && SCSI
---help---
This is support for Future Domain MCS 600/700 MCA SCSI adapters.
Some PS/2 computers are equipped with IBM Fast SCSI Adapter/A which
@@ -699,7 +699,7 @@
config SCSI_IBMMCA
tristate "IBMMCA SCSI support"
- depends on MCA && SCSI
+ depends on MCA_LEGACY && SCSI
---help---
This is support for the IBM SCSI adapter found in many of the PS/2
series computers. These machines have an MCA bus, so you need to
--- linux-2.6.7-mm5-full/drivers/net/Kconfig.old 2004-07-02 01:52:46.000000000 +0200
+++ linux-2.6.7-mm5-full/drivers/net/Kconfig 2004-07-02 01:58:55.000000000 +0200
@@ -666,7 +666,7 @@
config ELMC
tristate "3c523 \"EtherLink/MC\" support"
- depends on NET_VENDOR_3COM && MCA
+ depends on NET_VENDOR_3COM && MCA_LEGACY
help
If you have a network (Ethernet) card of this type, say Y and read
the Ethernet-HOWTO, available from
--- linux-2.6.7-mm5-full/drivers/net/tokenring/Kconfig.old 2004-07-02 01:53:39.000000000 +0200
+++ linux-2.6.7-mm5-full/drivers/net/tokenring/Kconfig 2004-07-02 01:56:18.000000000 +0200
@@ -157,7 +157,7 @@
config MADGEMC
tristate "Madge Smart 16/4 Ringnode MicroChannel"
- depends on TR && TMS380TR && MCA
+ depends on TR && TMS380TR && MCA_LEGACY
help
This tms380 module supports the Madge Smart 16/4 MC16 and MC32
MicroChannel adapters.
@@ -167,7 +167,7 @@
config SMCTR
tristate "SMC ISA/MCA adapter support"
- depends on TR && (ISA || MCA)
+ depends on TR && (ISA || MCA_LEGACY)
---help---
This is support for the ISA and MCA SMC Token Ring cards,
specifically SMC TokenCard Elite (8115T) and SMC TokenCard Elite/A
--- linux-2.6.7-mm5-full/drivers/scsi/aha1542.c.old 2004-07-02 02:01:08.000000000 +0200
+++ linux-2.6.7-mm5-full/drivers/scsi/aha1542.c 2004-07-02 02:01:24.000000000 +0200
@@ -1069,7 +1069,7 @@
/*
* Find MicroChannel cards (AHA1640)
*/
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
if(MCA_bus) {
int slot = 0;
int pos = 0;
--- linux-2.6.7-mm5-full/drivers/net/tokenring/smctr.c.old 2004-07-02 01:56:05.000000000 +0200
+++ linux-2.6.7-mm5-full/drivers/net/tokenring/smctr.c 2004-07-02 01:56:49.000000000 +0200
@@ -69,7 +69,7 @@
#define SMCTR_IO_EXTENT 20
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
static unsigned int smctr_posid = 0x6ec6;
#endif
@@ -479,7 +479,7 @@
static int __init smctr_chk_mca(struct net_device *dev)
{
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
struct net_local *tp = netdev_priv(dev);
int current_slot;
__u8 r1, r2, r3, r4, r5;
@@ -626,7 +626,7 @@
return (0);
#else
return (-1);
-#endif /* CONFIG_MCA */
+#endif /* CONFIG_MCA_LEGACY */
}
static int smctr_chg_rx_mask(struct net_device *dev)
@@ -3617,7 +3617,7 @@
goto out1;
return dev;
out1:
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
{ struct net_local *tp = netdev_priv(dev);
if (tp->slot_num)
mca_mark_as_unused(tp->slot_num);
@@ -5685,7 +5685,7 @@
goto out1;
return dev;
out1:
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
{ struct net_local *tp = netdev_priv(dev);
if (tp->slot_num)
mca_mark_as_unused(tp->slot_num);
@@ -5725,7 +5725,7 @@
if (dev) {
unregister_netdev(dev);
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
{ struct net_local *tp = netdev_priv(dev);
if (tp->slot_num)
mca_mark_as_unused(tp->slot_num);
--- linux-2.6.7-mm5-full/drivers/net/at1700.c.old 2004-07-02 01:57:37.000000000 +0200
+++ linux-2.6.7-mm5-full/drivers/net/at1700.c 2004-07-02 01:58:01.000000000 +0200
@@ -89,7 +89,7 @@
/*
* MCA
*/
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
static int at1700_ioaddr_pattern[] __initdata = {
0x00, 0x04, 0x01, 0x05, 0x02, 0x06, 0x03, 0x07
};
@@ -174,7 +174,7 @@
static void net_tx_timeout (struct net_device *dev);
\f
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
struct at1720_mca_adapters_struct {
char* name;
int id;
@@ -202,7 +202,7 @@
static void cleanup_card(struct net_device *dev)
{
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
struct net_local *lp = netdev_priv(dev);
if (lp->mca_slot >= 0)
mca_mark_as_unused(lp->mca_slot);
@@ -288,7 +288,7 @@
read_eeprom(ioaddr, 6), inw(ioaddr + EEPROM_Ctrl));
#endif
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
/* rEnE (rene@bss.lu): got this from 3c509 driver source , adapted for AT1720 */
/* Based on Erik Nygren's (nygren@mit.edu) 3c529 patch, heavily
@@ -359,7 +359,7 @@
goto err_out;
}
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
found:
#endif
@@ -483,7 +483,7 @@
return 0;
err_mca:
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
if (slot >= 0)
mca_mark_as_unused(slot);
#endif
--- linux-2.6.7-mm5-full/drivers/net/eexpress.c.old 2004-07-02 01:59:57.000000000 +0200
+++ linux-2.6.7-mm5-full/drivers/net/eexpress.c 2004-07-02 02:00:22.000000000 +0200
@@ -230,7 +230,7 @@
/* maps irq number to EtherExpress magic value */
static char irqrmap[] = { 0,0,1,2,3,4,0,0,0,1,5,6,0,0,0,0 };
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
/* mapping of the first four bits of the second POS register */
static unsigned short mca_iomap[] = {
0x270, 0x260, 0x250, 0x240, 0x230, 0x220, 0x210, 0x200,
@@ -345,7 +345,7 @@
dev->if_port = 0xff; /* not set */
-#ifdef CONFIG_MCA
+#ifdef CONFIG_MCA_LEGACY
if (MCA_bus) {
int slot = 0;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] more MCA_LEGACY dependencies
2004-07-02 0:25 [2.6 patch] more MCA_LEGACY dependencies Adrian Bunk
@ 2004-07-02 13:07 ` Luiz Fernando N. Capitulino
2004-07-02 18:30 ` Adrian Bunk
0 siblings, 1 reply; 3+ messages in thread
From: Luiz Fernando N. Capitulino @ 2004-07-02 13:07 UTC (permalink / raw)
To: Adrian Bunk
Cc: mcalinux, tao, linux-kernel, jgarzik, linux-net, James.Bottomley,
linux-scsi
Hello Adrian,
Em Fri, Jul 02, 2004 at 02:25:00AM +0200, Adrian Bunk escreveu:
| The patch below against 2.6.7-mm5 fixes more compile errors with
| MCA_LEGACY=n .
|
| diffstat output:
| drivers/net/Kconfig | 2 +-
| drivers/net/at1700.c | 12 ++++++------
| drivers/net/eexpress.c | 4 ++--
| drivers/net/tokenring/Kconfig | 4 ++--
| drivers/net/tokenring/smctr.c | 12 ++++++------
| drivers/scsi/Kconfig | 4 ++--
| drivers/scsi/aha1542.c | 2 +-
| 7 files changed, 20 insertions(+), 20 deletions(-)
[...]
| static int __init smctr_chk_mca(struct net_device *dev)
| {
| -#ifdef CONFIG_MCA
| +#ifdef CONFIG_MCA_LEGACY
| struct net_local *tp = netdev_priv(dev);
| int current_slot;
| __u8 r1, r2, r3, r4, r5;
| @@ -626,7 +626,7 @@
| return (0);
| #else
| return (-1);
| -#endif /* CONFIG_MCA */
| +#endif /* CONFIG_MCA_LEGACY */
| }
what about doing things like that for #ifdef/#endif inside
functions? (not compiled):
diffstat:=
drivers/net/tokenring/smctr.c | 6 ++----
drivers/net/tokenring/smctr.h | 5 +++++
2 files changed, 7 insertions(+), 4 deletions(-)
diff -X dontdiff -Nparu a/drivers/net/tokenring/smctr.c a~/drivers/net/tokenring/smctr.c
--- a/drivers/net/tokenring/smctr.c 2004-04-05 14:41:56.000000000 -0300
+++ a~/drivers/net/tokenring/smctr.c 2004-07-02 09:34:14.000000000 -0300
@@ -477,9 +477,9 @@ static int smctr_checksum_firmware(struc
return (0);
}
+#ifdef CONFIG_MCA_LEGACY
static int __init smctr_chk_mca(struct net_device *dev)
{
-#ifdef CONFIG_MCA
struct net_local *tp = netdev_priv(dev);
int current_slot;
__u8 r1, r2, r3, r4, r5;
@@ -624,10 +624,8 @@ static int __init smctr_chk_mca(struct n
}
return (0);
-#else
- return (-1);
-#endif /* CONFIG_MCA */
}
+#endif /* CONFIG_MCA_LEGACY */
static int smctr_chg_rx_mask(struct net_device *dev)
{
diff -X dontdiff -Nparu a/drivers/net/tokenring/smctr.h a~/drivers/net/tokenring/smctr.h
--- a/drivers/net/tokenring/smctr.h 2003-10-08 16:24:14.000000000 -0300
+++ a~/drivers/net/tokenring/smctr.h 2004-07-02 09:56:56.000000000 -0300
@@ -9,6 +9,11 @@
#ifdef __KERNEL__
+/* when !CONFIG_MCA_LEGACY */
+#ifndef CONFIG_MCA_LEGACY
+static inline smctr_chk_mca(struct net_device *dev) { return (-1); }
+#endif
+
#define MAX_TX_QUEUE 10
#define SMC_HEADER_SIZE 14
PS: It's a janitorial work, if you is a busy person, I can do
that.
--
Luiz Fernando N. Capitulino
<http://www.telecentros.sp.gov.br>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [2.6 patch] more MCA_LEGACY dependencies
2004-07-02 13:07 ` Luiz Fernando N. Capitulino
@ 2004-07-02 18:30 ` Adrian Bunk
0 siblings, 0 replies; 3+ messages in thread
From: Adrian Bunk @ 2004-07-02 18:30 UTC (permalink / raw)
To: mcalinux, tao, linux-kernel, jgarzik, linux-net, James.Bottomley,
linux-scsi
On Fri, Jul 02, 2004 at 10:07:19AM -0300, Luiz Fernando N. Capitulino wrote:
>...
> | static int __init smctr_chk_mca(struct net_device *dev)
> | {
> | -#ifdef CONFIG_MCA
> | +#ifdef CONFIG_MCA_LEGACY
> | struct net_local *tp = netdev_priv(dev);
> | int current_slot;
> | __u8 r1, r2, r3, r4, r5;
> | @@ -626,7 +626,7 @@
> | return (0);
> | #else
> | return (-1);
> | -#endif /* CONFIG_MCA */
> | +#endif /* CONFIG_MCA_LEGACY */
> | }
>
> what about doing things like that for #ifdef/#endif inside
> functions? (not compiled):
>...
> +#ifdef CONFIG_MCA_LEGACY
> static int __init smctr_chk_mca(struct net_device *dev)
> {
> -#ifdef CONFIG_MCA
> struct net_local *tp = netdev_priv(dev);
> int current_slot;
> __u8 r1, r2, r3, r4, r5;
>...
> --- a/drivers/net/tokenring/smctr.h 2003-10-08 16:24:14.000000000 -0300
> +++ a~/drivers/net/tokenring/smctr.h 2004-07-02 09:56:56.000000000 -0300
> @@ -9,6 +9,11 @@
>
> #ifdef __KERNEL__
>
> +/* when !CONFIG_MCA_LEGACY */
> +#ifndef CONFIG_MCA_LEGACY
> +static inline smctr_chk_mca(struct net_device *dev) { return (-1); }
> +#endif
> +
>...
What's the advantage of your approach?
All it seems to do is to make the code less readable.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-02 18:31 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-02 0:25 [2.6 patch] more MCA_LEGACY dependencies Adrian Bunk
2004-07-02 13:07 ` Luiz Fernando N. Capitulino
2004-07-02 18:30 ` Adrian Bunk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox