Re: re driver problem

From: John Angelmo <john_at_veidit.net>
Date: Thu, 03 Jun 2004 15:55:14 +0200
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
> _at__at_ -1727,7 +1727,9 _at__at_
>         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;
>         }
>  
>         /*
> _at__at_ -1736,8 +1738,10 _at__at_
>          * 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
Received on Thu Jun 03 2004 - 04:56:32 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:55 UTC