2000-11-15 10:35:42

by Andrzej Krzysztofowicz

[permalink] [raw]
Subject: PCI configuration changes

Hi,
Looking at the latest drivers/net/Config.in changes I noticed, that
two (modified earlier) lines are buggy:

dep_tristate ' 3c523 "EtherLink/MC" support' CONFIG_ELMC $CONFIG_MCA
dep_tristate ' 3c527 "EtherLink/MC 32" support (EXPERIMENTAL)' CONFIG_ELMC_II $CONFIG_MCA $CONFIG_EXPERIMENTAL

Note, that as CONFIG_MCA is defined only for i386 the dependencies on
$CONFIG_MCA are no-op for other architectures (in Configure/Menuconfig).
Either CONFIG_MCA should be defined for all architectures or there should be
if ... fi around these lines.

BTW, is there any reason for not replacing

bool ' Other ISA cards' CONFIG_NET_ISA

by

dep_bool ' Other ISA cards' CONFIG_NET_ISA $CONFIG_ISA

to eliminate more drivers from non-ISA arch configs ?

Andrzej

--
=======================================================================
Andrzej M. Krzysztofowicz [email protected]
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Technical University of Gdansk


2000-11-16 15:57:44

by Peter Samuelson

[permalink] [raw]
Subject: Re: PCI configuration changes


[Andrzej Krzysztofowicz]
> Note, that as CONFIG_MCA is defined only for i386 the dependencies on
> $CONFIG_MCA are no-op for other architectures (in
> Configure/Menuconfig). Either CONFIG_MCA should be defined for all
> architectures or there should be if ... fi around these lines.

The former, I think. Less confusing in the long run.

> BTW, is there any reason for not replacing
> bool ' Other ISA cards' CONFIG_NET_ISA
> by
> dep_bool ' Other ISA cards' CONFIG_NET_ISA $CONFIG_ISA
> to eliminate more drivers from non-ISA arch configs ?

Looks good to me. Anything to remove clutter from config menus....

Peter


diff -urk.orig 2.4.0test11pre4/arch/alpha/config.in.orig 2.4.0test11pre4/arch/alpha/config.in
--- 2.4.0test11pre4/arch/alpha/config.in.orig Mon Nov 13 01:44:55 2000
+++ 2.4.0test11pre4/arch/alpha/config.in Thu Nov 16 09:11:23 2000
@@ -69,6 +69,7 @@
define_bool CONFIG_ISA y
define_bool CONFIG_EISA y
define_bool CONFIG_SBUS n
+define_bool CONFIG_MCA n

if [ "$CONFIG_ALPHA_JENSEN" = "y" ]
then
diff -urk.orig 2.4.0test11pre4/arch/arm/config.in.orig 2.4.0test11pre4/arch/arm/config.in
--- 2.4.0test11pre4/arch/arm/config.in.orig Mon Nov 13 01:44:02 2000
+++ 2.4.0test11pre4/arch/arm/config.in Thu Nov 16 09:11:48 2000
@@ -7,6 +7,7 @@
define_bool CONFIG_ARM y
define_bool CONFIG_EISA n
define_bool CONFIG_SBUS n
+define_bool CONFIG_MCA n
define_bool CONFIG_UID16 y


diff -urk.orig 2.4.0test11pre4/arch/ia64/config.in.orig 2.4.0test11pre4/arch/ia64/config.in
--- 2.4.0test11pre4/arch/ia64/config.in.orig Mon Nov 13 01:44:02 2000
+++ 2.4.0test11pre4/arch/ia64/config.in Thu Nov 16 09:17:26 2000
@@ -22,6 +22,7 @@

define_bool CONFIG_ISA n
define_bool CONFIG_EISA n
+define_bool CONFIG_MCA n
define_bool CONFIG_SBUS n

choice 'IA-64 system type' \
diff -urk.orig 2.4.0test11pre4/arch/m68k/config.in.orig 2.4.0test11pre4/arch/m68k/config.in
--- 2.4.0test11pre4/arch/m68k/config.in.orig Mon Nov 13 01:44:02 2000
+++ 2.4.0test11pre4/arch/m68k/config.in Thu Nov 16 09:17:10 2000
@@ -26,6 +26,7 @@

define_bool CONFIG_ISA n
define_bool CONFIG_EISA n
+define_bool CONFIG_MCA n
define_bool CONFIG_PCMCIA n

bool 'Amiga support' CONFIG_AMIGA
diff -urk.orig 2.4.0test11pre4/arch/mips/config.in.orig 2.4.0test11pre4/arch/mips/config.in
--- 2.4.0test11pre4/arch/mips/config.in.orig Mon Nov 13 01:44:02 2000
+++ 2.4.0test11pre4/arch/mips/config.in Thu Nov 16 09:16:45 2000
@@ -39,6 +39,7 @@
unset CONFIG_VIDEO_G364
unset CONFIG_PC_KEYB

