Pcnet32 troubles...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hi,

	I just updated one of my PCs to 2.2.14 and I have trouble with
the pcnet32 driver. The same driver was working fine in 2.2.13. I
didn't had the chance to try 2.3.X on this box (for some reasons, I
still need 2.2.X).

Problem :
-------
	The card locks up intermitently, quite often (every few min or
so - very annoying for X apps). The kernel message is :

eth0: transmit timed out, status 007b, resetting.
eth0: transmit timed out, status 007b, resetting.
eth0: transmit timed out, status 007b, resetting.
eth0: transmit timed out, status 007b, resetting.
eth0: transmit timed out, status 007b, resetting.
eth0: transmit timed out, status 007b, resetting.

The card :
--------
	The chipset is integrated on the motherboard :

  Bus  0, device  20, function  0:
    Ethernet controller: AMD 79C970 (rev 38).
      Medium devsel.  Fast back-to-back capable.  IRQ 11.  Master Capable.  Latency=64.  Min Gnt=6.Max Lat=255.
      I/O at 0x6800 [0x6801].
      Non-prefetchable 32 bit memory at 0xe1000000 [0xe1000000].

pcnet32.c: PCI bios is present, checking for devices... 
Found PCnet/PCI at 0x6800, irq 11. 
eth0: PCnet/FAST 79C971 at 0x6800, 00 20 0c 10 56 02 
    tx_start_pt(0x0400):  64 bytes, BCR18(9861):BurstWrEn BurstRdEn NoUFlow  
    SRAMSIZE=0x0000, SRAM_BND=0x4000, assigned IRQ 11. 
pcnet32.c:v1.25kf 26.9.1999 tsbogend@alpha.franken.de 

The box :
-------
	P-MMX 233, Intel chipset (with ACPI), usual stuff, sound,
flash disk, IrDA stack... No other device is on irq11.
	Kernel taylored for the box, compiled NON-SMP. Pcnet32
compiled as a module and auto loaded.


	Note : I sent the message to all of you because I believe that
you have touched the driver recently. Sorry for the excess traffic...

	Jean

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pcnet32-2.txt"

>From hub-fue!alpha.franken.de!tsbogend@rachael.franken.de Fri Jan 14 14:42:17 PST 2000
Received: from hplms26.hpl.hp.com (hplms26.hpl.hp.com [15.255.168.31])
	by rockfort.hpl.hp.com (8.8.6 (PHNE_17190)/8.8.6 HPLabs Workstation) with ESMTP id OAA02140
	for <jeant@rockfort.hpl.hp.com>; Fri, 14 Jan 2000 14:42:16 -0800 (PST)
Received: from rachael.franken.de (rachael.franken.de [193.175.24.38])
	by hplms26.hpl.hp.com (8.9.3 (PHNE_18979)/HPL-PA Relay) with ESMTP id OAA15920
	for <jeant@rockfort.hpl.hp.com>; Fri, 14 Jan 2000 14:29:05 -0800 (PST)
