[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Two cards in GNU Mach (was: Re: NE2000 detection.



On Sun, Oct 01, 2000 at 08:31:10AM -0700, Me wrote:
> As for the subject, I have noticed that ne2000 card
> support was compiled
> into gnumach for the 2000-03 hurd tarball, but I can
> only get the card
> detected if the card is on io=0x300.  Is there a place
> to change this so
> that multiple ne2000 cards could be supported by
> gnumach?

Ah, yes. We haven't talked about GNU Mach yet.

Here is what is required: As GNU Mach doesn't support such boot time
options, you need to hack the kernel, but it isn't hard:

In gnumach-1.2/linux/dev/drivers/net/Space.c, you'll find this:

/* In Mach, by default allow at least 2 interfaces.  */
#ifdef MACH
#ifndef ETH1_ADDR
# define ETH1_ADDR 0
#endif
#ifndef ETH1_IRQ
# define ETH1_IRQ 0
#endif
#endif

You need to fill those in.
If you want to override everything, you do this:

Replace:
#ifdef MACH
static struct device eth1_dev = {
    "eth1", 0, 0, 0, 0, ETH1_ADDR, ETH1_IRQ, 0, 0, 0, &eth2_dev, ethif_probe
};
#else
static struct device eth1_dev = {
    "eth1", 0,0,0,0,0xffe0 /* I/O base*/, 0,0,0,0, &eth2_dev, ethif_probe };
#endif

With:
static struct device eth1_dev = {

    "eth1", 0, 0, 0, 0, 0x300, 10, 0, 0, 0, &eth2_dev, ne_probe
};

This will FORCE the probe for a NE2000 card (and no other second chard is
recognized) at the specified address.

I think you should be able to specify ETH1_ADDR and _IRQ at compile time,
but I can't find it.

Thanks,
Marcus


-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org Check Key server 
Marcus Brinkmann              GNU    http://www.gnu.org    for public PGP Key 
Marcus.Brinkmann@ruhr-uni-bochum.de,     marcus@gnu.org    PGP Key ID 36E7CD09
http://homepage.ruhr-uni-bochum.de/Marcus.Brinkmann/       brinkmd@debian.org



Reply to: