From 23e11beccae72e1f22b7c49db577d4f83a7beb71 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Mon, 24 Mar 1997 05:02:55 +0000 Subject: Re-arrange the code to upload an SCB to ensure that there is at least on instruction between the last load into the DFIFO and enabling the DMA. During back to back SCB DMA, it was possible to hang the card. --- sys/dev/aic7xxx/aic7xxx.seq | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq index 5077ef0092d0f..572586588dd99 100644 --- a/sys/dev/aic7xxx/aic7xxx.seq +++ b/sys/dev/aic7xxx/aic7xxx.seq @@ -1039,7 +1039,18 @@ dma_scb: mov DFCNTRL, DMAPARAMS; test DMAPARAMS, DIRECTION jnz dma_scb_fromhost; /* Fill it with the SCB data */ - call copy_scb_tofifo; +copy_scb_tofifo: + mvi SINDEX, SCB_CONTROL; + add A, 28, SINDEX; +copy_scb_tofifo_loop: + mov DFDAT,SINDIR; + mov DFDAT,SINDIR; + mov DFDAT,SINDIR; + mov DFDAT,SINDIR; + mov DFDAT,SINDIR; + mov DFDAT,SINDIR; + mov DFDAT,SINDIR; + cmp SINDEX, A jne copy_scb_tofifo_loop; or DFCNTRL, HDMAEN|FIFOFLUSH; dma_scb_fromhost: call dma_finish; @@ -1060,19 +1071,6 @@ dfdat_in_7_continued: mov DINDIR,DFDAT; mov DINDIR,DFDAT ret; -copy_scb_tofifo: - mvi SCB_CONTROL call dfdat_out_7; - call dfdat_out_7; - call dfdat_out_7; -dfdat_out_7: - mov DFDAT,SINDIR; - mov DFDAT,SINDIR; - mov DFDAT,SINDIR; - mov DFDAT,SINDIR; - mov DFDAT,SINDIR; - mov DFDAT,SINDIR; - mov DFDAT,SINDIR ret; - /* * Wait for DMA from host memory to data FIFO to complete, then disable * DMA and wait for it to acknowledge that it's off. -- cgit v1.3