Received: from hub-fue by rachael.franken.de
	via rmail with uucp
	id <m129F9W-0027dhC@rachael.franken.de>
	for rockfort.hpl.hp.com!jeant; Fri, 14 Jan 2000 23:25:06 +0100 (MET)
	(Smail-3.2 1996-Jul-4 #4 built DST-Sep-8)
Received: by hub-fue.franken.de (Smail3.1.29.1 #35)
	id m129F9O-002OspC; Fri, 14 Jan 100 23:24 MET
Received: (from tsbogend@localhost)
	by alpha.franken.de (8.8.7/8.8.5) id XAA01906;
	Fri, 14 Jan 2000 23:23:21 +0100
Date: Fri, 14 Jan 2000 23:23:21 +0100
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Jean Tourrilhes <jeant@rockfort.hpl.hp.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>, kaf@fc.hp.com
Subject: Re: Pcnet32 troubles...
Message-ID: <20000114232321.B1888@alpha.franken.de>
References: <20000114135947.A2095@rockfort.hpl.hp.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4us
In-Reply-To: <20000114135947.A2095@rockfort.hpl.hp.com>; from Jean Tourrilhes on Fri, Jan 14, 2000 at 01:59:47PM -0800
Status: RO
X-Status: A
Content-Length: 1024
Lines: 25

On Fri, Jan 14, 2000 at 01:59:47PM -0800, Jean Tourrilhes wrote:
> 	I just updated one of my PCs to 2.2.14 and I have trouble with
> the pcnet32 driver. The same driver was working fine in 2.2.13. I
> didn't had the chance to try 2.3.X on this box (for some reasons, I
> still need 2.2.X).

you will probably see the same problem with 2.3.

> 
> pcnet32.c: PCI bios is present, checking for devices... 
> Found PCnet/PCI at 0x6800, irq 11. 
> eth0: PCnet/FAST 79C971 at 0x6800, 00 20 0c 10 56 02 
>     tx_start_pt(0x0400):  64 bytes, BCR18(9861):BurstWrEn BurstRdEn NoUFlow  
>     SRAMSIZE=0x0000, SRAM_BND=0x4000, assigned IRQ 11. 

looks like board doesn't have any external SRAM attached, but the current
driver always enables SRAM for 971. I'll prepare a patch for testing
over the weekend.

Thomas.

-- 
   This device has completely bogus header. Compaq scores again :-|
It's a host bridge, but it should be called ghost bridge instead ;^)
                                        [Martin `MJ' Mares on linux-kernel]

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pcnet32-3.txt"

>From hub-fue!alpha.franken.de!tsbogend@rachael.franken.de Wed Jan 19 13:08:51 PST 2000
Received: from hplms26.hpl.hp.com (hplms26.hpl.hp.com [15.255.168.31])
	by rockfort.hpl.hp.com (8.8.6 (PHNE_17190)/8.8.6 HPLabs Workstation) with ESMTP id NAA03992
	for <jeant@rockfort.hpl.hp.com>; Wed, 19 Jan 2000 13:08:50 -0800 (PST)
Received: from rachael.franken.de (rachael.franken.de [193.175.24.38])
	by hplms26.hpl.hp.com (8.9.3 (PHNE_18979)/HPL-PA Relay) with ESMTP id MAA07469
	for <jeant@rockfort.hpl.hp.com>; Wed, 19 Jan 2000 12:55:18 -0800 (PST)
Received: from hub-fue by rachael.franken.de
	via rmail with uucp
	id <m12B22V-0027eBC@rachael.franken.de>
	for rockfort.hpl.hp.com!jeant; Wed, 19 Jan 2000 21:49:15 +0100 (MET)
	(Smail-3.2 1996-Jul-4 #4 built DST-Sep-8)
Received: by hub-fue.franken.de (Smail3.1.29.1 #35)
	id m12B22P-002OkgC; Wed, 19 Jan 100 21:49 MET
Received: (from tsbogend@localhost)
	by alpha.franken.de (8.8.7/8.8.5) id VAA00537;
	Wed, 19 Jan 2000 21:47:18 +0100
Date: Wed, 19 Jan 2000 21:47:18 +0100
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Jean Tourrilhes <jeant@rockfort.hpl.hp.com>
Cc: Keith Fish <kaf@hpkaf.fc.hp.com>, Alan Cox <alan@lxorguk.ukuu.org.uk>,
        kaf@fc.hp.com
Subject: Re: Pcnet32 troubles...
Message-ID: <20000119214718.A534@alpha.franken.de>
References: <20000114135947.A2095@rockfort.hpl.hp.com> <200001142217.PAA04409@hpkaf.fc.hp.com> <20000114144218.B2122@rockfort.hpl.hp.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Mailer: Mutt 0.95.4us
In-Reply-To: <20000114144218.B2122@rockfort.hpl.hp.com>; from Jean Tourrilhes on Fri, Jan 14, 2000 at 02:42:18PM -0800
Status: RO
X-Status: A
Content-Length: 1903
Lines: 40

On Fri, Jan 14, 2000 at 02:42:18PM -0800, Jean Tourrilhes wrote:
> eth0: transmit timed out, status 007b, resetting.
> eth0: transmit timed out, status 007b, resetting.
> 
> 	So I guess that I will need the more elaborate solution...

it took me a little bit longer to get some minutes spare time. Below is a 
patch, which prevents enabling of full packet mode, when there is no sram 
attached to the 971.  Please check if it solves your problem. According to
the 971 datasheet it's legal to enable full packet mode even on a sramless
board. But this could also be a documentation bug.

Thomas.


--- linux/drivers/net/pcnet32.c.orig	Wed Jan 19 21:31:29 2000
+++ linux/drivers/net/pcnet32.c	Wed Jan 19 21:39:34 2000
@@ -577,10 +577,13 @@
 	break;
      case 0x2623:
 	chipname = "PCnet/FAST 79C971";
-	/* To prevent Tx FIFO underflows ... (may increase Tx latency) */
-	/* Set BCR18:NOUFLO to not start Tx until reach Tx start point */
-	/* Looks like EEPROM sets BCR18:5/6 for BurstWrite/Read */
-        a->write_bcr(ioaddr, 18, (a->read_bcr(ioaddr, 18) | 0x0800));
+	/* enable NOUFLO mode only, when there is SRAM on the board */
+	if ((a->read_bcr (ioaddr, 25) & 0xff) > 0) {
+	    /* To prevent Tx FIFO underflows ... (may increase Tx latency) */
+	    /* Set BCR18:NOUFLO to not start Tx until reach Tx start point */
+	    /* Looks like EEPROM sets BCR18:5/6 for BurstWrite/Read */
+            a->write_bcr(ioaddr, 18, (a->read_bcr(ioaddr, 18) | 0x0800));
+	}
 	/* Set CSR80:XMTSP, Tx start point = 20|64|128|248 bytes or size of frame */
         i = a->read_csr(ioaddr, 80) & ~0x0C00; /* Clear bits we are touching */
         a->write_csr(ioaddr, 80, i | (tx_start << 10));

-- 
   This device has completely bogus header. Compaq scores again :-|
It's a host bridge, but it should be called ghost bridge instead ;^)
                                        [Martin `MJ' Mares on linux-kernel]

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-2.2.14-pcnet32-fix"

--- linux/drivers/net/pcnet32.c.orig	Wed Jan 19 21:31:29 2000
+++ linux/drivers/net/pcnet32.c	Wed Jan 19 21:39:34 2000
@@ -577,10 +577,13 @@
 	break;
      case 0x2623:
 	chipname = "PCnet/FAST 79C971";
-	/* To prevent Tx FIFO underflows ... (may increase Tx latency) */
-	/* Set BCR18:NOUFLO to not start Tx until reach Tx start point */
-	/* Looks like EEPROM sets BCR18:5/6 for BurstWrite/Read */
-        a->write_bcr(ioaddr, 18, (a->read_bcr(ioaddr, 18) | 0x0800));
+	/* enable NOUFLO mode only, when there is SRAM on the board */
+	if ((a->read_bcr (ioaddr, 25) & 0xff) > 0) {
+	    /* To prevent Tx FIFO underflows ... (may increase Tx latency) */
+	    /* Set BCR18:NOUFLO to not start Tx until reach Tx start point */
+	    /* Looks like EEPROM sets BCR18:5/6 for BurstWrite/Read */
+            a->write_bcr(ioaddr, 18, (a->read_bcr(ioaddr, 18) | 0x0800));
+	}
 	/* Set CSR80:XMTSP, Tx start point = 20|64|128|248 bytes or size of frame */
         i = a->read_csr(ioaddr, 80) & ~0x0C00; /* Clear bits we are touching */
         a->write_csr(ioaddr, 80, i | (tx_start << 10));

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="patch-2.4.0-pcnet32-fix"

diff -u -p linux/drivers/net/pcnet32.before.c linux/drivers/net/pcnet32.c
--- linux/drivers/net/pcnet32.before.c	Sat Feb 10 12:11:17 2001
+++ linux/drivers/net/pcnet32.c	Sat Feb 10 15:02:54 2001
@@ -514,7 +514,7 @@ pcnet32_probe1(unsigned long ioaddr, uns
 {
     struct pcnet32_private *lp;
     dma_addr_t lp_dma_addr;
-    int i,media,fdx = 0, mii = 0, fset = 0;
+    int i,media,fdx = 0, mii = 0, fset = 0, nouflo = 1;
 #ifdef DO_DXSUFLO
     int dxsuflo = 0;
 #endif
@@ -561,6 +561,11 @@ pcnet32_probe1(unsigned long ioaddr, uns
 	chipname = "PCnet/FAST 79C971"; /* PCI */
 	fdx = 1; mii = 1; fset = 1;
 	ltint = 1;
+	/* enable NOUFLO mode only, when there is SRAM on the board */
+	if ((a->read_bcr (ioaddr, 25) & 0xff) > 0)
+	    nouflo = 1;
+	else
+	    nouflo = 0;
 	break;
     case 0x2624:
 	chipname = "PCnet/FAST+ 79C972"; /* PCI */
@@ -610,7 +615,9 @@ pcnet32_probe1(unsigned long ioaddr, uns
 	 
     if(fset)
     {
-	a->write_bcr(ioaddr, 18, (a->read_bcr(ioaddr, 18) | 0x0800));
+	/* enable NOUFLO mode only, when there is SRAM on the board */
+	if(nouflo)
+	    a->write_bcr(ioaddr, 18, (a->read_bcr(ioaddr, 18) | 0x0800));
 	a->write_csr(ioaddr, 80, (a->read_csr(ioaddr, 80) & 0x0C00) | 0x0c00);
 #ifdef DO_DXSUFLO
 	dxsuflo = 1;

--r5Pyd7+fXNt84Ff3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="pcnet32-4.txt"

	A few recent updates on the state of 2.4.0 with Thomas fix
applied...

	Under 2.4.0, without the patch, the same problem occur :
-----------------------
kernel: NETDEV WATCHDOG: eth0: transmit timed out 
kernel: eth0: transmit timed out, status 007b, resetting. 
kernel: NETDEV WATCHDOG: eth0: transmit timed out 
kernel: eth0: transmit timed out, status 007b, resetting. 
-----------------------

	Boot sequence under 2.4.0 (with Thomas's fix) :
------------------------------------------
kernel: pcnet32_probe_pci: found device 0x001022.0x002000 
kernel:     ioaddr=0x006800  resource_flags=0x000101 
kernel: PCI: Found IRQ 11 for device 00:14.0 
kernel: eth0: PCnet/FAST 79C971 at 0x6800, 00 20 0c 10 5f e1 
kernel:     tx_start_pt(0x0c00):~220 bytes, BCR18(9061):BurstWrEn BurstRdEn  
kernel:     SRAMSIZE=0x0000, SRAM_BND=0x4000, 
kernel: pcnet32: pcnet32_private lp=c3813000 lp_dma_addr=0x3813000 assigned IRQ 11. 
weblab5 kernel: pcnet32.c:v1.25kf 26.9.1999 tsbogend@alpha.franken.de 
------------------------------------------

	If I do :
		> netperf -H othernode
	Everything runs fine.

	On the other hand, if I do :
		> netperf -l 100 -H othernode
	The driver fail and take a few seconds to recover :
--------------------------------
kernel: eth0: Tx FIFO error! CSR0=02eb 
kernel: Warning: kfree_skb on hard IRQ c4867fd9 
last message repeated 7 times
kernel: eth0: Tx FIFO error! CSR0=02eb 
kernel: Warning: kfree_skb on hard IRQ c4867fd9 
last message repeated 8 times
kernel: eth0: Tx FIFO error! CSR0=02eb 
kernel: Warning: kfree_skb on hard IRQ c4867fd9 
last message repeated 13 times
kernel: NETDEV WATCHDOG: eth0: transmit timed out 
kernel: eth0: transmit timed out, status 0073, resetting. 
kernel: NETDEV WATCHDOG: eth0: transmit timed out 
kernel: eth0: transmit timed out, status 0063, resetting. 
--------------------------------

--r5Pyd7+fXNt84Ff3--
-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux