Hi,
could you please explain what particular PCMCIA card this patch is
needed for? Also, whether or not other existing Amiga PCMCIA cards will
still work with this patch? The comment included in the first hunk does
suggest the patch is likely to break other drivers.
That said: the redefinition of inb/outb does belong in either the 8390.h
header, or else in the m68k asm/io_mm.h header, with the appropriate
conditionals so it's only activated when compiling this driver. The
latter would be my preference, and (I surmise) also the preference of
the net maintainers, and Geert's.
The card reset code added to apne.c should be incontroversial if
conditionalied.
If the patch does not work for all PCMCIA cards on Amiga in general, two
separate modules have to be built (one with, and one without the
redefined inb used). Some Makefile magic may be required to build two
different module binaries from the same source in one build session
(using different config options for both). Can't think of a solution off
the cuff, but browsing a few other kernel makefiles may throw up an idea
or two.
If you (or anyone else) can come up with a patch that meets these
criteria, and submit same to netdev@vger (CC to linux.m68k please!), I
can offer to review and advocate the patch FWIW.
The alternative would be to extensively reengineer the core 8390 driver
to allow for use of different runtime-selected inb/outb primitives (as
other network card drivers do). This would be a much cleaner solution,
but require extensive testing of such a patch on a host of architectures
and network cards. Happy to test such a reengineered driver on the
EtherNEC NE2000 clone, and review/advocate same...
The patch in its current form is not suitable for inclusion in the
mainline kernel, IMO.
Cheers,
Michael
Am 09.09.2018 um 05:32 schrieb ALeX Kazik:
Hi,
I'm currently (since about 8 hours) installing my A1200 and the
network card couldn't be found but after compiling a new kernel with
the old patch I now also have networking.
Can someone add that to the kernel please, either as an option or
always if it's not destroying something else.
ALeX.