ANA6911A-TXC 10base2 driver modification

Julian Highfield J.C.Highfield@lboro.ac.uk
Fri Aug 14 13:28:08 1998


Hi folks,
         I have been hacking the tulip driver to get 10base2 working. I 
now have a hacked version of 0.89K which works for both 10/100baseT (with 
options=11) and 10base2 (options=1). It doesn't automatically switch 
between the two, probably for the same reason options=11 is needed for 
10baseT/100baseTX operation. I probably need to look at that in a bit more 
depth, but perhaps Donald can guess what's wrong :-) The options=1 may not 
be needed for 10base2 but I ran out of time to test the driver today. This 
seemed like enough progress to warrant a posting.

0.89K diff:

31c31
< static int options[MAX_UNITS] = {11, };
---
> static int options[MAX_UNITS] = {0, };
732,733d731
<               /*** JCH. Ensure unused bits of CSR15 are turned off. (Mailing 
list.) ***/
<               outl(inl(ioaddr+CSR15) & ~(0x800037c0),ioaddr+CSR15);
1835,1850c1825,1829
<                       /*** HACK *** JCH ***/
<                       if (csr12 & 0x0200) {
< printk (KERN_INFO "HACK: AUI port\n");
<                               dev->if_port = 2;
<                               outl(0, ioaddr + CSR13);
<                               outl(0x0003FFFF, ioaddr + CSR14);
<                               outl(0x0008, ioaddr + CSR15);
<                               outl(0x0001, ioaddr + CSR13);
<                       } else {
< printk (KERN_INFO "HACK: 10base2 port\n");
<                               dev->if_port = 1;
<                               outl(0, ioaddr + CSR13);
<                               outl(0x0705, ioaddr + CSR14);
<                               outl(0x0006, ioaddr + CSR15);
<                               outl(0x0009, ioaddr + CSR13);
<                       }
---
>                       dev->if_port = 2;
>                       outl(0, ioaddr + CSR13);
>                       outl(0x0003FFFF, ioaddr + CSR14);
>                       outl(0x0008, ioaddr + CSR15);
>                       outl(0x0001, ioaddr + CSR13);

The register values used for 10base2 are taken from the t21142_csrXX[]
arrays, which is what tulip_timer uses. Do any of these 100Mbit tulip 
cards have AUI ports? I suppose they must, but I haven't seen one yet.
0.89K seems to assume that only AUI exists, hence the addition of the
"if (csr12 & 0x0200)" to decide whether there is AUI or 10base2 active.

When connecting as 10base2 and insmod'ing the driver I get a few ping
packets through the interface, it fails, switches to 10baseT, fails,
switches back to 10base2 and then works OK. 10baseT/100baseTX just
works once insmod'ed.

Regards,
        Julian.