[tulip] Osicom 4 port card and problem with TX

Edmond E. Shwayri eshwayri@nc.rr.com
Sun Dec 22 12:18:02 2002


First off, I would appreciate it if someone could explain and/or point me 
in the right direction as to why all 4 ports should get assigned the same 
interrupt?  Why is this a problem?  If it makes any difference, I am 
running on a Tyan Tomcat IV dual P233MMX which has an Intel HX chipset 
motherboard.    I was reading the archive and I noticed posts in June 
dealing with this topic, but didn't understand the why of the issue.  My 
Osicom card has always shown up as 4 ports each with its own interrupt and 
the ports for the most part work correctly (see below for the single 
problem I am having).  I load my tulip module as follows :

/sbin/modprobe tulip options=3,0,3,3 full_duplex=1,0,1,1

There are 3 active connections to this card.  eth0 is a Cisco switch 
(TX-100 Full Duplex), eth1 is a cable modem (standard 10 Half Duplex), eth 
2 is not used, and eth3 is another Cisco switch (TX-100 Full Duplex).  I 
have to force duplex because the Cisco and the card don't negotiate it 
correctly.

dmesg says :

pci-scan.c:v1.11 8/31/2002  Donald Becker <becker@scyld.com> 
http://www.scyld.co
tulip.c:v0.95f 11/17/2002  Written by Donald Becker <becker@scyld.com>
   http://www.scyld.com/network/tulip.html
eth0: Digital DS21140A Tulip rev 32 at 0xd0c66000, 00:00:BC:11:11:09, IRQ 11.
eth0: Transceiver selection forced to 100baseTx.
eth0:  EEPROM default media type 100baseTx.
eth0:  Index #0 - Media 10baseT (#0) described by a 21140 non-MII (0) block.
eth0:  Index #1 - Media 100baseTx (#3) described by a 21140 non-MII (0) block.
eth0:  Index #2 - Media 10baseT-FDX (#4) described by a 21140 non-MII (0) 
block.
eth0:  Index #3 - Media 100baseTx-FDX (#5) described by a 21140 non-MII (0) 
bloc
eth1: Digital DS21140A Tulip rev 32 at 0xd0c68000, 00:00:BC:11:11:0A, IRQ 10.
eth1:  EEPROM default media type Autosense.
eth1:  Index #0 - Media 10baseT (#0) described by a 21140 non-MII (0) block.
eth1:  Index #1 - Media 100baseTx (#3) described by a 21140 non-MII (0) block.
eth1:  Index #2 - Media 10baseT-FDX (#4) described by a 21140 non-MII (0) 
block.
eth1:  Index #3 - Media 100baseTx-FDX (#5) described by a 21140 non-MII (0) 
bloc
eth2: Digital DS21140A Tulip rev 32 at 0xd0c6a000, 00:00:BC:11:11:0B, IRQ 15.
eth2: Transceiver selection forced to 100baseTx.
eth2:  EEPROM default media type 100baseTx.
eth2:  Index #0 - Media 10baseT (#0) described by a 21140 non-MII (0) block.
eth2:  Index #1 - Media 100baseTx (#3) described by a 21140 non-MII (0) block.
eth2:  Index #2 - Media 10baseT-FDX (#4) described by a 21140 non-MII (0) 
block.
eth2:  Index #3 - Media 100baseTx-FDX (#5) described by a 21140 non-MII (0) 
bloc
eth3: Digital DS21140A Tulip rev 32 at 0xd0c6c000, 00:00:BC:11:11:0C, IRQ 12.
eth3: Transceiver selection forced to 100baseTx.
eth3:  EEPROM default media type 100baseTx.
eth3:  Index #0 - Media 10baseT (#0) described by a 21140 non-MII (0) block.
eth3:  Index #1 - Media 100baseTx (#3) described by a 21140 non-MII (0) block.
eth3:  Index #2 - Media 10baseT-FDX (#4) described by a 21140 non-MII (0) 
block.
eth3:  Index #3 - Media 100baseTx-FDX (#5) described by a 21140 non-MII (0) 
bloc
eth3: Using user-specified media 100baseTx.
eth0: Using user-specified media 100baseTx.

tulip-diag says :

