linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
@ 2003-04-01  2:32 Brad Campbell
  2003-04-01  2:50 ` Brad Campbell
  2003-04-01  4:27 ` Jeff Garzik
  0 siblings, 2 replies; 9+ messages in thread
From: Brad Campbell @ 2003-04-01  2:32 UTC (permalink / raw)
  To: linux-kernel

G'day all,
I have a problem with the via-rhine on this board timing out.
Seems to be the same problem that keeps cropping up in the archives.
I also tried the via-supplied linuxfet driver, but that locked up solid
under full load, whereas the kernel driver just kept pausing and reseting.
This is easy to reproduce and will die on demand :p)


I have inlined lspci -v, dmesg of boot and the error occuring, a dmesg
snip of the linuxfet driver errors, ifconfig and my .config.
I can perform any sort of testing required on this box.
Oh, I forgot lsmod..
modules loaded. nfsd, lockd, sunrpc, tulip, via-rhine, mii


00:00.0 Host bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia] 
(rev 05)
	Subsystem: VIA Technologies, Inc.: Unknown device aa03
	Flags: bus master, medium devsel, latency 8
	Memory at e0000000 (32-bit, prefetchable) [size=128M]
	Capabilities: <available only to root>

00:01.0 PCI bridge: VIA Technologies, Inc. VT8601 [Apollo ProMedia AGP] 
(prog-if 00 [Normal decode])
	Flags: bus master, 66Mhz, medium devsel, latency 0
	Bus: primary=00, secondary=01, subordinate=01, sec-latency=0
	Memory behind bridge: e8000000-eaffffff
	Capabilities: <available only to root>

00:11.0 ISA bridge: VIA Technologies, Inc. VT8231 [PCI-to-ISA Bridge] 
(rev 10)
	Subsystem: VIA Technologies, Inc.: Unknown device aa03
	Flags: bus master, stepping, medium devsel, latency 0
	Capabilities: <available only to root>

00:11.1 IDE interface: VIA Technologies, Inc. Bus Master IDE (rev 06) 
(prog-if 8a [Master SecP PriP])
	Subsystem: VIA Technologies, Inc.: Unknown device aa03
	Flags: bus master, medium devsel, latency 32
	I/O ports at d000 [size=16]
	Capabilities: <available only to root>

00:11.2 USB Controller: VIA Technologies, Inc. UHCI USB (rev 1e) 
(prog-if 00 [UHCI])
	Subsystem: VIA Technologies, Inc.: Unknown device aa03
	Flags: bus master, medium devsel, latency 32, IRQ 12
	I/O ports at d400 [size=32]
	Capabilities: <available only to root>

00:11.3 USB Controller: VIA Technologies, Inc. UHCI USB (rev 1e) 
(prog-if 00 [UHCI])
	Subsystem: Unknown device 0925:1234
	Flags: bus master, medium devsel, latency 32, IRQ 12
	I/O ports at d800 [size=32]
	Capabilities: <available only to root>

00:11.4 Bridge: VIA Technologies, Inc. VT8235 Power Management (rev 10)
	Subsystem: VIA Technologies, Inc. VT8235 Power Management
	Flags: medium devsel
	Capabilities: <available only to root>

00:11.5 Multimedia audio controller: VIA Technologies, Inc. AC97 Audio 
Controller (rev 40)
	Subsystem: VIA Technologies, Inc.: Unknown device aa03
	Flags: medium devsel, IRQ 10
	I/O ports at dc00 [size=256]
	I/O ports at e000 [size=4]
	I/O ports at e400 [size=4]
	Capabilities: <available only to root>

00:12.0 Ethernet controller: VIA Technologies, Inc. Ethernet Controller 
(rev 51)
	Subsystem: VIA Technologies, Inc.: Unknown device 0102
	Flags: bus master, medium devsel, latency 32, IRQ 11
	I/O ports at e800 [size=256]
	Memory at ec001000 (32-bit, non-prefetchable) [size=256]
	Capabilities: <available only to root>

00:14.0 Ethernet controller: Digital Equipment Corporation DECchip 
21142/43 (rev 41)
	Subsystem: Ruby Tech Corp.: Unknown device 1430
	Flags: bus master, medium devsel, latency 32, IRQ 15
	I/O ports at ec00 [size=128]
	Memory at ec000000 (32-bit, non-prefetchable) [size=1K]
	Expansion ROM at <unassigned> [disabled] [size=256K]
	Capabilities: <available only to root>

01:00.0 VGA compatible controller: Trident Microsystems CyberBlade/i1 
(rev 6a) (prog-if 00 [VGA])
	Subsystem: Trident Microsystems CyberBlade/i1
	Flags: bus master, 66Mhz, medium devsel, latency 32, IRQ 11
	Memory at e9800000 (32-bit, non-prefetchable) [size=8M]
	Memory at ea000000 (32-bit, non-prefetchable) [size=128K]
	Memory at e9000000 (32-bit, non-prefetchable) [size=8M]
	Expansion ROM at <unassigned> [disabled] [size=64K]
	Capabilities: <available only to root>

Linux version 2.4.21-pre6 (brad@bkserver) (gcc version 2.95.4 20011002 
(Debian prerelease)) #3 Tue Apr 1 09:56:34 WST 2003
BIOS-provided physical RAM map:
  BIOS-e820: 0000000000000000 - 00000000000a0000 (usable)
  BIOS-e820: 00000000000f0000 - 0000000000100000 (reserved)
  BIOS-e820: 0000000000100000 - 00000000077f0000 (usable)
  BIOS-e820: 00000000077f0000 - 00000000077f3000 (ACPI NVS)
  BIOS-e820: 00000000077f3000 - 0000000007800000 (ACPI data)
  BIOS-e820: 00000000ffff0000 - 0000000100000000 (reserved)
