From eugen@www.svzserv.kemerovo.su  Tue Aug 19 01:10:07 2003
Return-Path: <eugen@www.svzserv.kemerovo.su>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id E0AA816A4BF
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Aug 2003 01:10:07 -0700 (PDT)
Received: from www.svzserv.kemerovo.su (www.svzserv.kemerovo.su [213.184.65.80])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 092A143F85
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Aug 2003 01:10:05 -0700 (PDT)
	(envelope-from eugen@www.svzserv.kemerovo.su)
Received: from www.svzserv.kemerovo.su (eugen@localhost [127.0.0.1])
	by www.svzserv.kemerovo.su (8.12.9/8.12.9) with ESMTP id h7J8A2el035119
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 19 Aug 2003 16:10:02 +0800 (KRAST)
	(envelope-from eugen@www.svzserv.kemerovo.su)
Received: (from eugen@localhost)
	by www.svzserv.kemerovo.su (8.12.9/8.12.9/Submit) id h7J8A1HO035115;
	Tue, 19 Aug 2003 16:10:01 +0800 (KRAST)
Message-Id: <200308190810.h7J8A1HO035115@www.svzserv.kemerovo.su>
Date: Tue, 19 Aug 2003 16:10:01 +0800 (KRAST)
From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: rl(4) not working in recent 4.8-STABLE: watchdog timeout
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         55727
>Category:       kern
>Synopsis:       [rl] rl(4) not working in recent 4.8-STABLE: watchdog timeout
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    glebius
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 20 02:40:16 PDT 2003
>Closed-Date:    Mon Oct 24 08:38:54 GMT 2005
>Last-Modified:  Mon Oct 24 08:38:54 GMT 2005
>Originator:     Eugene Grosbein
>Release:        FreeBSD 4.8-STABLE i386
>Organization:
Svyaz Service JSC
>Environment:
System: FreeBSD gw4.svzserv.kuzbass.ru 4.8-STABLE FreeBSD 4.8-STABLE #1: Thu Apr 10 11:51:46 KRAST 2003     sa@gw4.svzserv.kemerovo.su:/usr/obj/usr/src/sys/GW4  i386
	That is working system's output of uname -a.
	4.8-STABLE of today does not work with rl(4).

>Description:
	I have one remote server with one fxp(4) and three rl(4) NICs.
	I log in through fxp0. rl0 is in use too, rl1 is up but is not
	used (cable not connected), rl2 is even not configured.
	All worked right until today.

	Today I've upgraded this router using cvsup and rl0 does not
	work now. States of all rlX are displayed correctly,
	media is detected right but there is no traffic and
	lots of 'watchdog timeout' messages in logs
	for rl0 and rl1 (these interfaces are UP). 

	I managed to reboot system with old kernel and all is fine again.

	Here is unified diff for dmesg.boot between old, working
	kernel (---) and new, not working one (+++). Perhaps
	it is faulure of rl(4) or the reason is in recent pmtimer(4)
	integration. The kernel config file is the same for both kernels.

--- 1.1	Tue Aug 19 14:51:33 2003
+++ 2.1	Tue Aug 19 14:51:45 2003
@@ -1,10 +1,10 @@
 /kernel: Copyright (c) 1992-2003 The FreeBSD Project.
 /kernel: Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
 /kernel: The Regents of the University of California. All rights reserved.
-/kernel: FreeBSD 4.8-STABLE #1: Thu Apr 10 11:51:46 KRAST 2003
-/kernel: sa@gw4.svzserv.kemerovo.su:/usr/obj/usr/src/sys/GW4
-/kernel: Timecounter "i8254"  frequency 1193383 Hz
-/kernel: Timecounter "TSC"  frequency 1212135483 Hz
+/kernel: FreeBSD 4.8-STABLE #2: Tue Aug 19 10:25:04 KRAST 2003
+/kernel: sa@gw4.svzserv.kuzbass.ru:/usr/obj/usr/src/sys/GW4
+/kernel: Timecounter "i8254"  frequency 1193382 Hz
+/kernel: Timecounter "TSC"  frequency 1212135401 Hz
 /kernel: CPU: Intel(R) Celeron(TM) CPU                1200MHz (1212.14-MHz 686-class CPU)
 /kernel: Origin = "GenuineIntel"  Id = 0x6b1  Stepping = 1
 /kernel: Features=0x383fbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,MMX,FXSR,SSE>
