From b8d0eab4980b9d45afa6bfe9bbabaa69e4a83d25 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 19 Aug 2004 10:22:02 +0000 Subject: If a DMA operation takes longer time than usual, do not flood the console too much with warning messages. --- sys/arch/hp300/dev/spc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sys/arch') diff --git a/sys/arch/hp300/dev/spc.c b/sys/arch/hp300/dev/spc.c index 08e95a11182..5ef64b71fab 100644 --- a/sys/arch/hp300/dev/spc.c +++ b/sys/arch/hp300/dev/spc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: spc.c,v 1.1 2004/08/03 21:46:56 miod Exp $ */ +/* $OpenBSD: spc.c,v 1.2 2004/08/19 10:22:01 miod Exp $ */ /* $NetBSD: spc.c,v 1.2 2003/11/17 14:37:59 tsutsui Exp $ */ /* @@ -222,9 +222,11 @@ spc_dio_dmadone(struct spc_softc *sc) if ((spc_read(SSTS) & SSTS_BUSY) != 0) { int timeout = 1000; /* XXX how long? */ while ((spc_read(SSTS) & SSTS_BUSY) != 0) { - if (--timeout < 0) + if (--timeout < 0) { printf("%s: DMA complete timeout\n", sc->sc_dev.dv_xname); + timeout = 1000; + } DELAY(1); } } -- cgit v1.2.3