+define_bool CONFIG_MCA n
define_bool CONFIG_SBUS n

if [ "$CONFIG_ALGOR_P4032" = "y" ]; then
diff -urk.orig 2.4.0test11pre4/arch/mips64/config.in.orig 2.4.0test11pre4/arch/mips64/config.in
--- 2.4.0test11pre4/arch/mips64/config.in.orig Mon Nov 13 01:44:02 2000
+++ 2.4.0test11pre4/arch/mips64/config.in Thu Nov 16 09:16:33 2000
@@ -66,6 +66,7 @@
define_bool CONFIG_PCI n
fi

+define_bool CONFIG_MCA n
define_bool CONFIG_SBUS n

mainmenu_option next_comment
diff -urk.orig 2.4.0test11pre4/arch/ppc/config.in.orig 2.4.0test11pre4/arch/ppc/config.in
--- 2.4.0test11pre4/arch/ppc/config.in.orig Mon Nov 13 01:44:02 2000
+++ 2.4.0test11pre4/arch/ppc/config.in Thu Nov 16 09:15:21 2000
@@ -101,6 +101,9 @@
define_bool CONFIG_EISA n
define_bool CONFIG_SBUS n

+# Yes MCA RS/6000s exist but Linux-PPC does not currently support any
+define_bool CONFIG_MCA n
+
if [ "$CONFIG_APUS" = "y" -o "$CONFIG_4xx" = "y" -o \
"$CONFIG_8260" = "y" ]; then
define_bool CONFIG_PCI n
diff -urk.orig 2.4.0test11pre4/arch/s390/config.in.orig 2.4.0test11pre4/arch/s390/config.in
--- 2.4.0test11pre4/arch/s390/config.in.orig Mon Nov 13 01:44:03 2000
+++ 2.4.0test11pre4/arch/s390/config.in Thu Nov 16 09:13:39 2000
@@ -5,6 +5,7 @@

define_bool CONFIG_ISA n
define_bool CONFIG_EISA n
+define_bool CONFIG_MCA n
define_bool CONFIG_UID16 y

mainmenu_name "Linux Kernel Configuration"
diff -urk.orig 2.4.0test11pre4/arch/sh/config.in.orig 2.4.0test11pre4/arch/sh/config.in
--- 2.4.0test11pre4/arch/sh/config.in.orig Mon Nov 13 01:44:03 2000
+++ 2.4.0test11pre4/arch/sh/config.in Thu Nov 16 09:13:26 2000
@@ -67,6 +67,7 @@

define_bool CONFIG_ISA n
define_bool CONFIG_EISA n
+define_bool CONFIG_MCA n
define_bool CONFIG_SBUS n

bool 'Networking support' CONFIG_NET
diff -urk.orig 2.4.0test11pre4/arch/sparc/config.in.orig 2.4.0test11pre4/arch/sparc/config.in
--- 2.4.0test11pre4/arch/sparc/config.in.orig Mon Nov 13 01:44:03 2000
+++ 2.4.0test11pre4/arch/sparc/config.in Thu Nov 16 09:12:31 2000
@@ -32,6 +32,7 @@
# Global things across all Sun machines.
define_bool CONFIG_ISA n
define_bool CONFIG_EISA n
+define_bool CONFIG_MCA n
define_bool CONFIG_PCMCIA n
define_bool CONFIG_SBUS y
define_bool CONFIG_SBUSCHAR y
diff -urk.orig 2.4.0test11pre4/arch/sparc64/config.in.orig 2.4.0test11pre4/arch/sparc64/config.in
--- 2.4.0test11pre4/arch/sparc64/config.in.orig Mon Nov 13 01:44:03 2000
+++ 2.4.0test11pre4/arch/sparc64/config.in Thu Nov 16 09:12:45 2000
@@ -30,6 +30,7 @@
define_bool CONFIG_HAVE_DEC_LOCK y
define_bool CONFIG_ISA n
define_bool CONFIG_EISA n
+define_bool CONFIG_MCA n
define_bool CONFIG_PCMCIA n
define_bool CONFIG_SBUS y
define_bool CONFIG_SBUSCHAR y
diff -urk.orig 2.4.0test11pre4/drivers/net/Config.in.orig 2.4.0test11pre4/drivers/net/Config.in
--- 2.4.0test11pre4/drivers/net/Config.in.orig Mon Nov 13 01:44:09 2000
+++ 2.4.0test11pre4/drivers/net/Config.in Thu Nov 16 09:20:13 2000
@@ -100,7 +100,7 @@
if [ "$CONFIG_ISA" = "y" -o "$CONFIG_EISA" = "y" -o "$CONFIG_PCI" = "y" ]; then
tristate ' HP 10/100VG PCLAN (ISA, EISA, PCI) support' CONFIG_HP100
fi
- bool ' Other ISA cards' CONFIG_NET_ISA
+ dep_bool ' Other ISA cards' CONFIG_NET_ISA $CONFIG_ISA
if [ "$CONFIG_NET_ISA" = "y" ]; then
tristate ' Cabletron E21xx support' CONFIG_E2100
if [ "$CONFIG_OBSOLETE" = "y" ]; then

