summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1997-03-24 05:02:55 +0000
committergibbs <gibbs@FreeBSD.org>1997-03-24 05:02:55 +0000
commitbc569a7a8f275409c3a1351f88fd3af8f27030c3 (patch)
treee2fcf820f00ca982d8793b093b4c07bb4deacd81 /sys/dev/aic7xxx
parentbdddad710180630c6252292615560da328826e5e (diff)
downloadFreeBSD-src-bc569a7a8f275409c3a1351f88fd3af8f27030c3.zip
FreeBSD-src-bc569a7a8f275409c3a1351f88fd3af8f27030c3.tar.gz
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.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.seq26
1 files changed, 12 insertions, 14 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq
index 5077ef0..5725865 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.
OpenPOWER on IntegriCloud