tulip-diag.c:v2.09 1/28/2002 Donald Becker (becker@scyld.com)
  http://www.scyld.com/diag/index.html
Index #1: Found a Digital DS21140 Tulip adapter at 0xd000.
  Port selection is 100mbps-SYM/PCS 100baseTx scrambler, full-duplex.
  Transmit started, Receive started, full-duplex.
   The Rx process state is 'Waiting for packets'.
   The Tx process state is 'Idle'.
   The transmit threshold is 128.
Index #2: Found a Digital DS21140 Tulip adapter at 0xd400.
  Port selection is 10mpbs-serial, 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 72.
Index #3: Found a Digital DS21140 Tulip adapter at 0xd800.
  Port selection is 10mpbs-serial, half-duplex.
  Transmit stopped, Receive stopped, half-duplex.
   The Rx process state is 'Stopped'.
   The Tx process state is 'Stopped'.
   The transmit threshold is 72.
Index #4: Found a Digital DS21140 Tulip adapter at 0xdc00.
  Port selection is 100mbps-SYM/PCS 100baseTx scrambler, full-duplex.
  Transmit started, Receive started, full-duplex.
  The Rx process state is 'Waiting for packets'. The Tx process state is 
'Idle'.
  The transmit threshold is 1024.

porenn:/proc# cat interrupts
            CPU0       CPU1
   0:     103018      97492    IO-APIC-edge  timer
   1:        242        246    IO-APIC-edge  keyboard
   2:          0          0          XT-PIC  cascade
   5:        120        135    IO-APIC-edge  wavelan2_cs
   8:          1          0    IO-APIC-edge  rtc
  10:      49761      49441   IO-APIC-level  aic7xxx, eth1
  11:         79         52   IO-APIC-level  aic7xxx, eth0
  12:     152738     153145   IO-APIC-level  eth3
  13:          1          0          XT-PIC  fpu
  14:          8          6    IO-APIC-edge  ide0
  15:       4803       4951   IO-APIC-level  ide2, ide3, aic7xxx
NMI:          0
ERR:          0

The 2 things to note are :
[1] The aic7xxx is coming from an Adaptec 3985 which is also a PCI-PCI 
bridge.  At the bottom of my message I will include my /proc/pci.
[2] I also have an eth4 which is an Orinoco Wavelan card in an ISA->PCMCIA 
card.  Its importance will become apparent shortly.

The 3 ports for the most part work well.  The interrupts route 
correctly.  In fact I am currently using that machine as my firewall and 
this message will route from this NT computer out to the Linux computer 
through eth3 then out eth1.  I do not notice this problem when doing 
standard web stuff.  This is what works well :

Copying small files to the computer with the Osicom.
Copying large files to the computer with the Osicom.
Copying small files (< 20 Megs) from the computer with the Osicom.

What doesn't work :

Copying large files (> 20 Megs) from the computer with the Osicom.

I have tried Samba (pulling from the computer), smbfs (pushing out from the 
computer), and ftp.  All behave the same way.  About 30 - 50 Megs into the 
transmission of the large file, the hard drive light goes out and the 
transfer freezes.  If I am using ftpd nothing happens until I manually 
abort.  If I am using Samba a minute later Samba says "Broken Pipe" and 
closes the connection.  Windows then aborts the copy.  If there is more 
than 1 file to copy Windows re-establishes the SMB connection and starts 
transferring the second file.  It makes it almost look like a software 
error.  The fact that ftpd and Samba are both doing this is what is giving 
me pause.  While the transfer is frozen I can still ping the machines and 
they still route packets between them.  It is only the transfer that is frozen.

So in short, my Osicom card has no problem with the RX in any 
quantity.  Its problem seems to be when the Linux computer is TXing a large 
amount of data (streaming) on any of the Osicom's ports.  Its almost like a 
buffer gets full and then things just FUBAR.  I don't know what to look for 
to determine if this is in the tulip or if my libc is broken.

This problem does not show itself with eth4 which is the ISA->WaveLan 
adapter.  This is a slower interface so that may have something to do with 
it to.

I am running Linux 2.2.21 and here is my /proc/pci

PCI devices found:
   Bus  0, device   0, function  0:
     Host bridge: Intel 82439HX Triton II (rev 3).
       Medium devsel.  Master Capable.  Latency=64.
   Bus  0, device   7, function  0:
     ISA bridge: Intel 82371SB PIIX3 ISA (rev 1).
       Medium devsel.  Fast back-to-back capable.  Master Capable.  No bursts.
   Bus  0, device   7, function  1:
     IDE interface: Intel 82371SB PIIX3 IDE (rev 0).
       Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=64.
       I/O at 0xf000 [0xf001].
   Bus  0, device  17, function  0:
     PCI bridge: DEC DC21052 (rev 1).
       Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=64.
   Bus  0, device  18, function  0:
     PCI bridge: DEC DC21050 (rev 2).
       Medium devsel.  Fast back-to-back capable.  Master Capable.  Latency=64.
   Bus  0, device  19, function  0:
     Unknown mass storage controller: Promise Technology Unknown device 
(rev 1).
       Vendor id=105a. Device id=4d38.
       Medium devsel.  IRQ 15.  Master Capable.  Latency=64.
       I/O at 0x6400 [0x6401].
       I/O at 0x6800 [0x6801].
       I/O at 0x6c00 [0x6c01].
       I/O at 0x7000 [0x7001].
       I/O at 0x7400 [0x7401].
       Non-prefetchable 32 bit memory at 0xe3000000 [0xe3000000].
   Bus  0, device  20, function  0:
     VGA compatible controller: Matrox Millennium II (rev 0).
       Medium devsel.  Fast back-to-back capable.  IRQ 10.  Master 
Capable.  Late
       Prefetchable 32 bit memory at 0xe0000000 [0xe0000008].
       Non-prefetchable 32 bit memory at 0xe1000000 [0xe1000000].
       Non-prefetchable 32 bit memory at 0xe2000000 [0xe2000000].
   Bus  2, device   4, function  0:
     Ethernet controller: DEC DC21140 (rev 32).
       Medium devsel.  Fast back-to-back capable.  IRQ 11.  Master 
Capable.  Late
       I/O at 0xd000 [0xd001].
       Non-prefetchable 32 bit memory at 0xd0000000 [0xd0000000].
   Bus  2, device   5, function  0:
     Ethernet controller: DEC DC21140 (rev 32).
       Medium devsel.  Fast back-to-back capable.  IRQ 10.  Master 
Capable.  Late
       I/O at 0xd400 [0xd401].
       Non-prefetchable 32 bit memory at 0xd0001000 [0xd0001000].
   Bus  2, device   6, function  0:
     Ethernet controller: DEC DC21140 (rev 32).
       Medium devsel.  Fast back-to-back capable.  IRQ 15.  Master 
Capable.  Late
       I/O at 0xd800 [0xd801].
       Non-prefetchable 32 bit memory at 0xd0002000 [0xd0002000].
   Bus  2, device   7, function  0:
     Ethernet controller: DEC DC21140 (rev 32).
       Medium devsel.  Fast back-to-back capable.  IRQ 12.  Master 
Capable.  Late
       I/O at 0xdc00 [0xdc01].
       Non-prefetchable 32 bit memory at 0xd0003000 [0xd0003000].
   Bus  1, device   1, function  0:
     SCSI storage controller: Adaptec AIC-7873 (rev 3).
       Medium devsel.  Fast back-to-back capable.  IRQ 11.  Master 
Capable.  Late
       I/O at 0xe000 [0xe001].
       Non-prefetchable 32 bit memory at 0xd8000000 [0xd8000000].
   Bus  1, device   2, function  0:
     SCSI storage controller: Adaptec AIC-7873 (rev 3).
       Medium devsel.  Fast back-to-back capable.  IRQ 10.  Master 
Capable.  Late
       I/O at 0xe400 [0xe401].
       Non-prefetchable 32 bit memory at 0xd8001000 [0xd8001000].
   Bus  1, device   3, function  0:
     SCSI storage controller: Adaptec AIC-7873 (rev 3).
       Medium devsel.  Fast back-to-back capable.  IRQ 15.  Master 
Capable.  Late
       I/O at 0xe800 [0xe801].
       Non-prefetchable 32 bit memory at 0xd8002000 [0xd8002000].

warning: page-size limit reached!

The Lat for the DECs are 40 and are 8 for the Adaptec.