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.
This commit is contained in:
gibbs 1997-03-24 05:02:55 +00:00
parent bdddad7101
commit bc569a7a8f

View File

@ -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.