<< 2 3c509 ethernet cards detection in Linux >>

<< 2 3c509 ethernet cards detection in Linux >>

Post by Rune Karls » Thu, 07 Jul 1994 01:08:10



I just installed a _second_ 3c509 in my machine. The reason for this was
to add some resources (another machine) to the machine I currently have
on the net. I wanted to do this via a local connection since the machine
was physically very close. I added a 3c509 BNC/coax card in the two machines.
I already had a 3c509-TP connected to Internet.

Both the cards are in EISA slots, but just now only the TP card is in
EISA configured mode.

The problem I ran into was how to detect BOTH cards. I have exhausted all
my possibilities (I think) of how to configure the cards in my machine.

When I first started only the 3c509-TP in EISA slot 1 got detected. This
was how it normally works.

    3c509-TP            3c509 BNC               Result

    EISA,IRQ3,0x1000    EISA,???,????           Locked EISA config prog
    EISA,IRQ3,0x1000    ISA ,IRQ10,0x350        Only eth0 TP detected
    ISA ,IRQ3,0x300     ISA ,IRQ10,0x350        Only eth0 BNC (!!) detected
    ISA ,IRQ3,0x300     EISA,IRQ10,0x350        Only eth0 BNC (!!) detected

    (the above results are the same for _every_ possible IRQ and IO-base
     configuration of the two cards in my machine)

Then I got a copy of an old news-posting regarding this problem with
two ethernet cards, suggesting I  hard-code the IRQ and IO-base settings
for my card.