119MB LOWMEM available.
On node 0 totalpages: 30704
zone(0): 4096 pages.
zone(1): 26608 pages.
zone(2): 0 pages.
Kernel command line: auto BOOT_IMAGE=2421 root=301
Initializing CPU#0
Detected 1000.059 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 1992.29 BogoMIPS
Memory: 119248k/122816k available (1014k kernel code, 3184k reserved, 
287k data, 224k init, 0k highmem)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
Dentry cache hash table entries: 16384 (order: 5, 131072 bytes)
Inode cache hash table entries: 8192 (order: 4, 65536 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 4096 (order: 2, 16384 bytes)
Page-cache hash table entries: 32768 (order: 5, 131072 bytes)
CPU: L1 I Cache: 64K (32 bytes/line), D cache 64K (32 bytes/line)
CPU: L2 Cache: 64K (32 bytes/line)
CPU:     After generic, caps: 00803135 80803035 00000000 00000000
CPU:             Common caps: 00803135 80803035 00000000 00000000
CPU: Centaur VIA C3 Ezra stepping 09
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: Intel
PCI: PCI BIOS revision 2.10 entry at 0xfb170, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Using IRQ router default [1106/0601] at 00:00.0
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
Starting kswapd
Journalled Block Device driver loaded
ACPI: Core Subsystem version [20011018]
ACPI: Subsystem enabled
ACPI: System firmware supports S0 S1 S4 S5
Processor[0]: C0 C1 C2, 2 throttling states
ACPI: Power Button (FF) found
ACPI: Multiple power buttons detected, ignoring fixed-feature
ACPI: Power Button (CM) found
ACPI: Thermal Zone found
parport0: PC-style at 0x378 [PCSPP,EPP]
parport0: faking semi-colon
parport0: Printer, Hewlett-Packard HP LaserJet 2100 Series
Detected PS/2 Mouse Port.
pty: 256 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS SHARE_IRQ 
SERIAL_PCI enabled
ttyS00 at 0x03f8 (irq = 4) is a 16550A
lp0: using parport0 (polling).
Real Time Clock Driver v1.10e
Floppy drive(s): fd0 is 1.44M
keyboard: Timeout - AT keyboard not present?(ed)
keyboard: Timeout - AT keyboard not present?(f4)
FDC 0 is a post-1991 82077
Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: VIA vt8231 (rev 10) IDE UDMA100 controller on pci00:11.1
     ide0: BM-DMA at 0xd000-0xd007, BIOS settings: hda:DMA, hdb:pio
hda: ST380011A, ATA DISK drive
blk: queue c02a6c60, I/O limit 4095Mb (mask 0xffffffff)
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: host protected area => 1
hda: 156301488 sectors (80026 MB) w/2048KiB Cache, CHS=9729/255/63, 
UDMA(100)
Partition check:
  hda: hda1 hda2 hda3
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 8192 bind 8192)
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 224k freed
Adding Swap: 498004k swap-space (priority -1)
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,1), internal journal
via-rhine.c:v1.10-LK1.1.16  February-15-2003  Written by Donald Becker
   http://www.scyld.com/network/via-rhine.html
eth0: VIA VT6102 Rhine-II at 0xe800, 00:40:63:ca:a7:a6, IRQ 11.
eth0: MII PHY found at address 1, status 0x786d advertising 05e1 Link 45e1.
Linux Tulip driver version 0.9.15-pre12 (Aug 9, 2002)
tulip0:  EEPROM default media type Autosense.
tulip0:  Index #0 - Media MII (#11) described by a 21142 MII PHY (3) block.
tulip0:  MII transceiver #1 config 3000 status 782d advertising 01e1.
eth1: Digital DS21143 Tulip rev 65 at 0xec00, 00:40:C7:97:3E:5C, IRQ 15.
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,3), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Reset did not complete in 5 us. Trying harder.
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.


eth0      Link encap:Ethernet  HWaddr 00:40:63:CA:A7:A6
           inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:36518 errors:0 dropped:0 overruns:0 frame:0
           TX packets:48793 errors:8 dropped:0 overruns:3 carrier:0
           collisions:0 txqueuelen:100
           RX bytes:2564604 (2.4 MiB)  TX bytes:71386977 (68.0 MiB)
           Interrupt:11 Base address:0xe800

eth1      Link encap:Ethernet  HWaddr 00:40:C7:97:3E:5C
           inet addr:192.168.1.100  Bcast:192.168.1.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:48238 errors:0 dropped:0 overruns:0 frame:0
           TX packets:37679 errors:0 dropped:0 overruns:0 carrier:0
           collisions:151 txqueuelen:100
           RX bytes:68440857 (65.2 MiB)  TX bytes:2844893 (2.7 MiB)
           Interrupt:15 Base address:0xec00

lo        Link encap:Local Loopback
           inet addr:127.0.0.1  Mask:255.0.0.0
           UP LOOPBACK RUNNING  MTU:16436  Metric:1
           RX packets:64 errors:0 dropped:0 overruns:0 frame:0
           TX packets:64 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:0
           RX bytes:4368 (4.2 KiB)  TX bytes:4368 (4.2 KiB)

Apr  1 10:13:27 bkserver kernel: linuxfet.c : v3.28 11/15/2001
Apr  1 10:13:27 bkserver kernel:   The PCI BIOS has not enabled the 
device at 0/144!  Updating PCI command 0003->0007.
Apr  1 10:13:27 bkserver kernel: eth0: VIA PCI 10/100Mb Fast Ethernet 
Adapter
Apr  1 10:13:27 bkserver kernel: eth0: IO Address = 0xe800, MAC Address 
= 00:40:63:ca:a7:a6, IRQ = 11.
Apr  1 10:13:41 bkserver kernel: eth0: netdev_open() irq 11.
Apr  1 10:13:41 bkserver kernel: eth0: Autonegotiation result: 100Mbps 
full duplex mode.
Apr  1 10:13:41 bkserver kernel: eth0: Done netdev_open(), status 0c1a 
MII status: 786d.
Apr  1 10:16:34 bkserver kernel: eth0: Shutting down ethercard, status 
was 0c1a.
Apr  1 10:16:45 bkserver kernel: eth0: netdev_open() irq 11.
Apr  1 10:16:45 bkserver kernel: eth0: Autonegotiation result: 100Mbps 
full duplex mode.
Apr  1 10:16:45 bkserver kernel: eth0: Done netdev_open(), status 0c1a 
MII status: 786d.
Apr  1 10:17:02 bkserver kernel: eth0: Transmit error, Tx status 8800.
Apr  1 10:17:02 bkserver kernel: eth0: Transmitter underrun, increasing 
Tx threshold setting to 01.
Apr  1 10:17:02 bkserver kernel: eth0: Transmit error, Tx status 8800.
Apr  1 10:17:02 bkserver kernel: eth0: Transmitter underrun, increasing 
Tx threshold setting to 02.
Apr  1 10:17:02 bkserver kernel: eth0: Transmit error, Tx status 8800.
Apr  1 10:17:02 bkserver kernel: eth0: Transmitter underrun, increasing 
Tx threshold setting to 03.
Apr  1 10:18:54 bkserver kernel: eth0: Transmit error, Tx status 8800.
Apr  1 10:18:54 bkserver kernel: eth0: Transmitter underrun, increasing 
Tx threshold setting to 04.

