From nobody@FreeBSD.org  Fri Jul 14 12:29:15 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 27B1716A4DD
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Jul 2006 12:29:15 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id E890943D45
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Jul 2006 12:29:14 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k6ECTEcR081398
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 14 Jul 2006 12:29:14 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k6ECTErK081397;
	Fri, 14 Jul 2006 12:29:14 GMT
	(envelope-from nobody)
Message-Id: <200607141229.k6ECTErK081397@www.freebsd.org>
Date: Fri, 14 Jul 2006 12:29:14 GMT
From: heeroy <heeroy@starlight.twbbs.org>
To: freebsd-gnats-submit@FreeBSD.org
Subject: rl0: watchdog timeout
X-Send-Pr-Version: www-2.3

>Number:         100290
>Category:       kern
>Synopsis:       [rl] rl0: watchdog timeout [regression]
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    yongari
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 14 12:30:18 GMT 2006
>Closed-Date:    Thu Oct 21 19:23:02 UTC 2010
>Last-Modified:  Thu Oct 21 19:23:02 UTC 2010
>Originator:     heeroy
>Release:        FreeBSD 6.1 p3
>Organization:
yahoo
>Environment:
FreeBSD heeroy-laptop.heeroy.info 6.1-RELEASE-p3 FreeBSD 6.1-RELEASE-p3 #0: Sun Jul  9 20:24:59 CST 2006     root@:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
when I'm using portsnap or csup to update my system/ports, rl0: watchdog
timeout will popup to ttyv0, and then my network hangs up.  I was upgrade
my system from 6.1 release, maybe 6.1 release is OK for my laptop (Toshiba
M50, celeron version).  But when I'm using 6.1 release bootonly disc to
install from internet, network is not working, too.
>How-To-Repeat:
fetch anything from internet. 
>Fix:
no idea.
>Release-Note:
>Audit-Trail:

From: heeroy <heeroy@starlight.twbbs.org>
To: bug-followup@FreeBSD.org,  heeroy@starlight.twbbs.org
Cc:  
Subject: Re: i386/100290: rl0: watchdog timeout
Date: Thu, 27 Jul 2006 22:41:36 +0800

 after testing,
 FreeBSD 4.11 and 5.5 is working fine with rl0
 (BTW: I tried remote upgrade from 4.11 to 5.5)
 But after upgrade from 5.5 to 6.1, rl0 get "watchdog timeout" again
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jul 29 07:52:36 UTC 2006 
Responsible-Changed-Why:  
This does not sound i386-specific. 

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

From: heeroy <heeroy@starlight.twbbs.org>
To: bug-followup@FreeBSD.org,  heeroy@starlight.twbbs.org
Cc:  
Subject: Re: kern/100290: [rl] rl0: watchdog timeout (regression)
Date: Mon, 25 Sep 2006 22:09:12 +0800

 FreeBSD 7-Current (200609)
 rl0 doesn't get any problem~ :-)
State-Changed-From-To: open->feedback 
State-Changed-By: remko 
State-Changed-When: Mon Dec 25 16:30:54 UTC 2006 
State-Changed-Why:  
Can you tell whether this is still there in 6-STABLE ? 
We might need to merge some commits to this branch to 
make sure this also works in -RELEASE versions. Thanks 
for taking the time to report this and test this through 
various releases. 


Responsible-Changed-From-To: freebsd-bugs->remko 
Responsible-Changed-By: remko 
Responsible-Changed-When: Mon Dec 25 16:30:54 UTC 2006 
Responsible-Changed-Why:  
grab the pr to trace feedback 


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

From: heeroy <heeroy@starlight.twbbs.org>
To: bug-followup@FreeBSD.org,  heeroy@starlight.twbbs.org
Cc:  
Subject: Re: kern/100290: [rl] rl0: watchdog timeout (regression)
Date: Wed, 27 Dec 2006 00:24:24 +0800

 Yes, it still occurs on my Laptop with FreeBSD 6.1
 (I'm not upgrading to FreeBSD 6.2 pre-release yet)
 
 BTW....
 I can't reply messages fastly in the future until 2007 March,
 but if I have vacation from Army,
 I will help to test asap~ :-)
 
 good luck, and thank for your help~
State-Changed-From-To: feedback->open 
State-Changed-By: linimon 
State-Changed-When: Tue Jun 12 07:42:10 UTC 2007 
State-Changed-Why:  
Apparently the problem still recurred as of 6.1. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100290 
Responsible-Changed-From-To: remko->yongari 
Responsible-Changed-By: remko 
Responsible-Changed-When: Thu Feb 21 17:53:58 UTC 2008 
Responsible-Changed-Why:  
Hey Pyun, you have been recently working on various of similiar problems 
do you have an idea about the following PR? if not please reassign it 
to me so that I can look further. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100290 
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Wed Apr 2 00:07:43 UTC 2008 
State-Changed-Why:  
Would you please apply the following patch and let me know how 
it goes? 

http://people.freebsd.org/~yongari/rl.watchdog.patch 

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

From: heeroy <heeroy@starlight.twbbs.org>
To: bug-followup@FreeBSD.org, heeroy@starlight.twbbs.org
Cc:  
Subject: Re: kern/100290: [rl] rl0: watchdog timeout (regression)
Date: Sun, 13 Apr 2008 21:07:59 +0800

 hi yongari:
 
 After upgrading and installing to 6.3,
 this problem is not occur any more.
 So I don't try your patch.
 But if you think this is a necessary test, I will test it next weekend.
 
 Thank you.