2000-11-16 16:00:23

by Jeff Garzik

[permalink] [raw]
Subject: Re: PCI configuration changes

Peter Samuelson wrote:
>
> [Andrzej Krzysztofowicz]
> > Note, that as CONFIG_MCA is defined only for i386 the dependencies on
> > $CONFIG_MCA are no-op for other architectures (in
> > Configure/Menuconfig). Either CONFIG_MCA should be defined for all
> > architectures or there should be if ... fi around these lines.
>
> The former, I think. Less confusing in the long run.
>
> > BTW, is there any reason for not replacing
> > bool ' Other ISA cards' CONFIG_NET_ISA
> > by
> > dep_bool ' Other ISA cards' CONFIG_NET_ISA $CONFIG_ISA
> > to eliminate more drivers from non-ISA arch configs ?
>
> Looks good to me. Anything to remove clutter from config menus....

Patch looks ok to me, applied.

--
Jeff Garzik |
Building 1024 | The chief enemy of creativity is "good" sense
MandrakeSoft | -- Picasso

2000-11-16 16:01:33

by Jeff Garzik

[permalink] [raw]
Subject: Re: PCI configuration changes

Oh yeah, another MCA cleanup to consider -- like EISA, there exists a
'MCA_bus' variable which is 0 or 1, depending on the absence or presence
of MCA bus on the current system.

When CONFIG_MCA is enabled, this should be variable like it currently is
[on x86]. When CONFIG_MCA==n, MCA_bus should be unconditionally defined
to zero.

Look at how 'EISA_bus' is handled in test11-pre5...

Jeff



--
Jeff Garzik |
Building 1024 | The chief enemy of creativity is "good" sense
MandrakeSoft | -- Picasso

2000-11-16 16:09:23

by Peter Samuelson

[permalink] [raw]
Subject: Re: PCI configuration changes


[Jeff Garzik <[email protected]>]
> Oh yeah, another MCA cleanup to consider -- like EISA, there exists a
> 'MCA_bus' variable which is 0 or 1, depending on the absence or presence
> of MCA bus on the current system.

OK, workin' on it..

Peter

2000-11-16 16:18:25

by Andrzej Krzysztofowicz

[permalink] [raw]
Subject: Re: PCI configuration changes

> Peter Samuelson wrote:
> > [Andrzej Krzysztofowicz]
> > > Note, that as CONFIG_MCA is defined only for i386 the dependencies on
> > > $CONFIG_MCA are no-op for other architectures (in
> > > Configure/Menuconfig). Either CONFIG_MCA should be defined for all
> > > architectures or there should be if ... fi around these lines.
> >
> > Looks good to me. Anything to remove clutter from config menus....
>
> Patch looks ok to me, applied.

I think the following i386 chunk should be added to the patch:


--- arch/i386/config.in.old Tue Nov 14 23:18:12 2000
+++ arch/i386/config.in Tue Nov 14 23:19:10 2000
@@ -198,6 +198,8 @@

if [ "$CONFIG_VISWS" != "y" ]; then
bool 'MCA support' CONFIG_MCA
+else
+ define_bool CONFIG_MCA n
fi

bool 'Support for hot-pluggable devices' CONFIG_HOTPLUG


--
=======================================================================
Andrzej M. Krzysztofowicz [email protected]
phone (48)(58) 347 14 61
Faculty of Applied Phys. & Math., Technical University of Gdansk

2000-11-16 16:56:12

by Peter Samuelson

[permalink] [raw]
Subject: Re: PCI configuration changes


[Jeff Garzik <[email protected]>]
> For drivers that are 100% MCA, they do not need to test MCA_bus,
> because that test can be done in Config.in.

I think Andrzej was concerned with a driver assuming that just because
CONFIG_MCA is defined, there *is* an MCA bus on the machine. This is
of course an invalid assumption. I will try to make sure that the
driver init in each case has something like

if (!MCA_bus)
return -ENODEV;

Peter