From 8ade3b61ba3567e6947ac4fddc506bc75da5678e Mon Sep 17 00:00:00 2001 From: perry Date: Thu, 25 Mar 1999 02:17:38 +0000 Subject: 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. --- sys/dev/ic/lpt.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- cgit