summaryrefslogtreecommitdiff
path: root/sys/dev/microcode
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/microcode')
-rw-r--r--sys/dev/microcode/siop/esiop.ss16
-rw-r--r--sys/dev/microcode/siop/siop.ss10
2 files changed, 19 insertions, 7 deletions
diff --git a/sys/dev/microcode/siop/esiop.ss b/sys/dev/microcode/siop/esiop.ss
index a6ce1f951b0..bb778eb7768 100644
--- a/sys/dev/microcode/siop/esiop.ss
+++ b/sys/dev/microcode/siop/esiop.ss
@@ -1,4 +1,4 @@
-; $NetBSD: esiop.ss,v 1.19 2005/02/27 00:27:29 perry Exp $
+; $NetBSD: esiop.ss,v 1.20 2005/11/18 23:10:32 bouyer Exp $
;
; Copyright (c) 2002 Manuel Bouyer.
@@ -112,6 +112,7 @@ ENTRY script_sched;
ENTRY load_targtable;
EXTERN tlq_offset;
+EXTERN saved_offset_offset;
EXTERN abs_msgin2;
EXTERN abs_sem; a 32bits word used a semaphore between script and driver
@@ -208,7 +209,11 @@ waitphase:
handle_cmpl:
CALL REL(disconnect);
- STORE NOFLUSH SCRATCHA0, 4, from tlq_offset; save current offset
+; update offset if we did some data transfer
+ MOVE SCRATCHA1 TO SFBR;
+ JUMP REL(handle_cmpl_noxfer), if 0x00;
+ STORE NOFLUSH SCRATCHA0, 4, FROM saved_offset_offset;
+handle_cmpl_noxfer:
MOVE SCRATCHE1 to SFBR;
INT int_done, IF NOT 0x00; if status is not "done", let host handle it
MOVE SCRATCHF0 to SFBR; load pointer in done ring
@@ -344,9 +349,12 @@ handle_msgin:
CALL REL(disconnect) ; disconnect message
; if we didn't get sdp, no need to interrupt
MOVE SCRATCHC0 & f_c_sdp TO SFBR;
+ INT int_disc, IF not 0x00;
+; update offset if we did some data transfer
+ MOVE SCRATCHA1 TO SFBR;
JUMP REL(script_sched), if 0x00;
-; Ok, we need to save data pointers
- INT int_disc;
+ STORE NOFLUSH SCRATCHA0, 4, FROM saved_offset_offset;
+ JUMP REL(script_sched);
cmdout:
MOVE FROM t_cmd, WHEN CMD;
diff --git a/sys/dev/microcode/siop/siop.ss b/sys/dev/microcode/siop/siop.ss
index 90ff680b277..8a109f43053 100644
--- a/sys/dev/microcode/siop/siop.ss
+++ b/sys/dev/microcode/siop/siop.ss
@@ -1,4 +1,4 @@
-; $NetBSD: siop.ss,v 1.19 2005/02/27 00:27:29 perry Exp $
+; $NetBSD: siop.ss,v 1.20 2005/11/18 23:10:32 bouyer Exp $
;
; Copyright (c) 2000 Manuel Bouyer.
@@ -47,6 +47,7 @@ ABSOLUTE int_msgin = 0xff01;
ABSOLUTE int_extmsgin = 0xff02;
ABSOLUTE int_extmsgdata = 0xff03;
ABSOLUTE int_disc = 0xff04;
+ABSOLUTE int_saveoffset = 0xff05;
; interrupts that don't have a valid DSA
ABSOLUTE int_reseltarg = 0xff80;
ABSOLUTE int_resellun = 0xff81;
@@ -262,9 +263,12 @@ handle_msgin:
CALL REL(disconnect) ; disconnect message;
; if we didn't get sdp, no need to interrupt
MOVE SCRATCHA0 & flag_sdp TO SFBR;
+ INT int_disc, IF not 0x00;
+; update offset if we did some data transfer
+ MOVE SCRATCHA1 TO SFBR;
JUMP REL(script_sched), if 0x00;
-; Ok, we need to save data pointers
- INT int_disc;
+ INT int_saveoffset;
+
msgin_ack:
selected:
CLEAR ACK;