NetBSD Problem Report #24614

Received: (qmail 21074 invoked by uid 605); 1 Mar 2004 09:55:42 -0000
Message-Id: <20040301095540.02EE611154@narn.netbsd.org>
Date: Mon,  1 Mar 2004 09:55:40 +0000 (UTC)
From: james@jmsh.net
Sender: gnats-bugs-owner@NetBSD.org
Reply-To: james@jmsh.net
To: gnats-bugs@gnats.NetBSD.org
Subject: sip0: suffers 'transmit FIFO underrun' on 1.6.2RC4 with NetGear FA311
X-Send-Pr-Version: www-1.0

>Number:         24614
>Category:       port-i386
>Synopsis:       sip0: suffers 'transmit FIFO underrun' on 1.6.2RC4 with NetGear FA311
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-i386-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Mar 01 09:56:00 +0000 2004
>Closed-Date:    
>Last-Modified:  
>Originator:     James Burton
>Release:        1.6.2RC4
>Organization:
>Environment:
NetBSD artworks 1.6.2 NetBSD 1.6.2 (JARTZ) #0: Mon Mar  1 20:23:32 EST 2004     james@artworks:/usr/src/sys/arch/i386/compile/JARTZ i386

>Description:
I've just installed a NetGear FA311, adjusted kernel config and ...

sip0 at pci0 dev 10 function 0: NatSemi DP83815 10/100 Ethernet, rev 00
sip0: interrupting at irq 3
sip0: Ethernet address 00:09:5b:60:7e:3e
nsphyter0 at sip0 phy 0: DP83815 10/100 media interface, rev. 1
nsphyter0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto

Except that ...

Feb 29 18:25:09 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1536 bytes
Feb 29 18:25:18 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1568 bytes
Feb 29 18:25:20 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1600 bytes
Feb 29 18:25:21 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1632 bytes
Feb 29 18:25:22 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1664 bytes
Feb 29 18:25:24 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1696 bytes
Feb 29 18:25:25 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1728 bytes
Feb 29 18:25:27 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1760 bytes
Feb 29 18:25:28 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1792 bytes
Feb 29 18:25:29 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1824 bytes
Feb 29 18:25:31 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1856 bytes
Feb 29 18:25:33 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1888 bytes
Feb 29 18:25:34 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1920 bytes
Feb 29 18:25:35 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1952 bytes
Feb 29 18:25:36 artworks /netbsd: sip0: transmit FIFO underrun; increasing Tx dr
ain threshold to 1984 bytes
Feb 29 18:25:37 artworks /netbsd: sip0: transmit FIFO underrun
Feb 29 18:25:56 artworks last message repeated 12 times 

I'll update my kernel sources, and try the relevant files from current.
Seems somewhat similar to PR14965 & PR13406, has something occurred recently
that makes this happen again?


and then 
On 29-Feb-04 Dion van der Grijp <dvdgrijp@mbox3.singnet.com.sg> wrote:

You may want to take a look at PR-13770 (too).  I experienced the same
"transmit FIFO underrun" with the sip0 driver on a freshly installed NetBSD
1.6.1 system, and found that the fix described in PR-13770 worked.

Strangely, PR-13770 was closed based on feedback from the original poster
stating that "...defaults used in 1.6.1 fix the problem."  But, I still
encountered the same symptoms after installing 1.6.1.  In fact, I subsequently
fetched a later version of the if_sip.c module (around Oct 2003), rebuilt the
kernel using that, and found that the problem was still there.

The fix described in PR-13770 seems to be on the mark, because it definitely
works in my case - and has been working ever since.  Why don't you give it
a try?  I'm hoping this will be resolved once and for all when 1.6.2 is
formally released.

Regards,
Dion

(James again)
I changed the main line from PR13770

james@artworks::/var/tmp/test/x/src/sys/dev/pci [109] diff if_sip.c /usr/src/sys/dev/pci
990c990,991
<       sc->sc_tx_fill_thresh = 64 / 32;
---
>       /* :jb */
>       sc->sc_tx_fill_thresh = 256 / 32;

compile kernel, replace & reboot.

Now the underruns have gone, we now have

Mar  1 20:43:41 artworks /netbsd: sip0: frame alignment error
Mar  1 20:43:43 artworks /netbsd: sip0: frame alignment error

I wish I knew how to debug this stuff :-(

Thanks,
James
>How-To-Repeat:
install 1.6.2RC4,
install NetGear FA311
try to play an mp3 file over samba (or any significant packet load
FTP would do)
watch the kernel logs.
>Fix:
as described, adjust dev/pci/if_sip.c
or possibly use a different NIC driver.
>Release-Note:
>Audit-Trail:
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.