Re: [PATCH net-next] Amiga PCMCIA 100 MBit card support

2018-12-31 Thread Michael Schmitz

Hi Dave,

Am 29.12.2018 um 09:43 schrieb David Miller:

From: Michael Schmitz 
Date: Sat, 22 Dec 2018 10:30:58 +1300


Am 21.12.2018 um 13:10 schrieb David Miller:

And in particular this huge complicated Kconfig construct is not
maintainable at all.


We can trim this down a bit (for reasons I've outlined before):

+if APNE
+config APNE100MBIT
+   bool "PCMCIA NE2000 100MBit support"
+   default n
+   depends on NE2000=n && PCMCIA_AXNET=n
+   depends on PCMCIA_PCNET=n && STNIC=n && ULTRA=n && WD80x3=n

In all honesty, I doubt anyone could ever use the stnic, ultra and wd
drivers on m68k (Geert?) so these could be omitted as well. Not sure
pcnet_cs or axnet_cs are possible to use on the Amiga PCMCIA slot, so
all that remains in practice is the ne driver (which is used on
Atari).


STNIC can indeed be dropped from the list of exceptions, but I forgot 
about ISA support on Q40.




Still too ugly?


I'm sorry, maybe I didn't express my concern clearly.


I understood your concerns - my hope was that the exception list might 
be possible to trim right down to a single driver. Alas, that's not the 
case.



Any sizable list of exceptions in a Kconfig conditional has long term
maintainence costs.  If, for some reason, a new variant of support
for this chip arrives there will be a new Kconfig setting that would
need to be added here to your expressions.

That is insanely error prone, and I can guarantee it will get missed.

Having so many front end drivers for a chipset should be done in a
more modular manner, so that in fact they could all coexist if
necessary.


Not sure I follow your meaning ... are you suggesting to allow the back 
end driver to use run-time selectable IO accessors and other generic 
helper functions, so the drivers currenlty including lib8390.c directly 
could use the core code from the 8390 module instead?


Cheers,

Michael


Re: [PATCH net-next] Amiga PCMCIA 100 MBit card support

2018-12-28 Thread David Miller
From: Michael Schmitz 
Date: Sat, 22 Dec 2018 10:30:58 +1300

> Am 21.12.2018 um 13:10 schrieb David Miller:
>> And in particular this huge complicated Kconfig construct is not
>> maintainable at all.
> 
> We can trim this down a bit (for reasons I've outlined before):
> 
> +if APNE
> +config APNE100MBIT
> + bool "PCMCIA NE2000 100MBit support"
> + default n
> + depends on NE2000=n && PCMCIA_AXNET=n
> + depends on PCMCIA_PCNET=n && STNIC=n && ULTRA=n && WD80x3=n
> 
> In all honesty, I doubt anyone could ever use the stnic, ultra and wd
> drivers on m68k (Geert?) so these could be omitted as well. Not sure
> pcnet_cs or axnet_cs are possible to use on the Amiga PCMCIA slot, so
> all that remains in practice is the ne driver (which is used on
> Atari).
> 
> Still too ugly?

I'm sorry, maybe I didn't express my concern clearly.

Any sizable list of exceptions in a Kconfig conditional has long term
maintainence costs.  If, for some reason, a new variant of support
for this chip arrives there will be a new Kconfig setting that would
need to be added here to your expressions.

That is insanely error prone, and I can guarantee it will get missed.

Having so many front end drivers for a chipset should be done in a
more modular manner, so that in fact they could all coexist if
necessary.


Re: [PATCH net-next] Amiga PCMCIA 100 MBit card support

2018-12-21 Thread Michael Schmitz

Dave,

Am 21.12.2018 um 13:10 schrieb David Miller:

From: ALeX Kazik 
Date: Wed, 19 Dec 2018 23:24:32 +0100


+   bool "PCMCIA NE2000 100MBit support"
+   default n
+   depends on ARM_ETHERH=n && AX88796=n && HYDRA=n && MAC8390=n
+   depends on MCF8390=n && NE2000=n && NE2K_PCI=n && PCMCIA_AXNET=n
+   depends on PCMCIA_PCNET=n && STNIC=n && ULTRA=n && WD80x3=n
+   depends on XSURF100=n && ZORRO8390=n
+   ---help---


Generally I'm not too happy with these changes, they are all very hackish.


I see only one option to address that: rewrite apne.c to include 
lib8390.c directly.


Moving the inb() and outb() redefines into the m68k version of io.h 
(which Geert is likely to veto because of its hackishness) would still 
require a Kconfig hack.



And in particular this huge complicated Kconfig construct is not
maintainable at all.


We can trim this down a bit (for reasons I've outlined before):

+if APNE
+config APNE100MBIT
+   bool "PCMCIA NE2000 100MBit support"
+   default n
+   depends on NE2000=n && PCMCIA_AXNET=n
+   depends on PCMCIA_PCNET=n && STNIC=n && ULTRA=n && WD80x3=n

In all honesty, I doubt anyone could ever use the stnic, ultra and wd 
drivers on m68k (Geert?) so these could be omitted as well. Not sure 
pcnet_cs or axnet_cs are possible to use on the Amiga PCMCIA slot, so 
all that remains in practice is the ne driver (which is used on Atari).


Still too ugly?

Cheers,

Michael



Sorry.



Re: [PATCH net-next] Amiga PCMCIA 100 MBit card support

2018-12-20 Thread David Miller
From: ALeX Kazik 
Date: Wed, 19 Dec 2018 23:24:32 +0100

> + bool "PCMCIA NE2000 100MBit support"
> + default n
> + depends on ARM_ETHERH=n && AX88796=n && HYDRA=n && MAC8390=n
> + depends on MCF8390=n && NE2000=n && NE2K_PCI=n && PCMCIA_AXNET=n
> + depends on PCMCIA_PCNET=n && STNIC=n && ULTRA=n && WD80x3=n
> + depends on XSURF100=n && ZORRO8390=n
> + ---help---

Generally I'm not too happy with these changes, they are all very hackish.

And in particular this huge complicated Kconfig construct is not
maintainable at all.

Sorry.