21143 running with 220kB/sec

Kurt Huwig kurt@huwig.de
Thu Dec 16 02:57:10 1999


Bill Paul wrote:
> Kurt Huwig (kurt@huwig.de) writes:
> 
> >   Hello!
> 
> >   I have problems with a 21143 card
> 
> Ah yes, "a" 21143 card. Of course we all know exactly which card you're
> talking about. No need for you to actually take two or three seconds to
> tell us the manufacturer and model. No, we can figure it out using our

[...] ;-)

Ok, it is a Micronet EtherFast(tm) LAN Adapter, but these are sometimes
equipped with RTL-chips and sometimes with DEC chips.

So, the exact brand is:

	Micronet SP2500K V2 93117540

equipped with a
	
	21143-PD
	DC1096B
	S 9910 JK 4696
	INTEL (May this be the problem?) (M)(C) 1997

and a

	LB 16PT6122B

> >   eth0: Digital DS21143 Tulip rev 65 at 0xdc80, 00:C0:CA:16:11:4B, IRQ 11.
> >   eth0: EEPROM default media type Autosense.
> >   eth0: Index #0 - Media 10baseT (#0) described by a 21142 Serial PHY (2) block.
> >   eth0: Index #1 - Media 10baseT-FD (#4) described by a 21142 Serial PHY (2) block.
> >   eth0: Index #2 - Media 100baseTx (#3) described by a 21143 SYM PHY (4) block.
> >   eth0: Index #3 - Media 100baseTx-FD (#5) described by a 21143 SYM PHY (4) block.
> 
> Well, according to the OUI in the ethernet address, your card is made
> by Alfa, Inc. I'm not sure what model though, however the media
> descriptors indicate that it doesn't use an MII-based transceiver
> and relies instead on the 21143's 10baseT port, 100Mbps symbol mode and
> built-in NWAY autonegotiation.
> 
> >   Then I tried a RTL8139 card in the same machine and it has 8000kB/sec
> >   with FD on. I tried several cards and several switches without any
> >   differences.
> 
> >   I don't have this problems with a 21140. This card keeps the FD even
> >   when disconnected/reconnected from the switch.
> 
> Actually, yes. The info from the diag program shows the problem:
> 
> >tulip-diag.c:v1.19 10/2/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
> >Index #1: Found a Digital DS21143 Tulip adapter at 0xdc80.
> >Digital DS21143 Tulip chip registers at 0xdc80:
> >  f8a08000 ffffffff ffffffff 004fe010 004fe210 f0000102 b3860200 f3fe0000
> >  e0000000 fff583ff ffffffff 00000000 41e1d2cc ffff0001 fffbffff 8ffdc008
> > Port selection is 100mbps-SYM/PCS 100baseTx scrambler, full-duplex.
> > Transmit stopped, Receive stopped, full-duplex.
> >  The Rx process state is 'Stopped'.
> >  The Tx process state is 'Stopped'.
> >  The transmit threshold is 128.
> >  The NWay status register is 41e1d2cc.
> 
> The contents of CSR14 is 0xfffbffff. The 'autoneg enable' bit is set,
> which makes sense since the default media setting is 'autosense.' The
> NWAY statuss word says 0x41e1d2cc, which indicates that negotiation
> was completed and the chip got the link partner's code word (0x41e1)
> which indicates that the link partner supports 100mbps full duplex.
> This means that the driver should program the chip for 100mbps full
> duplex in order to match the switch, and it fact it may believe that
> it is doing just that.
> 
> However, there is a difference between the 21140 and 21143 relating to
> how the full duplex bit in CSR6 is handled: with the 21143, when you have
> autoneg turned on, the full duplex bit does not actually force the chip
> into full duplex, it only controls whether or not the NWAY logic
> advertises 10mbps full duplex mode. If you negotiate a full duplex mode
> and you actually want to use it, you have to turn off autoneg first,
> *then* set the full duplex bit in CSR6. Otherwise, you stay in half
> duplex while the switch is in full-duplex, and you get cruddy performance
> due to the mismatch.
> 
> What can you do? A few things:
> 
> 1) Rather than using autosense, force the NIC to 100Mbps full duplex.
>    NOTE: if you do this, you will have to manually program the switch
>    to stay at 100Mbps full duplex too, because without the
>    autonegotiation, the switch will only be able to detect the link
>    speed, not the duplex mode. If you set the NIC for 100Mbps full
>    duplex and do nothing else, the switch will assume 100Mbps half
>    duplex and you will still have a mismatch.