@@ -49,9 +49,9 @@
 /kernel: No such device: adv0
 /kernel: Invalid command or syntax.  Type `?' for help.
 /kernel: config> q
-/kernel: avail memory = 126017536 (123064K bytes)
-/kernel: Preloaded elf kernel "kernel" at 0xc032e000.
-/kernel: Preloaded userconfig_script "/boot/kernel.conf" at 0xc032e09c.
+/kernel: avail memory = 125988864 (123036K bytes)
+/kernel: Preloaded elf kernel "kernel" at 0xc0335000.
+/kernel: Preloaded userconfig_script "/boot/kernel.conf" at 0xc033509c.
 /kernel: Pentium Pro MTRR support enabled
 /kernel: Using $PIR table, 6 entries at 0xc00fcb90
 /kernel: npx0: <math processor> on motherboard
@@ -61,17 +61,17 @@
 /kernel: pci0: <Intel model 1132 VGA-compatible display device> at 2.0 irq 9
 /kernel: pcib1: <Intel 82801BA/BAM (ICH2) Hub to PCI bridge> at device 30.0 on pci0
 /kernel: pci1: <PCI bus> on pcib1
-/kernel: rl0: <D-Link DFE-530TX+ 10/100BaseTX> port 0xc000-0xc0ff mem 0xe4000000-0xe40000ff irq 11 at device 0.0 on pci1
+/kernel: rl0: <D-Link DFE-530TX+ 10/100BaseTX, rev. 8139D/8100B/8100C> port 0xc000-0xc0ff mem 0xe4000000-0xe40000ff irq 11 at device 0.0 on pci1
 /kernel: rl0: Ethernet address: 00:05:5d:4c:23:0c
 /kernel: miibus0: <MII bus> on rl0
 /kernel: rlphy0: <RealTek internal media interface> on miibus0
 /kernel: rlphy0:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
-/kernel: rl1: <D-Link DFE-530TX+ 10/100BaseTX> port 0xc400-0xc4ff mem 0xe4001000-0xe40010ff irq 5 at device 1.0 on pci1
+/kernel: rl1: <D-Link DFE-530TX+ 10/100BaseTX, rev. 8139D/8100B/8100C> port 0xc400-0xc4ff mem 0xe4001000-0xe40010ff irq 5 at device 1.0 on pci1
 /kernel: rl1: Ethernet address: 00:05:5d:4e:e1:b2
 /kernel: miibus1: <MII bus> on rl1
 /kernel: rlphy1: <RealTek internal media interface> on miibus1
 /kernel: rlphy1:  10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
-/kernel: rl2: <D-Link DFE-530TX+ 10/100BaseTX> port 0xc800-0xc8ff mem 0xe4002000-0xe40020ff irq 12 at device 2.0 on pci1
+/kernel: rl2: <D-Link DFE-530TX+ 10/100BaseTX, rev. 8139D/8100B/8100C> port 0xc800-0xc8ff mem 0xe4002000-0xe40020ff irq 12 at device 2.0 on pci1
 /kernel: rl2: Ethernet address: 00:05:5d:4e:e1:b5
 /kernel: miibus2: <MII bus> on rl2
 /kernel: rlphy2: <RealTek internal media interface> on miibus2
@@ -87,6 +87,7 @@
 /kernel: ata1: at 0x170 irq 15 on atapci0
 /kernel: pci0: <unknown card> (vendor=0x8086, dev=0x2443) at 31.3 irq 12
 /kernel: orm0: <Option ROM> at iomem 0xc0000-0xc9fff on isa0
+/kernel: pmtimer0 on isa0
 /kernel: fdc0: <NEC 72065B or clone> at port 0x3f0-0x3f5,0x3f7 irq 6 drq 2 on isa0
 /kernel: atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
 /kernel: atkbd0: <AT Keyboard> irq 1 on atkbdc0
@@ -103,3 +104,5 @@
 /kernel: IPsec: Initialized Security Association Processing.
 /kernel: ad0: 4110MB <QUANTUM FIREBALL SE4.3A> [14848/9/63] at ata0-master UDMA33
 /kernel: Mounting root from ufs:/dev/ad0s1a
+/kernel: rl0: watchdog timeout
+/kernel: rl1: watchdog timeout


	Here comes kernel config file.

# GW4 kernel config
#
# Hardware:
# 	Gigabyte Motherboard 815E, 
#	Intel Celeron 1.2Ghz processor
#
options		INCLUDE_CONFIG_FILE

machine		i386
#cpu		I386_CPU
#cpu		I486_CPU
#cpu		I586_CPU
cpu		I686_CPU
ident		GW4
maxusers	0

makeoptions	DEBUG=-g		#Build kernel with gdb(1) debug symbols

#options 	MATH_EMULATE		#Support for x87 emulation
options		CLK_CALIBRATION_LOOP
options		CLK_USE_I8254_CALIBRATION
options		CLK_USE_TSC_CALIBRATION

options 	INET			#InterNETworking
#options 	INET6			#IPv6 communications protocols
options 	FFS			#Berkeley Fast Filesystem
options 	FFS_ROOT		#FFS usable as root device [keep this!]
options 	SOFTUPDATES		#Enable FFS soft updates support
#options 	MFS			#Memory Filesystem
#options 	MD_ROOT			#MD is a potential root device
options 	NFS			#Network Filesystem
#options 	NFS_ROOT		#NFS usable as root device, NFS required
#options 	MSDOSFS			#MSDOS Filesystem
#options 	CD9660			#ISO 9660 Filesystem
#options 	CD9660_ROOT		#CD-ROM usable as root, CD9660 required
#options 	PROCFS			#Process filesystem
options 	COMPAT_43		#Compatible with BSD 4.3 [KEEP THIS!]
options 	SCSI_DELAY=15000	#Delay (in ms) before probing SCSI
#options 	UCONSOLE		#Allow users to grab the console
options 	USERCONFIG		#boot -c editor
options 	VISUAL_USERCONFIG	#visual boot -c editor
options 	KTRACE			#ktrace(1) support
options 	SYSVSHM			#SYSV-style shared memory
options 	SYSVMSG			#SYSV-style message queues
options 	SYSVSEM			#SYSV-style semaphores
options		SHMMAXPGS=4096
options 	P1003_1B		#Posix P1003_1B real-time extensions
options 	_KPOSIX_PRIORITY_SCHEDULING
options		ICMP_BANDLIM		#Rate limit bad replies
options 	KBD_INSTALL_CDEV	# install a CDEV entry in /dev
#options		PPP_BSDCOMP
#options		PPP_DEFLATE
#options		PPP_FILTER
options		NSWAPDEV=4
options		MSGBUF_SIZE=140960

device		isa
#options		"AUTO_EOI_1"

#device		eisa
device		pci

# Floppy drives
device		fdc0	at isa? port IO_FD1 irq 6 drq 2
device		fd0	at fdc0 drive 0
#device		fd1	at fdc0 drive 1
#
# If you have a Toshiba Libretto with its Y-E Data PCMCIA floppy,
# don't use the above line for fdc0 but the following one:
#device		fdc0

# ATA and ATAPI devices
#device		ata0	at isa? port IO_WD1 irq 14
#device		ata1	at isa? port IO_WD2 irq 15
device		ata
device		atadisk			# ATA disk drives
device		atapicd			# ATAPI CDROM drives
#device		atapifd			# ATAPI floppy drives
#device		atapist			# ATAPI tape drives
options 	ATA_STATIC_ID		#Static device numbering

# atkbdc0 controls both the keyboard and the PS/2 mouse
device		atkbdc0	at isa? port IO_KBD
device		atkbd0	at atkbdc? irq 1 flags 0x0
#device		psm0	at atkbdc? irq 12

device		vga0	at isa?
#options		VESA

# splash screen/screen saver
#pseudo-device	splash

# syscons is the default console driver, resembling an SCO console
device		sc0	at isa? flags 0x100
options		MAXCONS=16
options		SC_HISTORY_SIZE=1000

# Floating point support - do not disable.
device		npx0	at nexus? port IO_NPX irq 13

# Power management support (see LINT for more options)
#device		apm0    at nexus? disable flags 0x20 # Advanced Power Management

# Serial (COM) ports
device		sio0	at isa? port IO_COM1 flags 0x10 irq 4
device		sio1	at isa? port IO_COM2 irq 3
#device		sio2	at isa? disable port IO_COM3 irq 5
#device		sio3	at isa? disable port IO_COM4 irq 9

# Parallel port
#device		ppc0	at isa? irq 7
#device		ppbus		# Parallel port bus (required)
#device		lpt		# Printer
#device		plip		# TCP/IP over parallel
#device		ppi		# Parallel port interface device
#device		vpo		# Requires scbus and da

# PCI Ethernet NICs that use the common MII bus controller code.
# NOTE: Be sure to keep the 'device miibus' line in order to use these NICs!
device		miibus		# MII bus support
#device		dc		# DEC/Intel 21143 and various workalikes
#device		de
device		fxp		# Intel EtherExpress PRO/100B (82557, 82558)
#device		pcn		# AMD Am79C97x PCI 10/100 NICs
device		rl		# RealTek 8129/8139
#device		sf		# Adaptec AIC-6915 (``Starfire'')
#device		sis		# Silicon Integrated Systems SiS 900/SiS 7016
#device		ste		# Sundance ST201 (D-Link DFE-550TX)
#device		tl		# Texas Instruments ThunderLAN
#device		tx		# SMC EtherPower II (83c170 ``EPIC'')
#device		vr		# VIA Rhine, Rhine II
#device		wb		# Winbond W89C840F
#device		wx		# Intel Gigabit Ethernet Card (``Wiseman'')
#device		xl		# 3Com 3c90x (``Boomerang'', ``Cyclone'')

#device		ed0	at isa? port 0x300 irq 5 iomem 0xd0000
#device		ed1	at isa? port 0x320 irq 10 iomem 0xd8000

#device pcm0 at isa? port ? irq 5 drq 1

# Pseudo devices - the number indicates how many units to allocate.
pseudo-device	loop		# Network loopback
pseudo-device	ether		# Ethernet support
#pseudo-device	sl	1	# Kernel SLIP
pseudo-device	ppp	4	# Kernel PPP
pseudo-device	tun		# Packet tunnel.
pseudo-device	pty	64	# Pseudo-ttys (telnet etc)
pseudo-device	gre
pseudo-device	snp	4
#pseudo-device	vn
#pseudo-device	gzip
pseudo-device	speaker
#pseudo-device	md		# Memory "disks"
pseudo-device	gif		# IPv6 and IPv4 tunneling
#pseudo-device	faith	1	# IPv6-to-IPv4 relaying (translation)

# The `bpf' pseudo-device enables the Berkeley Packet Filter.
# Be aware of the administrative consequences of enabling this!
pseudo-device	bpf		#Berkeley packet filter

