summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1995-07-04 20:58:57 +0000
committergibbs <gibbs@FreeBSD.org>1995-07-04 20:58:57 +0000
commit0917dc17df5620d2365a37a451aa9e5c68e47080 (patch)
tree936933e9f147634859aced4c94ead86ce1ac52f4 /sys/dev
parent0a7517cef3eab443e5c3f5e76f75a5c26fdfc847 (diff)
downloadFreeBSD-src-0917dc17df5620d2365a37a451aa9e5c68e47080.zip
FreeBSD-src-0917dc17df5620d2365a37a451aa9e5c68e47080.tar.gz
Change SCB_LIST_NULL to 0xff from 0x10 to allow for 255 commands. This
is needed for 3940 support. Have tagged commands look to see if a target is "busy" with a non tagged command before executing. This prevents overlapped tagged and non tagged commands which can happen since request sense commands are not tagged.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.seq15
1 files changed, 8 insertions, 7 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq
index e8cc5bb..3338c1c 100644
--- a/sys/dev/aic7xxx/aic7xxx.seq
+++ b/sys/dev/aic7xxx/aic7xxx.seq
@@ -41,7 +41,7 @@
#
##-M#########################################################################
-VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.15 1995/04/27 17:44:27 gibbs Exp $"
+VERSION AIC7XXX_SEQ_VER "$Id: aic7xxx.seq,v 1.16 1995/05/17 07:05:49 davidg Exp $"
SCBMASK = 0x1f
@@ -252,8 +252,8 @@ SAVED_TCL = 0x56 # Temporary storage for the
# ram since a reconnecting target can request sense and this will create
# yet another SCB waiting for selection. The solution used here is to
# use byte 31 of the SCB as a psuedo-next pointer and to thread a list
-# of SCBs that are awaiting selection. Since 0 is a valid SCB offset,
-# SCB_LIST_NULL is 0x10 which is out of range. The kernel driver must
+# of SCBs that are awaiting selection. Since 0-0xfe are valid SCB offsets,
+# SCB_LIST_NULL is 0xff which is out of range. The kernel driver must
# add an entry to this list everytime a request sense occurs. The sequencer
# will automatically consume the entries.
@@ -261,14 +261,14 @@ WAITING_SCBH = 0x57 # head of list of SCBs awaiting
# selection
WAITING_SCBT = 0x58 # tail of list of SCBs awaiting
# selection
-SCB_LIST_NULL = 0x10
+SCB_LIST_NULL = 0xff
# Poll QINCNT for work - the lower bits contain
# the number of entries in the Queue In FIFO.
#
start:
- test WAITING_SCBH,SCB_LIST_NULL jz start_waiting
+ cmp WAITING_SCBH,SCB_LIST_NULL jne start_waiting
poll_for_work:
test FLAGS,TWIN_BUS jz start2 # Are we a twin channel device?
# For fairness, we check the other bus first, since we just finished a
@@ -280,7 +280,7 @@ poll_for_work:
start2:
test SSTAT0,SELDI jnz reselect
test SSTAT0,SELDO jnz select
- test WAITING_SCBH,SCB_LIST_NULL jz start_waiting
+ cmp WAITING_SCBH,SCB_LIST_NULL jne start_waiting
test QINCNT,SCBMASK jz poll_for_work
# We have at least one queued SCB now and we don't have any
@@ -328,12 +328,12 @@ test SCBARRAY+0,NEEDDMA jz test_busy
# initialization, board reset, and a target's SELTO.
test_busy:
- test SCBARRAY+0,0x20 jnz start_scb
and FUNCTION1,0x70,SCBARRAY+1
mov A,FUNCTION1
test SCBARRAY+1,0x88 jz test_a # Id < 8 && A channel
test ACTIVE_B,A jnz requeue
+ test SCBARRAY+0,0x20 jnz start_scb
or ACTIVE_B,A # Mark the current target as busy
jmp start_scb
@@ -349,6 +349,7 @@ start_waiting:
test_a:
test ACTIVE_A,A jnz requeue
+ test SCBARRAY+0,0x20 jnz start_scb
or ACTIVE_A,A # Mark the current target as busy
start_scb:
OpenPOWER on IntegriCloud