Fix a buglet in tlp_reset(): don't touch the Tulip for at least 50

PCI cycles after starting the reset; it won't respond.  This will
cause a machine check on some Alpha core logic chipsets (e.g. 21071 APECS).
This commit is contained in:
thorpej 1999-09-19 20:51:09 +00:00
parent f6b5fa06ab
commit 5485bcb973
1 changed files with 9 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: tulip.c,v 1.11 1999/09/17 21:57:36 thorpej Exp $ */
/* $NetBSD: tulip.c,v 1.12 1999/09/19 20:51:09 thorpej Exp $ */
/*-
* Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@ -1261,9 +1261,16 @@ tlp_reset(sc)
TULIP_WRITE(sc, CSR_BUSMODE, BUSMODE_SWR);
for (i = 0; i < 1000; i++) {
/*
* Wait at least 50 PCI cycles for the reset to
* complete before peeking at the Tulip again.
* 10 uSec is a bit longer than 50 PCI cycles
* (at 33MHz), but it doesn't hurt have the extra
* wait.
*/
delay(10);
if (TULIP_ISSET(sc, CSR_BUSMODE, BUSMODE_SWR) == 0)
break;
delay(10);
}
if (TULIP_ISSET(sc, CSR_BUSMODE, BUSMODE_SWR))