options		IPSEC
options		IPSEC_ESP
options 	IPFIREWALL
options 	IPFIREWALL_VERBOSE
#options 	IPFIREWALL_VERBOSE_LIMIT=100
options 	IPDIVERT
options 	IPFIREWALL_FORWARD
#options		IPSTEALTH

#options		IPFILTER
#options		IPFILTER_LOG

options 	HZ=1000
options		DEVICE_POLLING

options 	TCP_DROP_SYNFIN		#drop TCP packets with SYN+FIN
options 	DUMMYNET
options		NMBCLUSTERS=8192
#options		DDB
#options		DDB_UNATTENDED
options		RANDOM_IP_ID
options		UFS_DIRHASH
#options		USER_LDT
options 	TCP_DROP_SYNFIN		#drop TCP packets with SYN+FIN

>How-To-Repeat:
	
	Run recent 4.8-STABLE with D-Link DFE-530TX+ 10/100BaseTX.

>Fix:

	Unknown to me.
>Release-Note:
>Audit-Trail:

From: Eugene Grosbein <eugen@kuzbass.ru>
To: bug-followup@freebsd.org
Cc:  
Subject: Re: kern/55727: rl(4) not working in recent 4.8-STABLE: watchdog timeout
Date: Tue, 02 Sep 2003 14:28:46 +0800

 Bill Paul wrote:
 > 
 > Ok. I went out and bought a D-Link 530+ card with the same chip you
 > have and used the latest (.18) driver, and it works fine for me.
 > I am really not sure what's broken. There are only two small things
 > that _might_ have bearing on the problem. To test my theory, download
 > the driver from:
 > 
 > http://www.freebsd.org/~wpaul/RealTek/4-stable
 > 
 > Copy the version of if_rl.c and if_rlreg.h from that location into
 > /sys/pci and see if they work.
 > 
 > -Bill
 
 H!
 
 I think I've found traces of breakage.
 
 My kernel contains options DEVICE_POLLING. However, I did not enable
 polling using sysctl. Now I've got your last version and deleted
 DEVICE_POLLING from the kernel. And all cards started to work as before.
 
 Hope this will help.
 
 Eugene Grosbein
