From owner-freebsd-current@FreeBSD.ORG Thu Jun 3 06:56:32 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1399516A4CE for ; Thu, 3 Jun 2004 06:56:32 -0700 (PDT) Received: from willow.veidit.net (willow.veidit.net [81.93.138.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F05F43D2F for ; Thu, 3 Jun 2004 06:56:31 -0700 (PDT) (envelope-from john@veidit.net) Received: from [192.168.20.13] (c-f38e71d5.22-1-64736c10.cust.bredbandsbolaget.se [213.113.142.243]) (authenticated bits=0) by willow.veidit.net (8.12.10/8.12.10) with ESMTP id i53DuApM041147; Thu, 3 Jun 2004 15:56:11 +0200 (CEST) Message-ID: <40BF2DC2.7040202@veidit.net> Date: Thu, 03 Jun 2004 15:55:14 +0200 From: John Angelmo User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7) Gecko/20040521 X-Accept-Language: sv, en-gb, en, en-us MIME-Version: 1.0 To: Sven Petai References: <40A10AC8.6080406@veidit.net> <40A1F7C9.1010801@veidit.net> <20040517201611.GC88080@cserv62.csub.edu> <200405262218.24586.hadara@bsd.ee> In-Reply-To: <200405262218.24586.hadara@bsd.ee> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: freebsd-current@freebsd.org Subject: Re: re driver problem X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jun 2004 13:56:32 -0000 Sven Petai wrote: > On Monday 17 May 2004 23:16, Russell Jackson wrote: > >>On Wed, May 12, 2004 at 12:09:13PM +0200, John Angelmo wrote: >> >>>S?ren Schmidt wrote: >>> >>>>Thats a known problem, its been like this for ages... >>>> >>>>I hacked rl to take the card instead, works like a charm... >>> >>>How did you do that? do you have a patch for it? perhaps we can replace >>>re with a hacked rl? >>> >>>/John >> >>I'd also be interested in a patch. > > > hi > > following patch seems to fix the longstanding "re0: watchdog timeout" problem > ( at least on my laptop). I haven't done much testing yet but it survived 3 > cvsups without problems, without it I got first timeout in ~30 seconds, so > let me know if it works/doesn't work for your systems.... > > Sven Petai > > --- sys/dev/re/if_re.c.orig Wed May 26 21:33:53 2004 > +++ sys/dev/re/if_re.c Wed May 26 21:42:05 2004 > @@ -1727,7 +1727,9 @@ > if (idx != sc->rl_ldata.rl_tx_considx) { > sc->rl_ldata.rl_tx_considx = idx; > ifp->if_flags &= ~IFF_OACTIVE; > - ifp->if_timer = 0; > + /* reset the timer only if TX buffer is empty */ > + if (idx == sc->rl_ldata.rl_tx_prodidx) > + ifp->if_timer = 0; > } > > /* > @@ -1736,8 +1738,10 @@ > * interrupt that will cause us to re-enter this routine. > * This is done in case the transmitter has gone idle. > */ > - if (sc->rl_ldata.rl_tx_free != RL_TX_DESC_CNT) > - CSR_WRITE_4(sc, RL_TIMERCNT, 1); > + if (sc->rl_ldata.rl_tx_free != RL_TX_DESC_CNT) { > + CSR_WRITE_4(sc, RL_TIMERCNT, 1); > + ifp->if_timer = 5; > + } > > return; > } > Sorry I still got the same problem, the patch compiles just fine but the driver still gets timeout /John