summaryrefslogtreecommitdiff
path: root/sys/dev/ic
diff options
context:
space:
mode:
authorperry <perry@NetBSD.org>1999-03-25 02:17:38 +0000
committerperry <perry@NetBSD.org>1999-03-25 02:17:38 +0000
commit8ade3b61ba3567e6947ac4fddc506bc75da5678e (patch)
tree4d9d9ba0be3b35f7a54a8d585bcb9d2b82897836 /sys/dev/ic
parent3db12eddbccd4119fe5f6836596020ab25aa14f4 (diff)
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 (limited to 'sys/dev/ic')
-rw-r--r--sys/dev/ic/lpt.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/ic/lpt.c b/sys/dev/ic/lpt.c
index ade9a6e91b7..236b28ae8bf 100644
--- a/sys/dev/ic/lpt.c
+++ b/sys/dev/ic/lpt.c
@@ -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 @@ lptintr(arg)
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;