State-Changed-From-To: open->feedback 
State-Changed-By: bms 
State-Changed-When: Tue 25 Nov 2003 09:02:28 PST 
State-Changed-Why:  
I'm in hoover up network PRs mode. I'll look into this. 



Responsible-Changed-From-To: freebsd-bugs->bms 
Responsible-Changed-By: bms 
Responsible-Changed-When: Tue 25 Nov 2003 09:02:28 PST 
Responsible-Changed-Why:  
I'm in hoover up network PRs mode. I'll look into this. 


http://www.freebsd.org/cgi/query-pr.cgi?pr=55727 

From: Eugene Grosbein <eugen@kuzbass.ru>
To: bug-followup@freebsd.org
Cc: bms@freebsd.org
Subject: Re: kern/55727: rl(4) not working in recent 4.8-STABLE: watchdog timeout
Date: Thu, 08 Jan 2004 17:58:48 +0700

 What this PR is in the followup state for?
 
 Eugene
State-Changed-From-To: feedback->open 
State-Changed-By: bms 
State-Changed-When: Tue 13 Jan 2004 10:05:21 PST 
State-Changed-Why:  
Not sure why this was in feedback, probably a slip of the keys. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55727 
Responsible-Changed-From-To: bms->freebsd-bugs 
Responsible-Changed-By: bms 
Responsible-Changed-When: Fri Jun 18 02:12:58 GMT 2004 
Responsible-Changed-Why:  
Back to the free pool 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55727 