CONFIG_X86=y
CONFIG_UID16=y
CONFIG_EXPERIMENTAL=y
CONFIG_MODULES=y
CONFIG_KMOD=y
CONFIG_MCYRIXIII=y
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_CMPXCHG=y
CONFIG_X86_XADD=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_X86_L1_CACHE_SHIFT=5
CONFIG_X86_HAS_TSC=y
CONFIG_X86_ALIGNMENT_16=y
CONFIG_X86_USE_3DNOW=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_F00F_WORKS_OK=y
CONFIG_X86_MCE=y
CONFIG_NOHIGHMEM=y
CONFIG_MTRR=y
CONFIG_X86_TSC=y
CONFIG_NET=y
CONFIG_PCI=y
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_NAMES=y
CONFIG_SYSVIPC=y
CONFIG_SYSCTL=y
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_PM=y
CONFIG_ACPI=y
CONFIG_ACPI_BUSMGR=y
CONFIG_ACPI_SYS=y
CONFIG_ACPI_CPU=y
CONFIG_ACPI_BUTTON=y
CONFIG_ACPI_AC=y
CONFIG_ACPI_EC=y
CONFIG_ACPI_CMBATT=y
CONFIG_ACPI_THERMAL=y
CONFIG_PARPORT=y
CONFIG_PARPORT_PC=y
CONFIG_PARPORT_PC_CML1=y
CONFIG_PARPORT_1284=y
CONFIG_BLK_DEV_FD=y
CONFIG_PACKET=y
CONFIG_NETFILTER=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IDE=y
CONFIG_BLK_DEV_IDE=y
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_BLK_DEV_IDECD=y
CONFIG_BLK_DEV_IDEPCI=y
CONFIG_IDEPCI_SHARE_IRQ=y
CONFIG_BLK_DEV_IDEDMA_PCI=y
CONFIG_IDEDMA_PCI_AUTO=y
CONFIG_BLK_DEV_IDEDMA=y
CONFIG_BLK_DEV_ADMA=y
CONFIG_BLK_DEV_VIA82CXXX=y
CONFIG_IDEDMA_AUTO=y
CONFIG_BLK_DEV_IDE_MODES=y
CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_NET_ETHERNET=y
CONFIG_NET_PCI=y
CONFIG_TULIP=m
CONFIG_VIA_RHINE=m
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UNIX98_PTYS=y
CONFIG_UNIX98_PTY_COUNT=256
CONFIG_PRINTER=y
CONFIG_MOUSE=y
CONFIG_PSMOUSE=y
CONFIG_RTC=y
CONFIG_EXT3_FS=y
CONFIG_JBD=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y
CONFIG_ISO9660_FS=m
CONFIG_JOLIET=y
CONFIG_PROC_FS=y
CONFIG_DEVPTS_FS=y
CONFIG_EXT2_FS=y
CONFIG_NFS_FS=m
CONFIG_NFS_V3=y
CONFIG_NFSD=m
CONFIG_NFSD_V3=y
CONFIG_NFSD_TCP=y
CONFIG_SUNRPC=m
CONFIG_LOCKD=m
CONFIG_LOCKD_V4=y
CONFIG_SMB_FS=m
CONFIG_SMB_NLS_DEFAULT=y
CONFIG_SMB_NLS_REMOTE="cp437"
CONFIG_MSDOS_PARTITION=y
CONFIG_SMB_NLS=y
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="iso8859-1"
CONFIG_NLS_CODEPAGE_437=m
CONFIG_NLS_ISO8859_1=m
CONFIG_VGA_CONSOLE=y
CONFIG_SOUND=y
CONFIG_SOUND_VIA82CXXX=m

-- 
Brad....
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X      AGAINST HTML MAIL
  / \


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-01  2:32 via-rhine problem on EPIAV-1Ghz 2.4.21-pre6 Brad Campbell
@ 2003-04-01  2:50 ` Brad Campbell
  2003-04-01  4:27 ` Jeff Garzik
  1 sibling, 0 replies; 9+ messages in thread
From: Brad Campbell @ 2003-04-01  2:50 UTC (permalink / raw)
  To: linux-kernel

Brad Campbell wrote:
> G'day all,
> I have a problem with the via-rhine on this board timing out.

Quick followup.
Loading module with debug=3 makes it happen a lot less, but
it still happens and frequently.

Relevant dmesg snip

eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Reset succeeded.
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 40.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 60.
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Reset succeeded.
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 40.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 60.
NETDEV WATCHDOG: eth0: transmit timed out
eth0: Transmit timed out, status 0000, PHY status 786d, resetting...
eth0: Reset succeeded.
eth0: Setting full-duplex based on MII #1 link partner capability of 45e1.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 40.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 60.