The switch is a cheap one that you cannot configure.
I used the options-parameter and got:

	options=5
-> card says

Dec 16 08:30:35 tanja kernel: eth0: Using user-specified media
100baseTx-FD.    

using options=14 gives no such line. With both variants, the switch
indicates 100Mbps half duplex.

tulip-diag gives:
tulip-diag.c:v1.19 10/2/99 Donald Becker (becker@cesdis.gsfc.nasa.gov)
Index #1: Found a Digital DS21143 Tulip adapter at 0xdc80.
Digital DS21143 Tulip chip registers at 0xdc80:
  f8a08000 ffffffff ffffffff 009b6010 009b6210 f0000102 b3860200
f3fe0000
  e0000000 fff583ff ffffffff 00000000 000000c4 ffff0001 fffbff7f
8ffdc008
 Port selection is 100mbps-SYM/PCS 100baseTx scrambler, full-duplex.
 Transmit stopped, Receive stopped, full-duplex.
  The Rx process state is 'Stopped'.
  The Tx process state is 'Stopped'.
  The transmit threshold is 128.
  The NWay status register is 000000c4.
EEPROM size is 6.
PCI Subsystem IDs, vendor 1113, device 1207.
CardBus Information Structure at offset 00000000.
Ethernet MAC Station Address 00:C0:CA:16:11:4B.
EEPROM transceiver/media description for the Digital DS21143 Tulip chip.
Leaf node at offset 30, default media type 0800 (Autosense).
 4 transceiver description blocks:
  Media 10baseT, block type 2, length 6.
   Serial transceiver for 10baseT (media type 0).
    GP pin direction 08af  GP pin data 00a5.
  Media 10baseT-Full Duplex, block type 2, length 6.
   Serial transceiver for 10baseT-Full Duplex (media type 4).
    GP pin direction 08af  GP pin data 00a5.
  Media 100baseTx, block type 4, length 8.
   SYM transceiver for 100baseTx (media type 3).
    GP pin direction 08af  GP pin data 00a5.
    No media detection indication (command 80 61).
  Media 100baseTx Full Duplex, block type 4, length 8.
   SYM transceiver for 100baseTx Full Duplex (media type 5).
    GP pin direction 08af  GP pin data 00a5.
    No media detection indication (command 80 61).
   No MII transceivers found!
  Internal autonegotiation state is 'Autonegotiation disabled'.

> 2) Force the NIC to 100Mbps half duplex. The switch will also assume
>    100mbps half duplex, and performance will be better. However, you
>    will get collisions since you won't be in full duplex.

This is possible, but not a good solution.

> 3) Try a newer version of the driver. I don't keep track of all the
>    changes, but I'm fairly sure that 0.91e has been superseded by
>    at least a few interim releases (I think there's a 0.91g now).
>    Donald Becker must have run across this problem by now and is
>    sure to have fixed it in a later driver version. If you try the
>    latest version and it still doesn't work, send him a quick e-mail
>    asking about it.

I tried the current testing version 0.91g, but I still do only get
220kB/sec when the FD-lamp on the switch is on and 8-10MB/sec when it is
off.

> Note that this problem does not occur with 21143-based NICs that
> use MII transceivers (like the Kingston KNE100TX or the D-Link
> DFE-570TX, and probably olders) since in these configurations the
> 21143's internal autonegotiation is not used.

Thanx for your help.

Kurt