Hi Carlos,
Am 01.01.2022 um 16:22 schrieb Carlos Milán Figueredo:
Hi Michael, happy new year!
From: Michael Schmitz <schmitz...@gmail.com>
Sent: viernes, 31 de diciembre de 2021 8:51
Thanks, I'll check the prefix size and send a patch by PM.
I will need also some help for testing it, as I do not have a Linux working
install on my Amiga because I need hd-media initrd and network support :) I am
able to boot a kernel with an initrd.
I was under the impression that you could (cross-)build your own kernel
and initrd? If that's not an option, testing is going to be much harder.
Any required patches can be added to the list of patches applied as part
of the Debian kernel build procedure as far as I remember - is that
still so, Adrian?
Doesn't print the ring buffer addresses - might need a patch to the BSD
source to do that (I haven't looked at BSD source in over 20 years). Or
maybe some equivalent of ethtool reports the addresses, or they show up
in ifconfig output?
I am afraid ifconfig doesn't print anything about the ring buffer, and -to my
knowledge- there is not equivalent ethtool.
But what I meant is to check whether the ne driver source hard-codes the
ring buffer addresses for these cards?
Maybe we can know by taking a look to the NetBSD driver source code? I think it
is located on the following files:
1. Gayle PCMCIA driver [1].
That's the Gayle specific code, but IO and memory space for the PCMCIA
interface are hardcoded there. The low level access functions use the
bus size (8 or 16 bit) but nothing in there detects that. Must be part
of the PCMCIA CIS code then.
2. ne2000.c [2], ne2000reg.h [3], ne2000var.h [4]
3. dp8390reg.h [5], dp8390var.h [6]
I don't have the needed knowledge about the NE2000 driver or the kernel, but to
my untrained eye it doesn't look like there is anything hardcoded for these
cards.
Might be passed in from the generic driver support code (which likely
obtains that info from CIS).
There's a patch of mine floating around that uses CIS data to figure out
8 or 16 bit IO width (submitted to linux-m68k and netdev a while ago).
With that one applied, dumping the CIS data and hand-parsing the result
might be one way to obtain the necessary data.
In [2] there is a function called ne2000_detect_8bit() that is used for that.
It looks like it reads the card ROM to figure out. I don't know if the CIS is
considered a ROM or not.
No, that only figures out what mode is set in the 8390 chip - AFAIK
needed to support NE1000 type cards. With 16 bit NE2000 type cards, you
can still use 8 bit IO to access the chip, which is what the 10 Mbit
cards supported by the apne driver do. 100 Mbit cards need 16 bit IO.
I'll have to create another patch to look for mem resources in the CIS
data, and get that tested on the already supported cards. Then use that
for new cards.
Cheers,
Michael
[1]
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/amiga/dev/gayle_pcmcia.c?rev=1.34&content-type=text/x-cvsweb-markup
[2]
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/ne2000.c?rev=1.77&content-type=text/x-cvsweb-markup
[3]
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/ne2000reg.h?rev=1.3.8.1&content-type=text/x-cvsweb-markup
[4]
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/ne2000var.h?rev=1.27.30.1&content-type=text/x-cvsweb-markup
[5]
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/dp8390reg.h?rev=1.8.116.1&content-type=text/x-cvsweb-markup
[6]
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/dp8390var.h?rev=1.36&content-type=text/x-cvsweb-markup
Regards,
Carlos
Carlos Milán Figueredo | HispaMSX System Operator | http://www.hispamsx.org |
telnet://bbs.hispamsx.org | https://calnus.com