[vortex] Problem with Nokia ADSL modem/hub and 3c905

Ville Herva vherva@mail.niksula.cs.hut.fi
Wed, 24 Jan 2001 23:33:13 +0200


On Wed, Jan 24, 2001 at 08:51:04PM +1100, you [Andrew Morton] claimed:
> 
> Could you please replace the existing 3c59x.c with the above file
> and rebuild the driver.  Then, force it to use the 10baseT
> port with
> 
> 	modprobe 3c59x options=0
> 
> and then test?

Sorry for the flood. I think more too much debug info is better than
too little, so please bear with me.


With 'options=0' the connection (pinging Nokia box) does not work:

insmod 3c59x options=0 debug=7
==========================================================================
3c59x.c 16Aug00 Donald Becker and others
http://www.scyld.com/network/vortex.html
eth0: 3Com 3c905 Boomerang 100baseTx at 0xc400,  00:60:08:0b:99:9e, IRQ 19
  Internal config register is 16302d8, transceivers 0xe040.
  8K word-wide RAM 3:5 Rx:Tx split, autoselect/MII interface.
  Media override to transceiver type 0 (10baseT).
  Enabling bus-master transmits and whole-frame receives.
eth0: Media override to transceiver 0 (10baseT).
eth0: Initial media type 10baseT.
eth0: vortex_open() InternalConfig 010302d8.
eth0: vortex_open() irq 19 media status 8820.
eth0:  Filling in the Rx ring.
bridge-eth0: found peer eth0
bridge-eth0: up
eth0: Media selection timer tick happened, 10baseT.
eth0: Media 10baseT has link beat, 88e0.
eth0: Media selection timer finished, 10baseT.
eth0: Trying to send a boomerang packet, Tx index 0.
eth0: interrupt, status e201, latency 10, cur_rx 0, dirty_rx 0
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 1.
eth0: interrupt, status e201, latency 8, cur_rx 0, dirty_rx 0
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 2.
eth0: interrupt, status e201, latency 8, cur_rx 0, dirty_rx 0
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 3.
eth0: interrupt, status e201, latency 10, cur_rx 0, dirty_rx 0
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 4.
eth0: interrupt, status e201, latency 8, cur_rx 0, dirty_rx 0
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 5.
eth0: interrupt, status e201, latency 8, cur_rx 0, dirty_rx 0
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: vortex_close() status e000, Tx status 00.
eth0: vortex close stats: rx_nocopy 0 rx_copy 0 tx_queued 6 Rx
pre-checksummed 0.
bridge-eth0: lost peer eth0
bridge-eth0: down
==========================================================================

Without 'options=0' it works:

insmod 3c59x debug=7
==========================================================================
3c59x.c 16Aug00 Donald Becker and others
http://www.scyld.com/network/vortex.html
eth0: 3Com 3c905 Boomerang 100baseTx at 0xc400,  00:60:08:0b:99:9e, IRQ 19
  Internal config register is 16302d8, transceivers 0xe040.
  8K word-wide RAM 3:5 Rx:Tx split, autoselect/MII interface.
  MII transceiver found at address 24, status 786d.
  Enabling bus-master transmits and whole-frame receives.
eth0: Initial media type MII.
eth0: MII #24 status 786d, link partner capability 0021, setting
half-duplex.
eth0: vortex_open() InternalConfig 016302d8.
eth0: vortex_open() irq 19 media status 8802.
eth0:  Filling in the Rx ring.
bridge-eth0: found peer eth0
bridge-eth0: up
eth0: interrupt, status e401, latency 7, cur_rx 0, dirty_rx 0
eth0: In interrupt loop, status e401.
  In boomerang_rx(), status e001, rx_status 8000.
Receiving packet size 98 status 8062.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 0.
eth0: interrupt, status e201, latency 8, cur_rx 1, dirty_rx 1
eth0: In interrupt loop, status e201.
eth0: In interrupt loop, status e401.
  In boomerang_rx(), status e001, rx_status 8000.