I changed the linux/drivers/net/Space.c structs for eth1 to detect my
new 3c509 BNC. I compiled the kernel (1.1.23 w/ 3c509.c: pl15k 3/5/94).
What got detected with all the different configuration tried above was
always  eth0 and eth1 but with the same IRQ and IO-base for both of them.
And the card detected as BOTH eth0 and eth1 was the same as detected with
the "normal" kernel I had in the start. I.E the BNC got detected as BOTH
eth0 and eth1 (with it's IRQ and IO-base in both) when both card were
configured as ISA.

Then I got another copy of another newsposting referring to the old
Ethernet-HOWTO (which I didn't have a copy of anymore).
The post suggested to use the LILO  ether=<IRQ>,<IOBASE>,eth<N> to force
detection.
When I tried these options for LILO boottime (with the normal non-patched
1.1.23 kernel) - the behaviour was the EXACT copy of with the results
with my patched Space.c kernel (1.1.23) ...

I also tried all this with two other kernel versions (1.1.11 and 1.1.9).
The results were the same.

It seems the ECU (AMI Eisa Configuration Utility) has a hard time parsing
the second .cfg file (for the 3c509 BNC) , so I can't get to try both
cards in EISA mode - the slot configuration becomes incorrect, so I
can't setup IRQ for both cards in EISA.
I have the TP card in slot 1 and the BNC card in slot 3 , so the first
.cfg file always parses OK. But it seems the ECU program conflicts when
trying to setup the two cards.

I doubt however, that it would fix my problem .)

==== The question ====
Is there _any_ way to fix _anything_ so that the two cards get detected
by Linux (either both cards in ISA mode , or one in EISA with the other
in ISA mode) ?


 
 
 

<< 2 3c509 ethernet cards detection in Linux >>

Post by Donald Beck » Thu, 07 Jul 1994 08:12:20


[[ I emailed this patch to Rune. ]]



>I just installed a _second_ 3c509 in my machine. The reason for this was
>to add some resources (another machine) to the machine I currently have
>on the net. I wanted to do this via a local connection since the machine
>was physically very close. I added a 3c509 BNC/coax card in the two machines.
>I already had a 3c509-TP connected to Internet.

>Both the cards are in EISA slots, but just now only the TP card is in
>EISA configured mode.

>The problem I ran into was how to detect BOTH cards. I have exhausted all
>my possibilities (I think) of how to configure the cards in my machine.

The following patch should make it possible to detect multiple 3c5*9 in an
EISA machine.

People that try this should send me a report.

--- drivers/net/3c509.c.~1~     Thu Jun 23 16:06:39 1994

 /* 3c509.c: A 3c509 EtherLink3 ethernet driver for linux. */
 /*
-       Written 1993 by Donald Becker.
+       Written 1993,1994 by Donald Becker.

+       Copyright 1994 by Donald Becker.
        Copyright 1993 United States Government as represented by the
        Director, National Security Agency.      This software may be used and

        This driver is for the 3Com EtherLinkIII series.


-       C/O Supercomputing Research Ctr., 17100 Science Dr., Bowie MD 20715

+       C/O Center of Excellence in Space Data and Information Sciences
+               Code 930.5, Goddard Space Flight Center, Greenbelt MD 20771
+
+       Known limitations:
+       Because of the way 3c509 ISA detection works it's difficult to predict
+       a priori which of several ISA-mode cards will be detected first.
+
+       This driver does not use predictive interrupt mode, resulting in higher
+       packet latency but lower overhead.  If interrupts are disabled for an
+       unusually long time it could also result in missed packets, but in
+       practice this rarely happens.
 */



 #include <linux/config.h>

        short *phys_addr = (short *)dev->dev_addr;
        static int current_tag = 0;

-       /* First check for a board on the EISA bus. */
+       /* First check all slots of the EISA bus.  The next slot address to
+          probe is kept in 'eisa_addr' to support multiple probe() calls. */
        if (EISA_bus) {
-               static int eisa_addr;
-               for (ioaddr=0x1000 ; ioaddr < 0x9000; ioaddr += 0x1000) {
-                       eisa_addr = ioaddr;
+               static int eisa_addr = 0x1000;
+               while (eisa_addr < 0x9000) {
+                       ioaddr = eisa_addr;
+                       eisa_addr += 0x1000;
+
                        /* Check the standard EISA ID register for an encoded '3Com'. */
                        if (inw(ioaddr + 0xC80) != 0x6d50)

        }
 #endif  

-       /* Send the ID sequence to the ID_PORT. */
+       /* Next check for all ISA bus boards by sending the ID sequence to the
+          ID_PORT.  We find cards past the first by setting the 'current_tag'
+          on cards as they are found.  Cards with their tag set will not
+          respond to subseqent ID seqences. */
        outb(0x00, ID_PORT);
        outb(0x00, ID_PORT);

        }
        irq = id_read_eeprom(9) >> 12;

-       /* The current Space.c structure makes it difficult to have more
-          than one adaptor initialized.  Send me email if you have a need for

        if (dev->base_addr != 0
                &&      dev->base_addr != (unsigned short)ioaddr) {
                return -ENODEV;

--

USRA Center of Excellence in Space Data and Information Sciences.
Code 930.5, Goddard Space Flight Center,  Greenbelt, MD.  20771
301-286-0882         http://cesdis.gsfc.nasa.gov/pub/people/becker/whoiam.html

 
 
 

<< 2 3c509 ethernet cards detection in Linux >>

Post by Rune Karls » Thu, 07 Jul 1994 10:49:21


: [[ I emailed this patch to Rune. ]]



: >I just installed a _second_ 3c509 in my machine. The reason for this was
: >to add some resources (another machine) to the machine I currently have
: >on the net. I wanted to do this via a local connection since the machine
: >was physically very close. I added a 3c509 BNC/coax card in the two machines.
: >I already had a 3c509-TP connected to Internet.
: >
: >Both the cards are in EISA slots, but just now only the TP card is in
: >EISA configured mode.
: >
: >The problem I ran into was how to detect BOTH cards. I have exhausted all
: >my possibilities (I think) of how to configure the cards in my machine.

: The following patch should make it possible to detect multiple 3c5*9 in an
: EISA machine.

It works great! Thank you very much, Donald.

Now I have my 3c509-TP configured in EISA mode - and the 3c509 BNC in ISA.

To detect the ISA card (eth1) I have to use the following when booting:

  LILO boot: Linux ether=10,0x350,eth1

This is a workaround for the "disabled" eth1 device in drivers/net/Space.c .

My EISA mode 3c509 is on IRQ3 and IO 0x1000 (autom. set by EISA config).
It should work for both card in ISA mode as well - will test that in the
morning .)

Internet beats any commercial on-site service .)
 - especially with personlities like Donald J. Becker.