Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/ic Add two #ifdef BROKEN_LPT_DELAY's in to the centr...



details:   https://anonhg.NetBSD.org/src/rev/d452184e912f
branches:  trunk
changeset: 467455:d452184e912f
user:      perry <perry%NetBSD.org@localhost>
date:      Thu Mar 25 02:17:38 1999 +0000

description:
Add two #ifdef BROKEN_LPT_DELAY's in to the central write byte
& strobe cycle. These bracket DELAY()'s of BROKEN_LPT_DELAY
microseconds. This can be used to kludge around mysterious hangs and
reboots some users experience. The cause of these failures is still
not known, but is conjectured to be hardware bug originated failures
in the bus cycle.

diffstat:

 sys/dev/ic/lpt.c |  10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diffs (25 lines):

diff -r 03cb884d1443 -r d452184e912f sys/dev/ic/lpt.c
--- a/sys/dev/ic/lpt.c  Thu Mar 25 01:56:13 1999 +0000
+++ b/sys/dev/ic/lpt.c  Thu Mar 25 02:17:38 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lpt.c,v 1.53 1999/02/12 01:51:37 thorpej Exp $ */
+/*     $NetBSD: lpt.c,v 1.54 1999/03/25 02:17:38 perry Exp $   */
 
 /*
  * Copyright (c) 1993, 1994 Charles M. Hannum.
@@ -389,7 +389,15 @@
                u_char control = sc->sc_control;
                /* send char */
                bus_space_write_1(iot, ioh, lpt_data, *sc->sc_cp++);
+#ifdef BROKEN_LPT_DELAY
+               /* Kludge to prevent mysterious hangs and reboots. */
+               DELAY(BROKEN_LPT_DELAY);
+#endif
                bus_space_write_1(iot, ioh, lpt_control, control | LPC_STROBE);
+#ifdef BROKEN_LPT_DELAY
+               /* Kludge to prevent mysterious hangs and reboots. */
+               DELAY(BROKEN_LPT_DELAY);
+#endif
                sc->sc_count--;
                bus_space_write_1(iot, ioh, lpt_control, control);
                sc->sc_state |= LPT_OBUSY;



Home | Main Index | Thread Index | Old Index