From: heeroy <heeroy@starlight.twbbs.org>
To: bug-followup@FreeBSD.org, Cron Daemon <heeroy@starlight.twbbs.org>
Cc:  
Subject: Re: kern/100290: [rl] rl0: watchdog timeout [regression]
Date: Sun, 01 Jun 2008 11:37:41 +0800

 sorry for late reply...
 
 After testing,
 
 rl0: watchdog timeout message occured again at FreeBSD 6.3 before I use
 your patch
 
 When receiving a big file from internet, rl0 works correctly.
 
 When receiving a lot of small files from internet, watchdog timeout
 coming again...
 
 I tried your patch and remake kernel, but this situation doesn't improve.
State-Changed-From-To: feedback->open 
State-Changed-By: yongari 
State-Changed-When: Mon Jun 2 01:27:47 UTC 2008 
State-Changed-Why:  
feedback received. 

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

From: Pyun YongHyeon <pyunyh@gmail.com>
To: heeroy <heeroy@heeroy.no-ip.org>, bug-followup@FreeBSD.org
Cc: yongari@FreeBSD.org
Subject: Re: kern/100290: [rl] rl0: watchdog timeout [regression]
Date: Thu, 17 Jul 2008 11:45:53 +0900

 --UHN/qo2QbUvPLonB
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline
 
 On Sun, Jun 01, 2008 at 04:00:19AM +0000, heeroy wrote:
  > The following reply was made to PR kern/100290; it has been noted by GNATS.
  > 
  > From: heeroy <heeroy@starlight.twbbs.org>
  > To: bug-followup@FreeBSD.org, Cron Daemon <heeroy@starlight.twbbs.org>
  > Cc:  
  > Subject: Re: kern/100290: [rl] rl0: watchdog timeout [regression]
  > Date: Sun, 01 Jun 2008 11:37:41 +0800
  > 
  >  sorry for late reply...
  >  
  >  After testing,
  >  
  >  rl0: watchdog timeout message occured again at FreeBSD 6.3 before I use
  >  your patch
  >  
  >  When receiving a big file from internet, rl0 works correctly.
  >  
  >  When receiving a lot of small files from internet, watchdog timeout
  >  coming again...
  >  
  >  I tried your patch and remake kernel, but this situation doesn't improve.
 
 Would you try attached patch and let me know the result?
 
 -- 
 Regards,
 Pyun YongHyeon
 
 --UHN/qo2QbUvPLonB
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: attachment; filename="rl.patch"
 
 Index: sys/pci/if_rl.c
 ===================================================================
 --- sys/pci/if_rl.c	(revision 180564)
 +++ sys/pci/if_rl.c	(working copy)
 @@ -1236,7 +1236,6 @@
  				CSR_WRITE_4(sc, RL_TXCFG, RL_TXCFG_CONFIG);
  			oldthresh = sc->rl_txthresh;
  			/* error recovery */
 -			rl_reset(sc);
  			rl_init_locked(sc);
  			/* restore original threshold */
  			sc->rl_txthresh = oldthresh;
 @@ -1305,10 +1304,8 @@
  
  		/* XXX We should check behaviour on receiver stalls. */
  
 -		if (status & RL_ISR_SYSTEM_ERR) {
 -			rl_reset(sc);
 +		if (status & RL_ISR_SYSTEM_ERR)
  			rl_init_locked(sc);
 -		}
  	}
  }
  #endif /* DEVICE_POLLING */
 @@ -1345,10 +1342,8 @@
  			rl_rxeof(sc);
  		if ((status & RL_ISR_TX_OK) || (status & RL_ISR_TX_ERR))
  			rl_txeof(sc);
 -		if (status & RL_ISR_SYSTEM_ERR) {
 -			rl_reset(sc);
 +		if (status & RL_ISR_SYSTEM_ERR)
  			rl_init_locked(sc);
 -		}
  	}
  
  	if (!IFQ_DRV_IS_EMPTY(&ifp->if_snd))
 @@ -1489,6 +1484,8 @@
  	 */
  	rl_stop(sc);
  
 +	rl_reset(sc);
 +
  	/*
  	 * Init our MAC address.  Even though the chipset
  	 * documentation doesn't mention it, we need to enter "Config
 @@ -1710,8 +1707,17 @@
  	callout_stop(&sc->rl_stat_callout);
  	ifp->if_drv_flags &= ~(IFF_DRV_RUNNING | IFF_DRV_OACTIVE);
  
 +	CSR_WRITE_2(sc, RL_IMR, 0x0000);
  	CSR_WRITE_1(sc, RL_COMMAND, 0x00);
 -	CSR_WRITE_2(sc, RL_IMR, 0x0000);
 +	for (i = 0; i < RL_TIMEOUT; i++) {
 +		DELAY(1);
 +		if ((CSR_READ_1(sc, RL_COMMAND) &
 +		    (RL_CMD_RX_ENB | RL_CMD_TX_ENB)) == 0)
 +			break;
 +	}
 +	if (i == RL_TIMEOUT)
 +		device_printf(sc->rl_dev, "stopping Tx/Rx MAC timed out!\n");
 +
  	bus_dmamap_unload(sc->rl_tag, sc->rl_cdata.rl_rx_dmamap);
  
  	/*
 
 --UHN/qo2QbUvPLonB--
State-Changed-From-To: open->feedback 
State-Changed-By: yongari 
State-Changed-When: Tue Jul 6 00:48:55 UTC 2010 
State-Changed-Why:  
Is it still reproducible on more recent FreeBSD release? 

http://www.freebsd.org/cgi/query-pr.cgi?pr=100290 
State-Changed-From-To: feedback->closed 
State-Changed-By: yongari 
State-Changed-When: Thu Oct 21 19:22:33 UTC 2010 
State-Changed-Why:  
Close(feedback timed out). rl(4) in HEAD has improved interrupt 
handler(r213796) which may affect your situation. If you still see 
the issue please open a new PR. 
Thanks for reporting. 

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