[tulip] D-LINK quad-port & autonegotiation woes...

Ben Greear greearb@candelatech.com
Sun, 29 Apr 2001 13:41:19 -0700


I just got some D-Link 4-port NICS, and have been trying
to get them to work with RH 7.1 (kernel 2.4.2 + RH patches).

More often than not, the tulip driver does not put the links
into 100-FD, though that is what they and the switch (and other cards)
they attach to support.

Sometimes, if I unload and reload the tulip module, the cards will
come up perfectly fine and work.  Usually, though they seem to be
running at half-duplex, even though the switch thinks they are at
full duplex.  This leads to *many* tx errors (CARRIER).

First, is there any way to make mii-diag force autonegotiation to happen
again?  I tried something like: mii-diag -A 100baseTx-FD eth5,
but that did not fix the problem.  The mii-diag documentation is in
c, so I may have missed something :(

I'm compiling 2.2.19 now to see if that fixes anything...

Please let me know if there is more information that I can offer that
might help diagnose my problem...

THanks,
Ben

Here are some diagnostics for when it is messed up:

[root@lanf1 /root]# mii-diag -vv eth5
mii-diag.c:v2.00 4/19/2000  Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
 MII PHY #1 transceiver registers:
   1000 786d 2000 5c10 0101 41e1 0005 2801
   0000 0000 0000 0000 0000 0000 0000 0000
   0a25 0000 0000 0000 0000 0000 0020 0000
   0080 0001 00a3 0100 0006 0f00 0000 0000.
 Basic mode control register 0x1000: Auto-negotiation enabled.
 You have link beat, and everything is working OK.
   This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation complete.
 Your link partner advertised 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT.

[root@lanf1 /root]# tulip-diag -vaef > /tmp/foo
[root@lanf1 /root]# more /tmp/foo
tulip-diag.c:v2.07 3/31/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a Digital DS21143 Tulip adapter at 0xcc00.
Digital DS21143 Tulip chip registers at 0xcc00:
 0x00: f8a08000 ffffffff ffffffff 06db1000 06db1200 f0660000 b20e2002 fbfffbff
 0x40: e0000000 fffd83ff ffffffff 00000000 000000c6 ffff0000 fff80000 8ff10000
 Port selection is MII, half-duplex.
 Transmit started, Receive started, half-duplex.
  The Rx process state is 'Waiting for packets'.
  The Tx process state is 'Idle'.
  The transmit threshold is 128.
  The NWay status register is 000000c6.
EEPROM 64 words, 6 address bits.
PCI Subsystem IDs, vendor 1186, device 1112.
CardBus Information Structure at offset 00000000.
Ethernet MAC Station Address 00:80:C8:B9:A1:8C.
EEPROM transceiver/media description table.
Leaf node at offset 30, default media type 0800 (Autosense).
 1 transceiver description blocks:
  Media MII, block type 3, length 13.
   MII interface PHY 0 (media type 11).
   21143 MII initialization sequence is 0 words:.
   21143 MII reset sequence is 0 words:.
    Media capabilities are 7800, advertising 01e1.
    Full-duplex map 5000, Threshold map 1800.
    No MII interrupt.
 MII PHY found at address 1, status 0x786d.
 MII PHY #1 transceiver registers:
   3100 786d 2000 5c10 01e1 41e1 0005 2801
   0000 0000 0000 0000 0000 0000 0000 0000
   0a25 0000 0000 0000 0000 0000 0020 0000
   0080 0001 00a3 0100 0006 0f00 0000 0000.
  Internal autonegotiation state is 'Autonegotiation disabled'.
Index #2: Found a Digital DS21143 Tulip adapter at 0xc880.
Digital DS21143 Tulip chip registers at 0xc880:
 0x00: f8a08000 ffffffff ffffffff 073bb000 073bb200 f0660000 b20e2002 fbfffbff
 0x40: e0000000 fffd83ff ffffffff 00000000 000000c6 ffff0000 fff80000 8ff1c000
 Port selection is MII, half-duplex.
 Transmit started, Receive started, half-duplex.
  The Rx process state is 'Waiting for packets'.
  The Tx process state is 'Idle'.
  The transmit threshold is 128.
  The NWay status register is 000000c6.
EEPROM 64 words, 6 address bits.
PCI Subsystem IDs, vendor 1186, device 1112.
CardBus Information Structure at offset 00000000.
Ethernet MAC Station Address 00:80:C8:B9:A1:8B.
EEPROM transceiver/media description table.
Leaf node at offset 30, default media type 0800 (Autosense).
 1 transceiver description blocks:
  Media MII, block type 3, length 13.
   MII interface PHY 0 (media type 11).
   21143 MII initialization sequence is 0 words:.
   21143 MII reset sequence is 0 words:.
    Media capabilities are 7800, advertising 01e1.
    Full-duplex map 5000, Threshold map 1800.
    No MII interrupt.
 MII PHY found at address 1, status 0x786d.
 MII PHY #1 transceiver registers:
   3100 786d 2000 5c10 01e1 41e1 0005 2801
   0000 0000 0000 0000 0000 0000 0000 0000
   0a25 0000 0000 0000 0000 0000 0020 0000
   0080 0001 00a3 0100 0006 0f00 0000 0000.
  Internal autonegotiation state is 'Autonegotiation disabled'.
Index #3: Found a Digital DS21143 Tulip adapter at 0xc800.
Digital DS21143 Tulip chip registers at 0xc800:
 0x00: f8a08000 ffffffff ffffffff 0713c000 0713c200 f0660000 b20e2002 fbfffbff
 0x40: e0000000 fffd83ff ffffffff 00000000 000000c6 ffff0000 fff80000 8ff1c000
 Port selection is MII, half-duplex.
 Transmit started, Receive started, half-duplex.
  The Rx process state is 'Waiting for packets'.
  The Tx process state is 'Idle'.
  The transmit threshold is 128.
  The NWay status register is 000000c6.
EEPROM 64 words, 6 address bits.
PCI Subsystem IDs, vendor 1186, device 1112.
CardBus Information Structure at offset 00000000.
Ethernet MAC Station Address 00:80:C8:B9:A1:8A.
EEPROM transceiver/media description table.
Leaf node at offset 30, default media type 0800 (Autosense).
 1 transceiver description blocks:
  Media MII, block type 3, length 13.
   MII interface PHY 0 (media type 11).
   21143 MII initialization sequence is 0 words:.
   21143 MII reset sequence is 0 words:.
    Media capabilities are 7800, advertising 01e1.
    Full-duplex map 5000, Threshold map 1800.
    No MII interrupt.
 MII PHY found at address 1, status 0x786d.
 MII PHY #1 transceiver registers:
   1000 786d 2000 5c10 0101 41e1 0005 2801
   0000 0000 0000 0000 0000 0000 0000 0000
   0a25 0000 0000 0000 0000 0000 0020 0000
   0080 0001 00a3 0100 0006 0f00 0000 0000.
  Internal autonegotiation state is 'Autonegotiation disabled'.
Index #4: Found a Digital DS21143 Tulip adapter at 0xc480.
Digital DS21143 Tulip chip registers at 0xc480:
 0x00: f8a08000 ffffffff ffffffff 073b0000 073b0200 f0660000 b20e2002 fbfffbff
 0x40: e0000000 fffd83ff ffffffff 00000000 000000c6 ffff0000 fff80000 8ff10000
 Port selection is MII, half-duplex.
 Transmit started, Receive started, half-duplex.
  The Rx process state is 'Waiting for packets'.
  The Tx process state is 'Idle'.
  The transmit threshold is 128.
  The NWay status register is 000000c6.
EEPROM 64 words, 6 address bits.
PCI Subsystem IDs, vendor 1186, device 1112.
CardBus Information Structure at offset 00000000.
Ethernet MAC Station Address 00:80:C8:B9:A1:89.
EEPROM transceiver/media description table.
Leaf node at offset 30, default media type 0800 (Autosense).
 1 transceiver description blocks:
  Media MII, block type 3, length 13.
   MII interface PHY 0 (media type 11).
   21143 MII initialization sequence is 0 words:.
   21143 MII reset sequence is 0 words:.
    Media capabilities are 7800, advertising 01e1.
    Full-duplex map 5000, Threshold map 1800.
    No MII interrupt.
 MII PHY found at address 1, status 0x786d.
 MII PHY #1 transceiver registers:
   3100 786d 2000 5c10 01e1 41e1 0005 2801
   0000 0000 0000 0000 0000 0000 0000 0000
   0a25 0000 0000 0000 0000 0000 0020 0000
   0080 0001 00a3 0100 0006 0f00 0000 0000.
  Internal autonegotiation state is 'Autonegotiation disabled'.
[root@lanf1 /root]# 


eth0      Link encap:Ethernet  HWaddr 00:03:47:87:A3:0D  
          inet addr:192.168.1.55  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4721 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4304 errors:1 dropped:0 overruns:0 carrier:1
          collisions:5911 txqueuelen:100 
          Interrupt:11 Base address:0xdf00 Memory:c882e000-c882ec40 

eth1      Link encap:Ethernet  HWaddr 00:90:27:35:49:E0  
          inet addr:172.25.5.2  Bcast:172.25.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:400 
          Interrupt:9 Base address:0xdf80 Memory:c8830000-c8830c40 

eth2      Link encap:Ethernet  HWaddr 00:90:27:35:46:36  
          inet addr:172.25.5.3  Bcast:172.25.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:400 
          Interrupt:11 Base address:0xdf40 Memory:c8832000-c8832c40 

eth3      Link encap:Ethernet  HWaddr 00:80:C8:B9:A1:8C  
          inet addr:172.25.5.4  Bcast:172.25.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:400 
          Interrupt:11 Base address:0xcc00 

eth4      Link encap:Ethernet  HWaddr 00:80:C8:B9:A1:8B  
          inet addr:172.25.5.5  Bcast:172.25.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:400 
          Interrupt:10 Base address:0xc880 

eth5      Link encap:Ethernet  HWaddr 00:80:C8:B9:A1:8A  
          inet addr:172.25.5.6  Bcast:172.25.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:48352 errors:0 dropped:0 overruns:0 frame:0
          TX packets:7234 errors:366146 dropped:0 overruns:0 carrier:366146
          collisions:0 txqueuelen:400 
          Interrupt:9 Base address:0xc800 

eth6      Link encap:Ethernet  HWaddr 00:80:C8:B9:A1:89  
          inet addr:172.25.5.7  Bcast:172.25.5.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:400 
          Interrupt:11 Base address:0xc480 

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:543 errors:0 dropped:0 overruns:0 frame:0
          TX packets:543 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 



[root@lanf1 /root]# lspci
00:00.0 Host bridge: Intel Corporation 82815 815 Chipset Host Bridge and Memory Controller Hub (rev 02)
00:02.0 VGA compatible controller: Intel Corporation 82815 CGC [Chipset Graphics Controller]  (rev 02)
00:1e.0 PCI bridge: Intel Corporation 82820 820 (Camino 2) Chipset PCI (rev 02)
00:1f.0 ISA bridge: Intel Corporation 82820 820 (Camino 2) Chipset ISA Bridge (ICH2) (rev 02)
00:1f.1 IDE interface: Intel Corporation 82820 820 (Camino 2) Chipset IDE U100 (rev 02)
00:1f.2 USB Controller: Intel Corporation 82820 820 (Camino 2) Chipset USB (Hub A) (rev 02)
00:1f.3 SMBus: Intel Corporation 82820 820 (Camino 2) Chipset SMBus (rev 02)
00:1f.4 USB Controller: Intel Corporation 82820 820 (Camino 2) Chipset USB (Hub B) (rev 02)
01:08.0 Ethernet controller: Intel Corporation 82820 820 (Camino 2) Chipset Ethernet (rev 01)
01:09.0 Ethernet controller: Intel Corporation 82557 [Ethernet Pro 100] (rev 05)
01:0a.0 PCI bridge: Digital Equipment Corporation DECchip 21152 (rev 03)
01:0b.0 Ethernet controller: Intel Corporation 82557 [Ethernet Pro 100] (rev 05)
02:04.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
02:05.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
02:06.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)
02:07.0 Ethernet controller: Digital Equipment Corporation DECchip 21142/43 (rev 41)


[root@lanf1 /root]# more /proc/interrupts 
           CPU0       
  0:     195113          XT-PIC  timer
  1:        187          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  8:          1          XT-PIC  rtc
  9:     145885          XT-PIC  e100, eth5
 10:         11          XT-PIC  eth4
 11:       6946          XT-PIC  e100, e100, eth3, eth6
 12:         20          XT-PIC  PS/2 Mouse
 14:      21725          XT-PIC  ide0
 15:          0          XT-PIC  ide1
NMI:          0 
ERR:          0




-- 
Ben Greear (greearb@candelatech.com)  http://www.candelatech.com
Author of ScryMUD:  scry.wanfear.com 4444        (Released under GPL)
http://scry.wanfear.com               http://scry.wanfear.com/~greear