-- 
Brad....
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X      AGAINST HTML MAIL
  / \


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-01  2:32 via-rhine problem on EPIAV-1Ghz 2.4.21-pre6 Brad Campbell
  2003-04-01  2:50 ` Brad Campbell
@ 2003-04-01  4:27 ` Jeff Garzik
  2003-04-01  4:35   ` Brad Campbell
  1 sibling, 1 reply; 9+ messages in thread
From: Jeff Garzik @ 2003-04-01  4:27 UTC (permalink / raw)
  To: Brad Campbell; +Cc: linux-kernel

On Tue, Apr 01, 2003 at 10:32:04AM +0800, Brad Campbell wrote:
> G'day all,
> I have a problem with the via-rhine on this board timing out.

Try booting with "noapic"

I have sent via-rhine fixes to Marcelo, hopefully they will appear in -pre7

	Jeff




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-01  4:27 ` Jeff Garzik
@ 2003-04-01  4:35   ` Brad Campbell
  2003-04-01  6:38     ` Josh McKinney
  2003-04-01 18:52     ` Erik Mouw
  0 siblings, 2 replies; 9+ messages in thread
From: Brad Campbell @ 2003-04-01  4:35 UTC (permalink / raw)
  To: Jeff Garzik, linux-kernel

Jeff Garzik wrote:
> On Tue, Apr 01, 2003 at 10:32:04AM +0800, Brad Campbell wrote:
> 
>>G'day all,
>>I have a problem with the via-rhine on this board timing out.
> 
> 
> Try booting with "noapic"
> 
> I have sent via-rhine fixes to Marcelo, hopefully they will appear in -pre7
> 
> 	Jeff
Thanks for the prompt reply Jeff.

Tried that, and I don't have apic configured in anyway.

Is there somewhere I can grab the patches so I can apply them locally 
and test them?


-- 
Brad....
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X      AGAINST HTML MAIL
  / \


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-01  4:35   ` Brad Campbell
@ 2003-04-01  6:38     ` Josh McKinney
  2003-04-01 14:05       ` Henrik Persson
  2003-04-01 18:52     ` Erik Mouw
  1 sibling, 1 reply; 9+ messages in thread
From: Josh McKinney @ 2003-04-01  6:38 UTC (permalink / raw)
  To: linux-kernel

On approximately Tue, Apr 01, 2003 at 12:35:38PM +0800, Brad Campbell wrote:
> 
> Is there somewhere I can grab the patches so I can apply them locally 
> and test them?
> 

There have been a lot of work done on the 2.5 tree for this driver so if
possible you could try that.  I seem to remember that there was some patches
posted here to so maybe you could dig them out of the archives.

Josh

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-01  6:38     ` Josh McKinney
@ 2003-04-01 14:05       ` Henrik Persson
  0 siblings, 0 replies; 9+ messages in thread
From: Henrik Persson @ 2003-04-01 14:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: brad

On Tue, 1 Apr 2003 01:38:41 -0500
Josh McKinney <forming@charter.net> wrote:

> There have been a lot of work done on the 2.5 tree for this driver so if
> possible you could try that.  I seem to remember that there was some
> patches posted here to so maybe you could dig them out of the archives.

When the patches sent to Marcello is applied to 2.4 the 2.5 and the 2.4
drivers should not differ at all, so you could just copy via-rhine.c from
the 2.5 source tree into your tree if you don't want to browse alot of
archives and find all the patches that are needed.

-- 
Henrik Persson  nix@socialism.nu  http://nix.badanka.com
PGP-key: http://nix.badanka.com/pgp  PGP-KeyID: 0x43B68116  

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-01  4:35   ` Brad Campbell
  2003-04-01  6:38     ` Josh McKinney
@ 2003-04-01 18:52     ` Erik Mouw
  2003-04-02  4:10       ` Brad Campbell
  1 sibling, 1 reply; 9+ messages in thread
From: Erik Mouw @ 2003-04-01 18:52 UTC (permalink / raw)
  To: Brad Campbell; +Cc: Jeff Garzik, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 19334 bytes --]

On Tue, Apr 01, 2003 at 12:35:38PM +0800, Brad Campbell wrote:
> Jeff Garzik wrote:
> >On Tue, Apr 01, 2003 at 10:32:04AM +0800, Brad Campbell wrote:
> >
> >>G'day all,
> >>I have a problem with the via-rhine on this board timing out.
> >
> >
> >Try booting with "noapic"
> >
> >I have sent via-rhine fixes to Marcelo, hopefully they will appear in -pre7
> >
> >	Jeff
> Thanks for the prompt reply Jeff.
> 
> Tried that, and I don't have apic configured in anyway.
> 
> Is there somewhere I can grab the patches so I can apply them locally 
> and test them?

Here's the 2.5 driver backported to 2.4.20, it solved my timeout
problems (with thanks to Roger Luethi). Don't know if the "noapic"
option is still necessary, but it won't hurt anyway.


Erik

-- 
J.A.K. (Erik) Mouw
Email: J.A.K.Mouw@its.tudelft.nl  mouw@nl.linux.org


--- net/core/skbuff.c-old	Sat Aug  3 02:39:46 2002
+++ net/core/skbuff.c	Thu Feb 27 14:03:17 2003
@@ -731,6 +731,36 @@
 	return n;
 }
 
+/**
+ *     skb_pad                 -       zero pad the tail of an skb
+ *     @skb: buffer to pad
+ *     @pad: space to pad
+ *
+ *     Ensure that a buffer is followed by a padding area that is zero
+ *     filled. Used by network drivers which may DMA or transfer data
+ *     beyond the buffer end onto the wire.
+ *
+ *     May return NULL in out of memory cases.
+ */
+ 
+struct sk_buff *skb_pad(struct sk_buff *skb, int pad)
+{
+       struct sk_buff *nskb;
+       
+       /* If the skbuff is non linear tailroom is always zero.. */
+       if(skb_tailroom(skb) >= pad)
+       {
+               memset(skb->data+skb->len, 0, pad);
+               return skb;
+       }
+       
+       nskb = skb_copy_expand(skb, skb_headroom(skb), skb_tailroom(skb) + pad, GFP_ATOMIC);
+	kfree_skb(skb);
+       if(nskb)
+               memset(nskb->data+nskb->len, 0, pad);
+       return nskb;
+}      
+ 
 /* Trims skb to length len. It can change skb pointers, if "realloc" is 1.
  * If realloc==0 and trimming is impossible without change of data,
  * it is BUG().
--- net/netsyms.c-old	Wed Dec 18 12:09:34 2002
+++ net/netsyms.c	Thu Feb 27 14:00:08 2003
@@ -93,6 +93,7 @@
 /* Skbuff symbols. */
 EXPORT_SYMBOL(skb_over_panic);
 EXPORT_SYMBOL(skb_under_panic);
+EXPORT_SYMBOL(skb_pad);
 
 /* Socket layer registration */
 EXPORT_SYMBOL(sock_register);
--- drivers/net/via-rhine.c-old	Wed Dec 18 12:09:17 2002
+++ drivers/net/via-rhine.c	Fri Feb 28 13:48:41 2003
@@ -98,11 +98,21 @@
  	- location of collision counter is chip specific
  	- allow selecting backoff algorithm (module parameter)
 
+	LK1.1.15 (jgarzik):
+	- Use new MII lib helper generic_mii_ioctl
+
+	LK1.1.16 (Roger Luethi)
+	- Etherleak fix
+	- Handle Tx buffer underrun
+	- Fix bugs in full duplex handling
+	- New reset code uses "force reset" cmd on Rhine-II
+	- Various clean ups
+
 */
 
 #define DRV_NAME	"via-rhine"
-#define DRV_VERSION	"1.1.14"
-#define DRV_RELDATE	"May-3-2002"
+#define DRV_VERSION	"1.1.16"
+#define DRV_RELDATE	"February-15-2003"
 
 
 /* A few user-configurable values.
@@ -358,6 +368,8 @@
 #else
 #define RHINE_IOTYPE (PCI_USES_IO  | PCI_USES_MASTER | PCI_ADDR0)
 #endif
+/* Beware of PCI posted writes */
+#define IOSYNC	do { readb(dev->base_addr + StationAddr); } while (0)
 
 /* directly indexed by enum via_rhine_chips, above */
 static struct via_rhine_chip_info via_rhine_chip_info[] __devinitdata =
@@ -392,8 +404,9 @@
 	MIIPhyAddr=0x6C, MIIStatus=0x6D, PCIBusConfig=0x6E,
 	MIICmd=0x70, MIIRegAddr=0x71, MIIData=0x72, MACRegEEcsr=0x74,
 	ConfigA=0x78, ConfigB=0x79, ConfigC=0x7A, ConfigD=0x7B,
-	RxMissed=0x7C, RxCRCErrs=0x7E,
-	StickyHW=0x83, WOLcrClr=0xA4, WOLcgClr=0xA7, PwrcsrClr=0xAC,
+	RxMissed=0x7C, RxCRCErrs=0x7E, MiscCmd=0x81,
+	StickyHW=0x83, IntrStatus2=0x84, WOLcrClr=0xA4, WOLcgClr=0xA7,
+	PwrcsrClr=0xAC,
 };
 
 /* Bits in ConfigD */
@@ -413,27 +426,15 @@
 /* Bits in the interrupt status/mask registers. */
 enum intr_status_bits {
 	IntrRxDone=0x0001, IntrRxErr=0x0004, IntrRxEmpty=0x0020,
-	IntrTxDone=0x0002, IntrTxError=0x0008, IntrTxUnderrun=0x0010,
+	IntrTxDone=0x0002, IntrTxError=0x0008, IntrTxUnderrun=0x0210,
 	IntrPCIErr=0x0040,
-	IntrStatsMax=0x0080, IntrRxEarly=0x0100, IntrMIIChange=0x0200,
+	IntrStatsMax=0x0080, IntrRxEarly=0x0100,
 	IntrRxOverflow=0x0400, IntrRxDropped=0x0800, IntrRxNoBuf=0x1000,
 	IntrTxAborted=0x2000, IntrLinkChange=0x4000,
 	IntrRxWakeUp=0x8000,
 	IntrNormalSummary=0x0003, IntrAbnormalSummary=0xC260,
-};
-
-/* MII interface, status flags.
-   Not to be confused with the MIIStatus register ... */
-enum mii_status_bits {
-	MIICap100T4			= 0x8000,
-	MIICap10100HdFd		= 0x7800,
-	MIIPreambleSupr		= 0x0040,
-	MIIAutoNegCompleted	= 0x0020,
-	MIIRemoteFault		= 0x0010,
-	MIICapAutoNeg		= 0x0008,
-	MIILink				= 0x0004,
-	MIIJabber			= 0x0002,
-	MIIExtended			= 0x0001
+	IntrTxDescRace=0x080000,	/* mapped from IntrStatus2 */
+	IntrTxErrSummary=0x082210,
 };
 
 /* The Rx and Tx buffer descriptors. */
@@ -530,30 +531,45 @@
 static struct net_device_stats *via_rhine_get_stats(struct net_device *dev);
 static int netdev_ioctl(struct net_device *dev, struct ifreq *rq, int cmd);
 static int  via_rhine_close(struct net_device *dev);
-static inline void clear_tally_counters(long ioaddr);
-static inline void via_restart_tx(struct net_device *dev);
+
+static inline u32 get_intr_status(struct net_device *dev)
+{
+	long ioaddr = dev->base_addr;
+	struct netdev_private *np = dev->priv;
+	u32 intr_status;
+
+	intr_status = readw(ioaddr + IntrStatus);
+	/* On Rhine-II, Bit 3 indicates Tx descriptor write-back race. */
+	if (np->chip_id == VT6102)
+		intr_status |= readb(ioaddr + IntrStatus2) << 16;
+	return intr_status;
+}
 
 static void wait_for_reset(struct net_device *dev, int chip_id, char *name)
 {
 	long ioaddr = dev->base_addr;
-	int i;
+	int boguscnt = 20;
 
-	/* VT86C100A may need long delay after reset (dlink) */
-	if (chip_id == VT86C100A)
-		udelay(100);
+	IOSYNC;
+
+	if (readw(ioaddr + ChipCmd) & CmdReset) {
+		printk(KERN_INFO "%s: Reset not complete yet. "
+			"Trying harder.\n", name);
+
+		/* Rhine-II needs to be forced sometimes */
+		if (chip_id == VT6102)
+			writeb(0x40, ioaddr + MiscCmd);
+
+		/* VT86C100A may need long delay after reset (dlink) */
+		/* Seen on Rhine-II as well (rl) */
+		while ((readw(ioaddr + ChipCmd) & CmdReset) && --boguscnt)
+			udelay(5);
+
+	}
 
-	i = 0;
-	do {
-		udelay(5);
-		i++;
-		if(i > 2000) {
-			printk(KERN_ERR "%s: reset did not complete in 10 ms.\n", name);
-			break;
-		}
-	} while(readw(ioaddr + ChipCmd) & CmdReset);
 	if (debug > 1)
-		printk(KERN_INFO "%s: reset finished after %d microseconds.\n",
-			   name, 5*i);
+		printk(KERN_INFO "%s: Reset %s.\n", name,
+			boguscnt ? "succeeded" : "failed");
 }
 
 #ifdef USE_MEM
@@ -739,21 +755,6 @@
 	if (dev->mem_start)
 		option = dev->mem_start;
 
-	/* The lower four bits are the media type. */
-	if (option > 0) {
-		if (option & 0x200)
-			np->mii_if.full_duplex = 1;
-		np->default_port = option & 15;
-	}
-	if (card_idx < MAX_UNITS  &&  full_duplex[card_idx] > 0)
-		np->mii_if.full_duplex = 1;
-
-	if (np->mii_if.full_duplex) {
-		printk(KERN_INFO "%s: Set to forced full duplex, autonegotiation"
-			   " disabled.\n", dev->name);
-		np->mii_if.force_media = 1;
-	}
-
 	/* The chip-specific entries in the device structure. */
 	dev->open = via_rhine_open;
 	dev->hard_start_xmit = via_rhine_start_tx;
@@ -765,11 +766,27 @@
 	dev->watchdog_timeo = TX_TIMEOUT;
 	if (np->drv_flags & ReqTxAlign)
 		dev->features |= NETIF_F_SG|NETIF_F_HW_CSUM;
-	
+
+	/* dev->name not defined before register_netdev()! */
 	i = register_netdev(dev);
 	if (i)
 		goto err_out_unmap;
 
+	/* The lower four bits are the media type. */
+	if (option > 0) {
+		if (option & 0x220)
+			np->mii_if.full_duplex = 1;
+		np->default_port = option & 15;
+	}
+	if (card_idx < MAX_UNITS  &&  full_duplex[card_idx] > 0)
+		np->mii_if.full_duplex = 1;
+
+	if (np->mii_if.full_duplex) {
+		printk(KERN_INFO "%s: Set to forced full duplex, autonegotiation"
+			   " disabled.\n", dev->name);
+		np->mii_if.force_media = 1;
+	}
+
 	printk(KERN_INFO "%s: %s at 0x%lx, ",
 		   dev->name, via_rhine_chip_info[chip_id].name,
 		   (pci_flags & PCI_USES_IO) ? ioaddr : memaddr);
@@ -794,7 +811,7 @@
 					   mdio_read(dev, phy, 5));
 
 				/* set IFF_RUNNING */
-				if (mii_status & MIILink)
+				if (mii_status & BMSR_LSTATUS)
 					netif_carrier_on(dev);
 				else
 					netif_carrier_off(dev);
@@ -1005,6 +1022,7 @@
 	writeb(0x20, ioaddr + TxConfig);
 	np->tx_thresh = 0x20;
 	np->rx_thresh = 0x60;			/* Written in via_rhine_set_rx_mode(). */
+	np->mii_if.full_duplex = 0;
 
 	if (dev->if_port == 0)
 		dev->if_port = np->default_port;
@@ -1018,7 +1036,7 @@
 	writew(IntrRxDone | IntrRxErr | IntrRxEmpty| IntrRxOverflow |
 		   IntrRxDropped | IntrRxNoBuf | IntrTxAborted |
 		   IntrTxDone | IntrTxError | IntrTxUnderrun |
-		   IntrPCIErr | IntrStatsMax | IntrLinkChange | IntrMIIChange,
+		   IntrPCIErr | IntrStatsMax | IntrLinkChange,
 		   ioaddr + IntrEnable);
 
 	np->chip_cmd = CmdStart|CmdTxOn|CmdRxOn|CmdNoTxPoll;
@@ -1172,8 +1190,8 @@
 
 	/* make IFF_RUNNING follow the MII status bit "Link established" */
 	mii_status = mdio_read(dev, np->phys[0], MII_BMSR);
-	if ( (mii_status & MIILink) != (np->mii_status & MIILink) ) {
-		if (mii_status & MIILink)
+	if ( (mii_status & BMSR_LSTATUS) != (np->mii_status & BMSR_LSTATUS) ) {
+		if (mii_status & BMSR_LSTATUS)
 			netif_carrier_on(dev);
 		else
 			netif_carrier_off(dev);
@@ -1229,6 +1247,7 @@
 {
 	struct netdev_private *np = dev->priv;
 	unsigned entry;
+	u32 intr_status;
 
 	/* Caution: the write order is important here, set the field
 	   with the "ownership" bits last. */
@@ -1236,6 +1255,12 @@
 	/* Calculate the next Tx descriptor entry. */
 	entry = np->cur_tx % TX_RING_SIZE;
 
+	if (skb->len < ETH_ZLEN) {
+		skb = skb_padto(skb, ETH_ZLEN);
+		if(skb == NULL)
+			return 0;
+	}
+
 	np->tx_skbuff[entry] = skb;
 
 	if ((np->drv_flags & ReqTxAlign) &&
@@ -1272,8 +1297,15 @@
 
 	/* Non-x86 Todo: explicitly flush cache lines here. */
 
-	/* Wake the potentially-idle transmit channel. */
-	writew(CmdTxDemand | np->chip_cmd, dev->base_addr + ChipCmd);
+	/*
+	 * Wake the potentially-idle transmit channel unless errors are
+	 * pending (the ISR must sort them out first).
+	 */
+	intr_status = get_intr_status(dev);
+	if ((intr_status & IntrTxErrSummary) == 0) {
+		writew(CmdTxDemand | np->chip_cmd, dev->base_addr + ChipCmd);
+	}
+	IOSYNC;
 
 	if (np->cur_tx == np->dirty_tx + TX_QUEUE_LEN)
 		netif_stop_queue(dev);
@@ -1300,38 +1332,51 @@
 
 	ioaddr = dev->base_addr;
 	
-	while ((intr_status = readw(ioaddr + IntrStatus))) {
+	while ((intr_status = get_intr_status(dev))) {
 		/* Acknowledge all of the current interrupt sources ASAP. */
+		if (intr_status & IntrTxDescRace)
+			writeb(0x08, ioaddr + IntrStatus2);
 		writew(intr_status & 0xffff, ioaddr + IntrStatus);
+		IOSYNC;
 
 		if (debug > 4)
-			printk(KERN_DEBUG "%s: Interrupt, status %4.4x.\n",
+			printk(KERN_DEBUG "%s: Interrupt, status %8.8x.\n",
 				   dev->name, intr_status);
 
 		if (intr_status & (IntrRxDone | IntrRxErr | IntrRxDropped |
 						   IntrRxWakeUp | IntrRxEmpty | IntrRxNoBuf))
 			via_rhine_rx(dev);
 
-		if (intr_status & (IntrTxDone | IntrTxError | IntrTxUnderrun |
-						   IntrTxAborted))
+		if (intr_status & (IntrTxErrSummary | IntrTxDone)) {
+			if (intr_status & IntrTxErrSummary) {
+				int cnt = 20;
+				/* Avoid scavenging before Tx engine turned off */
+				while ((readw(ioaddr+ChipCmd) & CmdTxOn) && --cnt)
+					udelay(5);
+				if (debug > 2 && !cnt)
+					printk(KERN_WARNING "%s: via_rhine_interrupt() "
+						   "Tx engine still on.\n",
+						   dev->name);
+			}
 			via_rhine_tx(dev);
+		}
 
 		/* Abnormal error summary/uncommon events handlers. */
-		if (intr_status & (IntrPCIErr | IntrLinkChange | IntrMIIChange |
+		if (intr_status & (IntrPCIErr | IntrLinkChange |
 				   IntrStatsMax | IntrTxError | IntrTxAborted |
-				   IntrTxUnderrun))
+				   IntrTxUnderrun | IntrTxDescRace))
 			via_rhine_error(dev, intr_status);
 
 		if (--boguscnt < 0) {
 			printk(KERN_WARNING "%s: Too much work at interrupt, "
-				   "status=0x%4.4x.\n",
+				   "status=%#8.8x.\n",
 				   dev->name, intr_status);
 			break;
 		}
 	}
 
 	if (debug > 3)
-		printk(KERN_DEBUG "%s: exiting interrupt, status=%4.4x.\n",
+		printk(KERN_DEBUG "%s: exiting interrupt, status=%8.8x.\n",
 			   dev->name, readw(ioaddr + IntrStatus));
 }
 
@@ -1405,8 +1450,8 @@
 	int boguscnt = np->dirty_rx + RX_RING_SIZE - np->cur_rx;
 
 	if (debug > 4) {
-		printk(KERN_DEBUG " In via_rhine_rx(), entry %d status %8.8x.\n",
-			   entry, le32_to_cpu(np->rx_head_desc->rx_status));
+		printk(KERN_DEBUG "%s: via_rhine_rx(), entry %d status %8.8x.\n",
+			   dev->name, entry, le32_to_cpu(np->rx_head_desc->rx_status));
 	}
 
 	/* If EOP is set on the next entry, it's a new packet. Send it up. */
@@ -1509,18 +1554,50 @@
 	}
 
 	/* Pre-emptively restart Rx engine. */
-	writew(CmdRxDemand | np->chip_cmd, dev->base_addr + ChipCmd);
+	writew(readw(dev->base_addr + ChipCmd) | CmdRxOn | CmdRxDemand,
+		   dev->base_addr + ChipCmd);
 }
 
-static inline void via_restart_tx(struct net_device *dev) {
+/* Clears the "tally counters" for CRC errors and missed frames(?).
+   It has been reported that some chips need a write of 0 to clear
+   these, for others the counters are set to 1 when written to and
+   instead cleared when read. So we clear them both ways ... */
+static inline void clear_tally_counters(const long ioaddr)
+{
+	writel(0, ioaddr + RxMissed);
+	readw(ioaddr + RxCRCErrs);
+	readw(ioaddr + RxMissed);
+}
+
+static void via_rhine_restart_tx(struct net_device *dev) {
 	struct netdev_private *np = dev->priv;
+	long ioaddr = dev->base_addr;
 	int entry = np->dirty_tx % TX_RING_SIZE;
+	u32 intr_status;
 
-	/* We know better than the chip where it should continue */
-	writel(np->tx_ring_dma + entry * sizeof(struct tx_desc),
-		   dev->base_addr + TxRingPtr);
+	/*
+	 * If new errors occured, we need to sort them out before doing Tx.
+	 * In that case the ISR will be back here RSN anyway.
+	 */
+	intr_status = get_intr_status(dev);
+
+	if ((intr_status & IntrTxErrSummary) == 0) {
+
+		/* We know better than the chip where it should continue. */
+		writel(np->tx_ring_dma + entry * sizeof(struct tx_desc),
+			   ioaddr + TxRingPtr);
+
+		writew(CmdTxDemand | np->chip_cmd, ioaddr + ChipCmd);
+		IOSYNC;
+	}
+	else {
+		/* This should never happen */
+		if (debug > 1)
+			printk(KERN_WARNING "%s: via_rhine_restart_tx() "
+				   "Another error occured %8.8x.\n",
+				   dev->name, intr_status);
+	}
 
-	writew(CmdTxDemand | np->chip_cmd, dev->base_addr + ChipCmd);
 }
 
 static void via_rhine_error(struct net_device *dev, int intr_status)
@@ -1530,7 +1607,7 @@
 
 	spin_lock (&np->lock);
 
-	if (intr_status & (IntrMIIChange | IntrLinkChange)) {
+	if (intr_status & (IntrLinkChange)) {
 		if (readb(ioaddr + MIIStatus) & 0x02) {
 			/* Link failed, restart autonegotiation. */
 			if (np->drv_flags & HasDavicomPhy)
@@ -1548,11 +1625,10 @@
 		np->stats.rx_missed_errors	+= readw(ioaddr + RxMissed);
 		clear_tally_counters(ioaddr);
 	}
-	if (intr_status & IntrTxError) {
+	if (intr_status & IntrTxAborted) {
 		if (debug > 1)
-			printk(KERN_INFO "%s: Abort %4.4x, frame dropped.\n",
+			printk(KERN_INFO "%s: Abort %8.8x, frame dropped.\n",
 				   dev->name, intr_status);
-		via_restart_tx(dev);
 	}
 	if (intr_status & IntrTxUnderrun) {
 		if (np->tx_thresh < 0xE0)
@@ -1561,15 +1637,21 @@
 			printk(KERN_INFO "%s: Transmitter underrun, Tx "
 				   "threshold now %2.2x.\n",
 				   dev->name, np->tx_thresh);
-		via_restart_tx(dev);
 	}
-	if (intr_status & ~( IntrLinkChange | IntrStatsMax |
- 						 IntrTxError | IntrTxAborted | IntrNormalSummary)) {
+	if (intr_status & IntrTxDescRace) {
+		if (debug > 2)
+			printk(KERN_INFO "%s: Tx descriptor write-back race.\n",
+				   dev->name);
+	}
+	if (intr_status & ( IntrTxAborted | IntrTxUnderrun | IntrTxDescRace ))
+		via_rhine_restart_tx(dev);
+
+	if (intr_status & ~( IntrLinkChange | IntrStatsMax | IntrTxUnderrun |
+ 						 IntrTxError | IntrTxAborted | IntrNormalSummary |
+						 IntrTxDescRace )) {
 		if (debug > 1)
-			printk(KERN_ERR "%s: Something Wicked happened! %4.4x.\n",
-			   dev->name, intr_status);
-		/* Recovery for other fault sources not known. */
-		writew(CmdTxDemand | np->chip_cmd, dev->base_addr + ChipCmd);
+			printk(KERN_ERR "%s: Something Wicked happened! %8.8x.\n",
+				   dev->name, intr_status);
 	}
 
 	spin_unlock (&np->lock);
@@ -1590,17 +1672,6 @@
 	return &np->stats;
 }
 
-/* Clears the "tally counters" for CRC errors and missed frames(?).
-   It has been reported that some chips need a write of 0 to clear
-   these, for others the counters are set to 1 when written to and
-   instead cleared when read. So we clear them both ways ... */
-static inline void clear_tally_counters(const long ioaddr)
-{
-	writel(0, ioaddr + RxMissed);
-	readw(ioaddr + RxCRCErrs);
-	readw(ioaddr + RxMissed);
-}
-
 static void via_rhine_set_rx_mode(struct net_device *dev)
 {
 	struct netdev_private *np = dev->priv;
@@ -1794,10 +1865,10 @@
 
 
 static struct pci_driver via_rhine_driver = {
-	name:		"via-rhine",
-	id_table:	via_rhine_pci_tbl,
-	probe:		via_rhine_init_one,
-	remove:		__devexit_p(via_rhine_remove_one),
+	.name		= "via-rhine",
+	.id_table	= via_rhine_pci_tbl,
+	.probe		= via_rhine_init_one,
+	.remove		= __devexit_p(via_rhine_remove_one),
 };
 
 
--- include/linux/skbuff.h-old	Tue Mar 25 14:23:22 2003
+++ include/linux/skbuff.h	Fri Feb 28 12:48:15 2003
@@ -240,6 +240,7 @@
 						int newheadroom,
 						int newtailroom,
 						int priority);
+extern struct sk_buff *		skb_pad(struct sk_buff *skb, int pad);
 #define dev_kfree_skb(a)	kfree_skb(a)
 extern void	skb_over_panic(struct sk_buff *skb, int len, void *here);
 extern void	skb_under_panic(struct sk_buff *skb, int len, void *here);
@@ -1079,6 +1080,26 @@
 	if (delta || skb_cloned(skb))
 		return pskb_expand_head(skb, (delta+15)&~15, 0, GFP_ATOMIC);
 	return 0;
+}
+
+/**
+ *     skb_padto       - pad an skbuff up to a minimal size
+ *     @skb: buffer to pad
+ *     @len: minimal length
+ *
+ *     Pads up a buffer to ensure the trailing bytes exist and are
+ *     blanked. If the buffer already contains sufficient data it
+ *     is untouched. Returns the buffer, which may be a replacement
+ *     for the original, or NULL for out of memory - in which case
+ *     the original buffer is still freed.
+ */
+ 
+static inline struct sk_buff *skb_padto(struct sk_buff *skb, unsigned int len)
+{
+       unsigned int size = skb->len + skb->data_len;
+       if(likely(size >= len))
+               return skb;
+       return skb_pad(skb, len-size);
 }
 
 /**

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-01 18:52     ` Erik Mouw
@ 2003-04-02  4:10       ` Brad Campbell
  2003-04-02  7:01         ` Roger Luethi
  0 siblings, 1 reply; 9+ messages in thread
