[vortex] Problem with 3com 10/100 Mini PCI adapter (3c556B?) under 2.2.19

Akihiko YAMAMOTO (=?iso-2022-jp?B?GyRCOzNLXExASScbKEI=?=) star@eos.hokudai.ac.jp
Wed, 04 Jul 2001 16:11:16 +0900 (JST)


Hi All,

Please allow me to post a long e-mail.

I'm using a Linux on my laptop PC described below and I've been
struggling with the problem that the 3Com Internal Ethernet
Adapter on my PC doesn't work with Linux. I confirmed this
adapter works properly under Windows ME.

=======================================================================
PC name:      NEC LaVie PC-LG10JWX57 (laptop PC)
CPU:          Pentium-III 1 GHz
LAN:          3Com 10/100 Mini PCI Ethernet Adapter (Windows ME says :-)
MODEM:        56 kbps modem (Internal)
OS:           Linux (kernel: 2.2.19) + Windows ME (multi boot by lilo)
=======================================================================

I'm running a Japanese Vine Linux package whose configuration is
very similar to that of Red Hat Linux.  

I installed the "3c59x" module that comes with the kernel (2.2.19)
and added the following line to /etc/modules.conf on my Linux box:

alias eth0 3c59x

After reboot, syslogs ("dmesg" "cat /proc/pci" and "ifconfig -a") say:

===== dmesg ===========================================================
3c59x.c 18Feb01 Donald Becker and others http://www.scyld.com/network/vortex.html
  The PCI BIOS has not enabled the device at 0/48. Updating PCI command 0013->0017.
eth0: 3Com 3c556B Laptop Hurricane at 0x1800,  00:01:03:87:ed:c1, IRQ 10
eth0: CardBus functions mapped fc000000->90044000 (PCMCIA committee brain-damage).
  8K byte-wide RAM 5:3 Rx:Tx split, MII interface.
  MII transceiver found at address 0, status 7849.
  Enabling bus-master transmits and whole-frame receives.
eth0: Initial media type MII.
eth0: MII #0 status 7849, link partner capability 0001, setting half-duplex.
=======================================================================

===== cat /proc/pci ===================================================
  Bus  0, device   6, function  0:
    Ethernet controller: 3Com Unknown device (rev 32).
      Vendor id=10b7. Device id=6056.
      Medium devsel.  IRQ 10.  Master Capable.  Latency=80.  Min Gnt=10.Max Lat=10.
      I/O at 0x1800 [0x1801].
      Non-prefetchable 32 bit memory at 0xfc000400 [0xfc000400].
      Non-prefetchable 32 bit memory at 0xfc000000 [0xfc000000].
=======================================================================

====== ifconfig -a ====================================================
eth0      Link encap:Ethernet  HWaddr 00:01:03:87:ED:C1
          inet addr:133.50.136.189  Bcast:133.50.136.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:950 errors:0 dropped:0 overruns:0 carrier:950
          collisions:0 txqueuelen:100 
          Interrupt:10 Base address:0x1800 

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


The above syslogs show:

    o Adapter looks like 3c556B (PCI Device id=6056),
    o Card initialization seems fine,
    o Setup with ip-addressing is also fine,
    o "ifconfig" seems it up,
    o There only is a TX-count >0 while the RX-count stays 0,
    o No overruns, collisions or errors

Thus, everything appears to be fine, but no network connection
is established at all!  "ping" doesn't respond anything.
I checked every module is successfully loaded and the network
configuration is correct.

=======================================================================
% cat /proc/modules
soundcore               3024   0 (autoclean) (unused)
ds                      6416   2
i82365                 22544   2
pcmcia_core            45888   0 [ds i82365]
autofs                  9488   1 (autoclean)
lockd                  45328   0 (autoclean) (unused)
sunrpc                 64496   0 (autoclean) [lockd]
3c59x                  21680   1 (autoclean)
nls_cp437               3920   1 (autoclean)
vfat                    9744   1 (autoclean)
fat                    31040   1 (autoclean) [vfat]
usb-uhci               19040   0 (unused)
agpgart                19920   0 (unused)

