Subject: [rhialto@azenomei.knuffel.net: Re: vr0: device timeout]
To: None <miod@online.fr, port-i386@netbsd.org>
From: Gilbert Fernandes <gilbertf@netbsd-fr.org>
List: port-i386
Date: 04/20/2003 01:18:37
Good that the patch works :-)
For those who require it, I added a force
reset to the if_vr.c so the via rhine cards won't
get stuck when they die with a watchdog timeout.
Add this to if_vrreg.h :
#define VR_FORCE_RESET 0x40
#define VR_MISC 0x81
And modify the vr_reset() like this:
[...]
if (i == VR_TIMEOUT) {
printf("%s: reset never completed!\n",
sc->vr_dev.dv_xname);
printf("%s: trying to force reset.\n",
sc->vr_dev.dv_xname);
VR_SETBIT16(sc, VR_MISC, VR_FORCE_RESET);
}
If some people could check that it's valid and
works for other VIA cards perhaps we could do
a pr. I guess that miod (from OpenBSD) has very
probably better code and a more elegant solution.
:-)
----- Forwarded message from Rhialto -----
> > Thanks! I will try that! I'll let you know
> > the results, but it may be a few days since
> > I am on vacation (but I have the laptop with me :-)
>
> We have a fix. I discussed of it with Miod from
> the OpenBSD project, and he has found the same
> problem as us, and he has a fix. He's been faster
> than us :-)
You can say that again! In the mean time, I have
had opportunity to test your patch (a few times
involuntarily at least) and so far it works ok.
--
Gilbert Fernandes