From: Brad Campbell @ 2003-04-02  4:10 UTC (permalink / raw)
  To: linux-kernel

Erik Mouw wrote:

> 
> Here's the 2.5 driver backported to 2.4.20, it solved my timeout
> problems (with thanks to Roger Luethi). Don't know if the "noapic"
> option is still necessary, but it won't hurt anyway.
> 
> 
> Erik
Yup, Roger sent me the file directly (Many thanks Roger!)
It solved the timeout propblems, I do get these however.

Not that they cause any hiccups in throughput.

eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 40.
eth0: Tx descriptor write-back race.
eth0: Transmit error, Tx status 00008800.
eth0: Transmitter underrun, Tx threshold now 60.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.
eth0: Tx descriptor write-back race.


-- 
Brad....
  /"\
  \ /     ASCII RIBBON CAMPAIGN
   X      AGAINST HTML MAIL
  / \


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: via-rhine problem on EPIAV-1Ghz 2.4.21-pre6
  2003-04-02  4:10       ` Brad Campbell
@ 2003-04-02  7:01         ` Roger Luethi
  0 siblings, 0 replies; 9+ messages in thread
From: Roger Luethi @ 2003-04-02  7:01 UTC (permalink / raw)
  To: Brad Campbell; +Cc: linux-kernel

