summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1996-11-21 06:18:33 +0000
committergibbs <gibbs@FreeBSD.org>1996-11-21 06:18:33 +0000
commit093bf696bdea64c07591579f03bb7ba9846f7364 (patch)
treea0d727cd4e68a0915282218ec26f8fdbf2d04748 /sys/dev/aic7xxx
parentf810ab1fbaa4a41f5588b0a61d232a8702b6be98 (diff)
downloadFreeBSD-src-093bf696bdea64c07591579f03bb7ba9846f7364.zip
FreeBSD-src-093bf696bdea64c07591579f03bb7ba9846f7364.tar.gz
Change the way Automatic PIO is performed in the mesgin and mesgout phases.
SPIORDY should go active on any REQ of the bus, so testing for REQINIT is not necessary. It also seems that testing for SPIORDY is more robust then REQINIT since SPIORDY comes active after REQINIT and PHASEMIS seems to take some time to come true after REQ is asserted if the phase has changed. Of course, none of this is documented. This should give the code savings of my original changes, without breaking the driver on fast peripherals.
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.seq45
1 files changed, 18 insertions, 27 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq
index f3459be..f25e8ea 100644
--- a/sys/dev/aic7xxx/aic7xxx.seq
+++ b/sys/dev/aic7xxx/aic7xxx.seq
@@ -39,7 +39,7 @@
*
*-M************************************************************************/
-VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.48 1996/11/11 05:16:36 gibbs Exp $"
+VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.49 1996/11/16 01:07:34 gibbs Exp $"
#if defined(__NetBSD__)
#include "../../../../dev/ic/aic7xxxreg.h"
@@ -536,36 +536,27 @@ p_mesgout_start:
* a MESSAGE REJECT.
*/
p_mesgout_loop:
- test SSTAT1,REQINIT jz p_mesgout_loop
- test SSTAT1,PHASEMIS jnz p_mesgout_phasemis
- cmp DINDEX,1 jne p_mesgout_outb /* last byte? */
- mvi CLRSINT1,CLRATNO /* drop ATN */
-p_mesgout_outb:
- test SSTAT0, SPIORDY jz p_mesgout_outb
- dec DINDEX
- mvi CLRSINT1, CLRREQINIT
- mov SCSIDATL,SINDIR
-
-p_mesgout4:
- test DINDEX,0xff jnz p_mesgout_loop
-
+ test SSTAT1,BUSFREE jnz p_mesgout_done
+ test SSTAT0,SPIORDY jz p_mesgout_loop
+ test SSTAT1,PHASEMIS jnz p_mesgout_done
/*
* If the next bus phase after ATN drops is a message out, it means
* that the target is requesting that the last message(s) be resent.
*/
-p_mesgout_snoop:
- test SSTAT1,BUSFREE jnz p_mesgout_done
- test SSTAT1,REQINIT jz p_mesgout_snoop
-
- test SSTAT1,PHASEMIS jnz p_mesgout_done
-
- or SCSISIGO,ATNO /* turn on ATNO */
-
- jmp ITloop
+ test DINDEX,0xff jnz p_mesgout_outb
+ or SCSISIGO,ATNO /* turn on ATN for the retry */
+ jmp p_mesgout_start
+p_mesgout_outb:
+ cmp DINDEX,1 jne p_mesgout_outb2 /* last byte? */
+ mvi CLRSINT1,CLRATNO /* drop ATN */
+p_mesgout_outb2:
+ dec DINDEX
+ mvi CLRSINT0, CLRSPIORDY
+ mov SCSIDATL,SINDIR
+ jmp p_mesgout_loop
-p_mesgout_phasemis:
- mvi CLRSINT1,CLRATNO /* Be sure to turn ATNO off */
p_mesgout_done:
+ mvi CLRSINT1,CLRATNO /* Be sure to turn ATNO off */
clr MSG_LEN /* no active msg */
jmp ITloop
@@ -906,13 +897,13 @@ mk_mesg1:
inb_next:
call inb_last /* ACK */
inb_next_wait:
- test SSTAT1, REQINIT jz inb_next_wait
+ test SSTAT0, SPIORDY jz inb_next_wait
test SSTAT1,PHASEMIS jnz mesgin_phasemis
inb_first:
mov DINDEX,SINDEX
mov DINDIR,SCSIBUSL ret /*read byte directly from bus*/
inb_last:
- mvi CLRSINT1, CLRREQINIT
+ mvi CLRSINT0, CLRSPIORDY
mov NONE,SCSIDATL ret /*dummy read from latch to ACK*/
mesgin_phasemis:
OpenPOWER on IntegriCloud