From e17503e59e5eae6e5b70c2bff1c1f7bc2e4ac22d Mon Sep 17 00:00:00 2001 From: jdolecek Date: Thu, 22 Jan 2004 14:22:20 +0000 Subject: [PATCH] Reset the service bit of ECP register, so that write threshold would be identified correctly Problem reported and fix provided in PR kern/24185 by Paul Shupak --- sys/dev/ic/atppc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sys/dev/ic/atppc.c b/sys/dev/ic/atppc.c index f7988cf67fd8..c8b0956fe191 100644 --- a/sys/dev/ic/atppc.c +++ b/sys/dev/ic/atppc.c @@ -1,4 +1,4 @@ -/* $NetBSD: atppc.c,v 1.4 2004/01/22 01:21:41 bjh21 Exp $ */ +/* $NetBSD: atppc.c,v 1.5 2004/01/22 14:22:20 jdolecek Exp $ */ /* * Copyright (c) 2001 Alcove - Nicolas Souchu @@ -556,6 +556,10 @@ atppc_detect_fifo(struct atppc_softc * atppc) /* Change direction */ atppc_w_ctr(atppc, (ctr_sav & ~IRQENABLE) & ~PCD); atppc_barrier_w(atppc); + + /* Clear the serviceIntr bit we've already set in the above loop */ + atppc_w_ecr(atppc, ATPPC_ECR_TST); + atppc_barrier_w(atppc); /* Determine writeIntrThreshold - empty FIFO until serviceIntr is set */ for(atppc->sc_wthr = 0; i > -1; i--) {