On Wed, 02 Apr 2003 12:10:00 +0800, Brad Campbell wrote:
> It solved the timeout propblems, I do get these however.
> 
> Not that they cause any hiccups in throughput.
> 
> eth0: Tx descriptor write-back race.
> eth0: Tx descriptor write-back race.
> eth0: Tx descriptor write-back race.
> eth0: Transmit error, Tx status 00008800.
> eth0: Transmitter underrun, Tx threshold now 40.
> eth0: Tx descriptor write-back race.
> eth0: Transmit error, Tx status 00008800.
> eth0: Transmitter underrun, Tx threshold now 60.
> eth0: Tx descriptor write-back race.

These are only informational messages on errors handled by the new code.
You won't see them at the default debug level. I made a few observations
leading me to believe that the number of those errors can be further
reduced, but that will take quite a bit of work.

And there is still a Tx pause of up to a couple of seconds (net watchdog
kicking in) on every GB or so, especially under high load.

Roger

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2003-04-02  6:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-04-01  2:32 via-rhine problem on EPIAV-1Ghz 2.4.21-pre6 Brad Campbell
2003-04-01  2:50 ` Brad Campbell
2003-04-01  4:27 ` Jeff Garzik
2003-04-01  4:35   ` Brad Campbell
2003-04-01  6:38     ` Josh McKinney
2003-04-01 14:05       ` Henrik Persson
2003-04-01 18:52     ` Erik Mouw
2003-04-02  4:10       ` Brad Campbell
2003-04-02  7:01         ` Roger Luethi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).