Small tweak: force another reset of the adapter after probing for all the

PHYs in tl_attach(). This is mainly to suck away any possible stray
interrupts.

This prevents an intermittent problem on some systems where the adapter
probes correctly but yields a device timeout (and possible subsequent adapter
check) when configured. When I originally tested the driver, I ifconfig'ed
the interface after the system had already been booted and didn't notice
any problems, but when configuring the interface immediately at startup,
it would occasionally timeout and hang, until an adapter check interrupt
came along and reset things again. I'm not exactly sure if this is a
general problem of just something peculiar to this hardware (there are
three devices, including the tlan, all on IRQ 11) but the extra reset
shouldn't hurt anything. (It works fine with my 100Mbps Olicom adapter too.)

Thanks to Mark Taylor from Cybernet (mtaylor@cybernet.com) for allowing
me remote access to a Compaq system for debugging purposes.
This commit is contained in:
Bill Paul 1998-09-24 17:14:23 +00:00
parent 806ee0db0e
commit 9460731153

View File

@ -29,7 +29,7 @@
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*
* $Id: if_tl.c,v 1.28 1998/09/18 05:22:57 wpaul Exp $
* $Id: if_tl.c,v 1.30 1998/09/24 16:26:02 wpaul Exp $
*/
/*
@ -211,7 +211,7 @@
#ifndef lint
static char rcsid[] =
"$Id: if_tl.c,v 1.28 1998/09/18 05:22:57 wpaul Exp $";
"$Id: if_tl.c,v 1.30 1998/09/24 16:26:02 wpaul Exp $";
#endif
#ifdef TL_DEBUG
@ -1750,6 +1750,15 @@ tl_attach(config_id, unit)
goto fail;
}
tl_intvec_adchk((void *)sc, 0);
tl_stop(sc);
/*
* Attempt to clear any stray interrupts
* that may be lurking.
*/
tl_intr((void *)sc);
/*
* Call MI attach routines.
*/
@ -2111,7 +2120,8 @@ static int tl_intvec_adchk(xsc, type)
sc = xsc;
printf("tl%d: adapter check: %x\n", sc->tl_unit,
if (type)
printf("tl%d: adapter check: %x\n", sc->tl_unit,
CSR_READ_4(sc, TL_CH_PARM));
#ifdef TL_DEBUG
evshow(sc);