% cat /proc/interrupts 
           CPU0
  0:     576675          XT-PIC  timer
  1:       3417          XT-PIC  keyboard
  2:          0          XT-PIC  cascade
  5:          0          XT-PIC  usb-uhci
  8:          1          XT-PIC  rtc
 10:       3398          XT-PIC  eth0, i82365
 12:      20189          XT-PIC  PS/2 Mouse
 13:          1          XT-PIC  fpu
 14:      12905          XT-PIC  ide0
 15:          3          XT-PIC  ide1
NMI:          0
=======================================================================


Yesterday, I happened to find that in some _RESTRICTED_ cases
the network is up and everything goes well with Linux!!
(but this is not a solution to the problem...)

Here I explain two cases in which the network works properly
with Linux <case (a)> and not <case (b)>. My PC is connected to
a HUB by CentreCOM (FS716XJ).

case (a): (Network is OK)
^^^^^^^^^^^^^^^^^^^^^^^^^

(1) First, Boot Windows ME on my PC. Of course, at this time,
    the network is up with 3com internal adapter and everything
    is ok.

(2) Then, select "reboot" (not shutdown!) from the Windows
    termination menu without shutting off the power and
    switching to Linux (by lilo). While booting Linux at this
    time, network link button on the hub stays ON.  Finally,
    Linux starts to run and network is also up and everything is
    fine !!

(3) Then, rebooting Linux repeatedly using lilo shows no problem
    (network is always up and runs without any problems!!)