Receiving packet size 60 status 803c.
eth0: exiting interrupt, status e000.
eth0: interrupt, status e401, latency 7, cur_rx 2, dirty_rx 2
eth0: In interrupt loop, status e401.
  In boomerang_rx(), status e001, rx_status 8000.
Receiving packet size 60 status 803c.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 1.
eth0: interrupt, status e201, latency 8, cur_rx 3, dirty_rx 3
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 2.
eth0: interrupt, status e201, latency 11, cur_rx 3, dirty_rx 3
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
eth0: interrupt, status e401, latency 8, cur_rx 3, dirty_rx 3
eth0: In interrupt loop, status e401.
  In boomerang_rx(), status e001, rx_status 8000.
Receiving packet size 98 status 8062.
eth0: exiting interrupt, status e000.
eth0: Media selection timer tick happened, MII.
eth0: MII transceiver has status 786d.
eth0: Media selection timer finished, MII.
eth0: interrupt, status e401, latency 8, cur_rx 4, dirty_rx 4
eth0: In interrupt loop, status e401.
  In boomerang_rx(), status e001, rx_status 8000.
Receiving packet size 98 status 8062.
eth0: exiting interrupt, status e000.
eth0: Trying to send a boomerang packet, Tx index 3.
eth0: interrupt, status e201, latency 8, cur_rx 5, dirty_rx 5
eth0: In interrupt loop, status e201.
eth0: exiting interrupt, status e000.
==========================================================================

 
> If that doesn't work then could you please send a full report, along the
> following lines:
> 
> 1: load the driver with `modprobe 3c59x debug=7'
> 2: ifup eth0
> 3: wait > one minute
> 4: unplug the interface
> 5: wait > one minute
> 6: reattach the interface
> 7: wait > 1 minute
> 
> then send the logfiles along with the mii-diag and vortex-diag
> output when the interface is good and when it's bad.  Instructions
> for this are at http://www.uow.edu.au/~andrewm/linux/vortex.txt
> 
> If you can do all this, we'll get it fixed :)

Now to the actual tests. These are with 'insmod 3c59x debug=7' and 
2.2.18pre19 3c59x.c (I realize this the preferred version for 
neither Donald nor Andrew. I will redo with newer drivers the test 
if you want so.)

1) After insmod. Everything works.

==========================================================================
root@babbage:/root/3c59x>mii-diag -v             
mii-diag.c:v2.00 4/19/2000  Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Using the default interface 'eth0'.
 MII PHY #24 transceiver registers:
   3100 786d 2000 5c01 0141 0021 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0001 8060
   8020 0c78 0000 3000 a3b9 0077 ca05 001b.
 Basic mode control register 0x3100: 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 is generating 10baseT link beat  (no autonegotiation).
 MII PHY #24 transceiver registers:
   3100 786d 2000 5c01 0141 0021 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0001 8060
   8020 0c78 0000 3000 a3b9 0077 af05 001b.
 Basic mode control register 0x3100: Auto-negotiation enabled.
 Basic mode status register 0x786d ... 786d.
   Link status: established.
   Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation complete.
 Vendor ID is 08:00:17:--:--:--, model 0 rev. 1.
   Vendor/Part: National Semiconductor 83840A.
 I'm advertising 0141: 100baseTx-FD 10baseT-FD
   Advertising no additional info pages.
   IEEE 802.3 CSMA/CD protocol.
 Link partner capability is 0021: 10baseT.
   Negotiation did not complete.
==========================================================================

==========================================================================
root@babbage:/root/3c59x>vortex-diag -eeaa
vortex-diag.c:v2.04 1/8/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a 3c905 Boomerang 100baseTx adapter at 0xc400.
The Vortex chip may be active, so FIFO registers will not be read.
To see all register values use the '-f' flag.
Initial window 7, registers values by window:
  Window 0: 0000 0000 0000 0000 0000 00bf ffff 0000.
  Window 1: FIFO FIFO 0000 2000 8000 00ff 13fc 2000.
  Window 2: 6000 0b08 9e99 0000 0000 0000 06c6 4000.
  Window 3: 02d8 0163 0000 0020 e040 0bff 13ff 6000.
  Window 4: 0000 06d0 0000 0cc0 0003 8802 0000 8000.
  Window 5: 1ffc fffc 06c6 0600 0007 06ce 06c6 a000.
  Window 6: 0000 0000 0000 0000 0000 0000 0000 c000.
  Window 7: aac8 0214 0000 0000 8000 00ff 500c e000.
Vortex chip registers at 0xc400
  0xC410: **FIFO** 00000000 00008000 *STATUS*
  0xC420: 00000021 00000000 0f962242 06000024
  0xC430: 00000000 00005313 0214a870 00000000
 Indication enable is 06c6, interrupt enable is 06ce.
 No interrupt sources are pending.
 Transceiver/media interfaces available:  MII.
Transceiver type in use:  MII.
 MAC settings: full-duplex.
Maximum packet size is 0.
 Station address set to 00:60:08:0b:99:9e.
 Configuration options 06c6.
EEPROM contents (64 words, offset 0):
 0x000: 0060 080b 999e 9050 c321 0036 4b4b 6d50
 0x008: 0418 0000 0060 080b 999e 8020 0000 0000
 0x010: 10a6 0000 02d8 0163 0000 0000 0000 009b
 0x018: ffff ffff ffff ffff ffff ffff ffff ffff
 0x020: ffff ffff ffff ffff ffff ffff ffff ffff
 0x028: ffff ffff ffff ffff ffff ffff ffff ffff
 0x030: ffff ffff ffff ffff ffff ffff ffff ffff
 0x038: ffff ffff ffff ffff ffff ffff ffff ffff
 The word-wide EEPROM checksum is 0xe9e0.
Parsing the EEPROM of a 3Com Vortex/Boomerang:
 3Com Node Address 00:60:08:0B:99:9E (used as a unique ID only).
 OEM Station address 00:60:08:0B:99:9E (used as the ethernet address).
 Manufacture date (MM/DD/YYYY) 9/1/1997, division 6, product KK.
Options: force full-duplex.
  Vortex format checksum is correct (009b vs. 009b).
  Cyclone format checksum is incorrect (00 vs. 0xff).
  Hurricane format checksum is incorrect (00 vs. 0xff).
==========================================================================

2) Unplug and replug the cable. Wait a minute before and after replugging.
   the link leds stay off.

==========================================================================
root@babbage:/root/3c59x>mii-diag -v      
mii-diag.c:v2.00 4/19/2000  Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Using the default interface 'eth0'.
 MII PHY #24 transceiver registers:
   3100 7849 2000 5c01 0141 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0001 8060
   8020 0c78 0000 3000 a3b9 0080 8005 001b.
 Basic mode control register 0x3100: Auto-negotiation enabled.
 Basic mode status register 0x7849 ... 7849.
   Link status: not established.
   This transceiver is capable of  100baseTx-FD 100baseTx 10baseT-FD
10baseT.
   Able to perform Auto-negotiation, negotiation not complete.
 MII PHY #24 transceiver registers:
   3100 7849 2000 5c01 0141 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0000 0000
   0000 0000 0000 0000 0000 0000 0001 8060
   8020 0c78 0000 3000 a3b9 0080 8005 001b.
 Basic mode control register 0x3100: Auto-negotiation enabled.
 Basic mode status register 0x7849 ... 7849.
   Link status: not established.
   Capable of  100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Able to perform Auto-negotiation, negotiation not complete.
 Vendor ID is 08:00:17:--:--:--, model 0 rev. 1.
   Vendor/Part: National Semiconductor 83840A.
 I'm advertising 0141: 100baseTx-FD 10baseT-FD
   Advertising no additional info pages.
   IEEE 802.3 CSMA/CD protocol.
 Link partner capability is 0000:.
   Negotiation did not complete.
==========================================================================

==========================================================================
root@babbage:/root/3c59x>vortex-diag -eeaa
vortex-diag.c:v2.04 1/8/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a 3c905 Boomerang 100baseTx adapter at 0xc400.
The Vortex chip may be active, so FIFO registers will not be read.
To see all register values use the '-f' flag.
Initial window 7, registers values by window:
  Window 0: 0000 0000 0000 0000 0000 00bf ffff 0000.
  Window 1: FIFO FIFO 0000 2000 8000 00ff 13fc 2000.
  Window 2: 6000 0b08 9e99 0000 0000 0000 06c6 4000.
  Window 3: 02d8 0163 0000 0020 e040 0bff 13ff 6000.
  Window 4: 0000 06d0 0000 0cc0 0003 8802 0000 8000.
  Window 5: 1ffc fffc 06c6 0600 0007 06ce 06c6 a000.
  Window 6: 0000 0000 0000 0000 0000 0000 0000 c000.
  Window 7: aa08 0214 0000 0000 8000 00ff 500c e000.
Vortex chip registers at 0xc400
  0xC410: **FIFO** 00000000 00008000 *STATUS*
  0xC420: 00000021 00000000 0f962242 06000024
  0xC430: 00000000 000088a8 0214a8b0 00000000
 Indication enable is 06c6, interrupt enable is 06ce.
 No interrupt sources are pending.
 Transceiver/media interfaces available:  MII.
Transceiver type in use:  MII.
 MAC settings: full-duplex.
Maximum packet size is 0.
 Station address set to 00:60:08:0b:99:9e.
 Configuration options 06c6.
EEPROM contents (64 words, offset 0):
 0x000: 0060 080b 999e 9050 c321 0036 4b4b 6d50
 0x008: 0418 0000 0060 080b 999e 8020 0000 0000
 0x010: 10a6 0000 02d8 0163 0000 0000 0000 009b
 0x018: ffff ffff ffff ffff ffff ffff ffff ffff
 0x020: ffff ffff ffff ffff ffff ffff ffff ffff
 0x028: ffff ffff ffff ffff ffff ffff ffff ffff
 0x030: ffff ffff ffff ffff ffff ffff ffff ffff
 0x038: ffff ffff ffff ffff ffff ffff ffff ffff
 The word-wide EEPROM checksum is 0xe9e0.
Parsing the EEPROM of a 3Com Vortex/Boomerang:
 3Com Node Address 00:60:08:0B:99:9E (used as a unique ID only).
 OEM Station address 00:60:08:0B:99:9E (used as the ethernet address).
 Manufacture date (MM/DD/YYYY) 9/1/1997, division 6, product KK.
Options: force full-duplex.
  Vortex format checksum is correct (009b vs. 009b).
  Cyclone format checksum is incorrect (00 vs. 0xff).
  Hurricane format checksum is incorrect (00 vs. 0xff).
==========================================================================

3) Now I did

==========================================================================
root@babbage:/root/3c59x>ifconfig eth0 down
root@babbage:/root/3c59x>mii-diag -rR
Using the default interface 'eth0'.
Resetting the transceiver...
Restarting negotiation...
Basic registers of MII PHY #24:  1200 7849 2000 5c01 01e1 0000 0000 0000.
 Basic mode control register 0x1200: Auto-negotiation enabled.
  Restarted auto-negotiation in progress!
 Basic mode status register 0x7849 ... 7849.
   Link status: not established.
==========================================================================


After a while, the link leds are suddenly on again. And the weird thing is
that after this I can unplug and replug the cables just fine. Before this
the connection failure was 100% reproducible.



-- v --

v@iki.fi