From b66655cf37ea5628e388d742a51d662e572aa64f Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Sun, 28 Jun 1998 02:58:57 +0000 Subject: Some revisions of the aic7880 have a problem where, if the data fifo is full, but the PCI input latch is not empty, HDMAEN cannot be cleared. The fix used here is to attempt to drain the data fifo until there is space for the input latch to drain and HDMAEN de-asserts. This is a 1 instruction fix, so it should have no performance impact. --- sys/dev/aic7xxx/aic7xxx.seq | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index d7338a539e1d..f3fad03aa810 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -35,7 +35,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.seq,v 1.75 1997/08/13 17:02:28 gibbs Exp $ + * $Id: aic7xxx.seq,v 1.76 1997/09/27 19:37:27 gibbs Exp $ */ #include @@ -944,7 +944,15 @@ dma_fifoempty: dma_dmadone: and DFCNTRL, ~(SCSIEN|SDMAEN|HDMAEN); dma_halt: - test DFCNTRL, (SCSIEN|SDMAEN|HDMAEN) jnz dma_halt; + /* + * Some revisions of the aic7880 have a problem where, if the + * data fifo is full, but the PCI input latch is not empty, + * HDMAEN cannot be cleared. The fix used here is to attempt + * to drain the data fifo until there is space for the input + * latch to drain and HDMAEN de-asserts. + */ + mov NONE, DFDAT; + test DFCNTRL, HDMAEN jnz dma_halt; return: ret; -- cgit v1.3