Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Fix a buglet in tlp_reset(): don't touch the Tuli...



details:   https://anonhg.NetBSD.org/src/rev/ab092fe39ec0
branches:  trunk
changeset: 476537:ab092fe39ec0
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Sun Sep 19 20:51:09 1999 +0000

description:
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).

diffstat:

 sys/dev/ic/tulip.c |  11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r c771d8f6c83d -r ab092fe39ec0 sys/dev/ic/tulip.c
--- a/sys/dev/ic/tulip.c        Sun Sep 19 19:51:11 1999 +0000
+++ b/sys/dev/ic/tulip.c        Sun Sep 19 20:51:09 1999 +0000
@@ -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 @@
        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))



Home | Main Index | Thread Index | Old Index