(1)->(2)->(3)->(3)->(3)->(3)... give no problems about my 3com
internal adapter with Linux. Network is very fine in case (a).
This is a very restricted case in which the network on my laptop
runs properly with Linux, but I have to boot Windows ME first :-(


case (b): (Network doesn't work properly)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

(1) First, Boot Windows ME <Same as (1) above>

(2) Then, shut Windows ME down from the termination menu and cut
    off the power supply on PC. Note that, at this time, network
    link button on the hub turns OFF.  Then, booting Linux (by
    lilo) never gets network up. (sigh...)
     
(3) After (2), rebooting Linux repeatedly using lilo doesn't fix
    the problem at all.

(1)+(2) in case (b) exactly coincide with an extremely normal
case in which we boot linux from the condition that the power
supply on PC is off or any OS is not running. However,
(1)->(2)->(3)->(3)->(3)... in case (b) show that the network
set-ups always fail and no network connection is established on
my PC.



The above results indicate that the Linux driver ("3c59x") is not
initializing my 3com internal adapter correctly (i.e., the Linux
driver is _NOT_ doing something that should be done to activate
the adapter), but the Windows ME driver is.  And I think some
parts of card initialization processes by Windows ME are being
kept during reboot. So in case (a);

     o Windows ME initializes the adapter correctly.
     o The state is kept during reboot.
     o The Linux driver does not initialize something that's
       needed, but since Windows already initialized it, it works.

I think this is a clue to solve the problem but I don't know how
to fix this. 

According to suggestions by Fred Maciel (fred-m@crl.hitachi.co.jp), 
I attached below diagnostic messages by "mii-diag" and "vortex-diag" 
from ftp://ftp.scyld.com/pub/diag/ for both cases (a) and (b).


Diagnostic messages in case (b) --> Network doesn't work properly!

****************************************************************************
(network doesn't work properly!)

# ./vortex-diag -aaeemm
vortex-diag.c:v2.05 5/15/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a 3c566 Laptop Tornado adapter at 0x1800.
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: 00ec 0000 e062 0000 0000 01f5 00aa 0000.
  Window 1: FIFO FIFO 0700 0000 0000 007f 0000 2000.
  Window 2: 0100 8703 c1ed 0000 0000 0000 0010 4000.
  Window 3: 0040 0060 05ea 0020 0040 1000 0800 6000.
  Window 4: 0000 0000 0000 0cd0 0003 8000 0000 8000.
  Window 5: 1ffc 0000 0000 0600 0807 06ce 06c6 a000.
  Window 6: 0000 0000 0000 0000 0000 0000 00b4 c000.
  Window 7: 0000 0000 0000 0000 0000 0000 0000 e000.
Vortex chip registers at 0x1800
  0x1810: **FIFO** 00000000 0000000a *STATUS*
  0x1820: 00000020 00000000 00080000 00000004
  0x1830: 00000000 02b9fd47 0e479800 00080004
 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.
 Station address set to 00:01:03:87:ed:c1.
 Configuration options 0010.
EEPROM contents (64 words, offset 0x30):
 0x000: 2978 6056 0040 8060 0040 0000 0000 0080
 0x008: 0000 0000 0000 0000 0000 0000 0000 0000
 0x010: 0000 0000 0000 0000 0000 0000 10b7 6556
 0x018: 0000 0000 0000 0000 0000 0000 0000 0a0a
 0x020: ff29 2829 0008 0000 0000 0000 0000 0000
 0x028: 0000 ff01 0000 0000 0000 0000 0000 0000
 0x030: 0001 0387 edc1 6056 0061 0009 0000 6d50
 0x038: 2970 0009 0001 0387 edc1 0010 0000 00aa
 The word-wide EEPROM checksum is 0x8c75.
Saved EEPROM settings of a 3Com Vortex/Boomerang:
 The CardBus product ID is 2978 6056.
 3Com Node Address 00:01:03:87:ED:C1 (used as a unique ID only).
 OEM Station address 00:01:03:87:ED:C1 (used as the ethernet address).
 Manufacture date (MM/DD/YYYY) 3/1/2000, division 	, product 
 Options: negotiated duplex, link beat required.
  Vortex format checksum is incorrect (0089 vs. 0000).
  Cyclone format checksum is incorrect (0x89 vs. 00).
  Hurricane format checksum is incorrect (0x89 vs. 00).
 MII PHY found at address 0, status 7849.
 MII PHY 0 at #0 transceiver registers:
   3000 7849 0022 561b 0141 0001 0004 2001
   ffff ffff ffff ffff ffff ffff ffff ffff
   01c0 0000 0000 8020 4f02 0304 0026 0000
   0000 bfbf 0000 ffff ffff ffff ffff ffff.
****************************************************************************
(network doesn't work properly!)

# ./mii-diag -v 
mii-diag.c:v2.02 5/21/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
 Basic mode control register 0x3000: 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.
   End of basic transceiver informaion.

 MII PHY #0 transceiver registers:
   3000 7849 0022 561b 0141 0001 0004 2001
   ffff ffff ffff ffff ffff ffff ffff ffff
   01c0 0000 0000 8020 4f02 0304 0026 0000
   0000 bfbf 0000 ffff ffff ffff ffff ffff.
 Basic mode control register 0x3000: 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 00:08:95:--:--:--, model 33 rev. 11.
   Vendor/Part: AdHoc Technology AH101LF.
 I'm advertising 0141: 100baseTx-FD 10baseT-FD
   Advertising no additional info pages.
   IEEE 802.3 CSMA/CD protocol.
 Link partner capability is 0001:.
   Negotiation did not complete.
  TDK format vendor-specific registers 16..18 are 0x01c0 0x0000 0x0000
      Link polarity is detected as normal.
      Auto-negotiation complete, 10Mbps half duplex.
      Rx link in fail state, PLL locked.
      No new link status events.
****************************************************************************



Diagnostic messages in case (a) --> Network works properly!

****************************************************************************
(network works properly!)

# ./vortex-diag -aaeemm
vortex-diag.c:v2.05 5/15/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
Index #1: Found a 3c566 Laptop Tornado adapter at 0x1800.
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: 09fc 0000 e061 0000 0000 01f5 00aa 0000.
  Window 1: FIFO FIFO 0700 0000 0000 007f 0000 2000.
  Window 2: 0100 8703 c1ed 0000 0000 0000 0010 4000.
  Window 3: 0040 0080 05ea 0120 0040 1000 0800 6000.
  Window 4: 0000 0000 0000 0cd0 0003 8840 0000 8000.
  Window 5: 1ffc 0000 0000 0600 0807 06ce 06c6 a000.
  Window 6: 0000 0000 0000 4500 0000 1362 0000 c000.
  Window 7: 0000 0000 0000 0000 0000 0000 0000 e000.
Vortex chip registers at 0x1800
  0x1810: **FIFO** 00000000 00000013 *STATUS*
  0x1820: 00000020 00000000 00080000 00000004
  0x1830: 00000000 a70c4651 0e479910 00080004
 Indication enable is 06c6, interrupt enable is 06ce.
 No interrupt sources are pending.
 Transceiver/media interfaces available:  MII.
Transceiver type in use:  Autonegotiate.
 MAC settings: full-duplex, 802.1Q flow control.
 Station address set to 00:01:03:87:ed:c1.
 Configuration options 0010.
EEPROM contents (64 words, offset 0x30):
 0x000: 2978 6056 0040 8060 0040 0000 0000 0080
 0x008: 0000 0000 0000 0000 0000 0000 0000 0000
 0x010: 0000 0000 0000 0000 0000 0000 10b7 6556
 0x018: 0000 0000 0000 0000 0000 0000 0000 0a0a
 0x020: ff29 2829 0008 0000 0000 0000 0000 0000
 0x028: 0000 ff01 0000 0000 0000 0000 0000 0000
 0x030: 0001 0387 edc1 6056 0061 0009 0000 6d50
 0x038: 2970 0009 0001 0387 edc1 0010 0000 00aa
 The word-wide EEPROM checksum is 0x8c75.
Saved EEPROM settings of a 3Com Vortex/Boomerang:
 The CardBus product ID is 2978 6056.
 3Com Node Address 00:01:03:87:ED:C1 (used as a unique ID only).
 OEM Station address 00:01:03:87:ED:C1 (used as the ethernet address).
 Manufacture date (MM/DD/YYYY) 3/1/2000, division 	, product 
 Options: negotiated duplex, link beat required.
  Vortex format checksum is incorrect (0089 vs. 0000).
  Cyclone format checksum is incorrect (0x89 vs. 00).
  Hurricane format checksum is incorrect (0x89 vs. 00).
 MII PHY found at address 0, status 786d.
 MII PHY 0 at #0 transceiver registers:
   3000 786d 0022 561b 0141 41e1 0005 2801
   ffff ffff ffff ffff ffff ffff ffff ffff
   01c0 0000 0e99 8020 4f22 0304 0026 0002
   0025 cfbf 0000 ffff ffff ffff ffff ffff.
****************************************************************************
(network works properly!)

# ./mii-diag -v
mii-diag.c:v2.02 5/21/2001 Donald Becker (becker@scyld.com)
 http://www.scyld.com/diag/index.html
 The autonegotiated capability is 0140.
The autonegotiated media type is 100baseTx-FD.
 Basic mode control register 0x3000: 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.
   End of basic transceiver informaion.

 MII PHY #0 transceiver registers:
   3000 786d 0022 561b 0141 41e1 0005 2801
   ffff ffff ffff ffff ffff ffff ffff ffff
   01c0 0000 0e99 8020 4f22 0304 0026 0002
   0025 cfbf 0000 ffff ffff ffff ffff ffff.
 Basic mode control register 0x3000: 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 00:08:95:--:--:--, model 33 rev. 11.
   Vendor/Part: AdHoc Technology AH101LF.
 I'm advertising 0141: 100baseTx-FD 10baseT-FD
   Advertising no additional info pages.
   IEEE 802.3 CSMA/CD protocol.
 Link partner capability is 41e1: 100baseTx-FD 100baseTx 10baseT-FD 10baseT.
   Negotiation  completed.
  TDK format vendor-specific registers 16..18 are 0x01c0 0x0000 0x0e99
      Link polarity is detected as normal.
      Auto-negotiation complete, 100Mbps full duplex.
      Rx link in pass state, PLL locked.
      No new link status events.
****************************************************************************

My goal is to setup my Linux box in order for the internal 3com
adapter to work properly in case (b) on my laptop.

Does anyone know some idea to fix this problem?

Thanks in advance.

Regards,

-- 
Akihiko
star@eos.hokudai.ac.jp
---------------------------------------
Fatal Error # 0x155 : Windows not found.
(C)heer  (P)arty  (D)ance