From: Ask Holme <ask@eternal-newbie.dk>
To: freebsd-gnats-submit@FreeBSD.org, eugen@grosbein.pp.ru
Cc:  
Subject: Re: kern/55727 rl(4) not working in recent 4.8-STABLE: watchdog timeout
Date: Tue, 3 Aug 2004 12:56:48 +0200

 I see the same problem trying to install via a 8139D card from the
 5.2.1-RELEASE boot floppies.
 --
 Ask Holme
   "<+lisa`> well, sometimes, when the moon is right i like to print out 
    the source code to the Linux kernel, scatter them on the floor, lube
    myself up and roll around in the printed code."
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: rodrigc 
Responsible-Changed-When: Wed Oct 5 03:41:38 GMT 2005 
Responsible-Changed-Why:  
DEVICE_POLLING fixes by glebius might fix this 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55727 
State-Changed-From-To: open->feedback 
State-Changed-By: glebius 
State-Changed-When: Wed Oct 5 10:22:43 GMT 2005 
State-Changed-Why:  
Is the problem reproducible on modern FreeBSD versions (5.4, 6.0)? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55727 

From: Eugene Grosbein <eugen@grosbein.pp.ru>
To: Gleb Smirnoff <glebius@FreeBSD.org>
Cc: bug-followup@FreeBSD.org
Subject: Re: kern/55727: [if_rl] rl(4) not working in recent 4.8-STABLE: watchdog timeout
Date: Wed, 5 Oct 2005 18:32:59 +0800

 On Wed, Oct 05, 2005 at 10:23:20AM +0000, Gleb Smirnoff wrote:
 > Synopsis: [if_rl] rl(4) not working in recent 4.8-STABLE: watchdog timeout
 > 
 > State-Changed-From-To: open->feedback
 > State-Changed-By: glebius
 > State-Changed-When: Wed Oct 5 10:22:43 GMT 2005
 > State-Changed-Why: 
 > Is the problem reproducible on modern FreeBSD versions (5.4, 6.0)?
 
 The mentioned installation still runs the same hardware configuration
 using FreeBSD 4.11-STABLE, polling is disabled.
 
 It is production remote router, it's pretty stable and I have no plans
 to upgrade it in the near future.
 
 Eugene
State-Changed-From-To: feedback->closed 
State-Changed-By: linimon 
State-Changed-When: Mon Oct 24 08:36:01 GMT 2005 
State-Changed-Why:  
Submitter is no longer in a position to test whether the newest changes 
fix this problem.  If someone else is having this problem with a 5.X or 
6.X system, a new PR should be opened. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=55727 
>Unformatted:
