Bug 13062

Summary: lnc ethernet xmit underflow problem
Product: Base System Reporter: Rajit Manohar <rajit>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.2-RELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Rajit Manohar 1999-08-11 02:20:00 UTC
The PCI lnc driver on the Kayak reports transmit underflow errors. The
following message appears on console repeatedly:

Aug  6 12:00:00 <host> /kernel: lnc1: Transmit underflow error -- Resetting

The system also exhibits poor throughput; an ftp between two Kayaks
results in transmit rates of between 300KB/sec and 700KB/sec, well
below the 100Mbps transfer rate.

Fix: It appears that under certain cases, the data being transferred from
memory to the nic does not arrive in time for the transmitter,
resulting in the underflow. The Am79C972 nic has a bus control bit
that can be set to prevent any message transmits until the entire
message is DMAed to the network card SRAM. Setting this bit solves
both the transmit underflow problem as well as the throughput problem,
since the card is no longer periodically reset. I've included a patch
for i386/isa/if_lnc.c for 3.2-RELEASE.

I check that the nic # is > PCnet_FAST (i.e. == PCnet_FASTplus) before 
changing the bus control register. This might work on the Am79C97x,
but I only have Am79C972 nics.

After the modifications, I no longer get any transmit underflow
errors, and I can ftp files at 10MB/sec between the Kayaks. :)

-Rajit Manohar <rajit@csl.cornell.edu>

How-To-Repeat: 
ftp a file (like /kernel) from one machine to another. Any sustained
network activity results in the above problem.
Comment 1 klui 1999-10-09 20:33:00 UTC
I have experienced the same thing on my Kayak XU. While it doesn't have
an Am79C972, it has instead a Symbios/NCR ultra-wide SCSI/PCnet-FAST
ethernet combination card. The 971's data sheet says it has the same
NOUFLO control bit. Making your patch work with 971 and above chipssets
requires changing:

     if (sc->nic.ic > PCnet_FAST)

to

     if (sc->nic.ic==PCnet_FAST || sc->nic.ic==PCnet_FASTplus)


Ken
p.s. This bit is only applicable to the 971, 972, 973/975
(PCnetFastIII)--not the 970A (and assuming 970, since there's no
datasheet for it currently at AMD's website).

Relevant kernel messages:

     Probing for devices on PCI bus 2:
     ncr0: <ncr 53c875 fast20 wide scsi> rev 0x26 int a irq 11 on
pci2.4.0
     lnc1: <PCNet/PCI Ethernet adapter> rev 0x25 int a irq 11 on
pci2.5.0
     lnc1: PCnet-FAST address [. . .]
Comment 2 iedowse freebsd_committer freebsd_triage 2001-12-02 19:23:42 UTC
State Changed
From-To: open->feedback


Does this problem still occur in more recent releases?
Comment 3 Crist J. Clark freebsd_committer freebsd_triage 2002-03-26 12:59:02 UTC
State Changed
From-To: feedback->closed

Feedback timeout.