1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

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:
Justin T. Gibbs 1997-03-24 05:02:55 +00:00
parent 9505c10438
commit 23e11becca
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=24175

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.