summaryrefslogtreecommitdiffstats
path: root/sys/dev/aic7xxx
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/aic7xxx')
-rw-r--r--sys/dev/aic7xxx/aic7xxx.seq18
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/aic7xxx/aic7xxx.seq b/sys/dev/aic7xxx/aic7xxx.seq
index 3377449..5abe1b6 100644
--- a/sys/dev/aic7xxx/aic7xxx.seq
+++ b/sys/dev/aic7xxx/aic7xxx.seq
@@ -32,7 +32,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: aic7xxx.seq,v 1.83 1998/12/17 00:06:52 gibbs Exp $
+ * $Id: aic7xxx.seq,v 1.84 1999/01/14 06:14:15 gibbs Exp $
*/
#include <dev/aic7xxx/aic7xxx.reg>
@@ -485,6 +485,9 @@ target_disconnect:
mvi MSG_SAVEDATAPOINTER call target_outb;
mvi MSG_DISCONNECT call target_outb;
+target_busfree_wait:
+ /* Wait for preceeding I/O session to complete. */
+ test SCSISIGI, ACKI jnz .;
target_busfree:
clr SCSISIGO;
call complete_target_cmd;
@@ -554,7 +557,7 @@ target_sphase:
mvi SCSISIGO, P_MESGIN|BSYO;
/* MSG_CMDCMPLT is 0, but we can't do an immediate of 0 */
mov ALLZEROS call target_outb;
- jmp target_busfree;
+ jmp target_busfree_wait;
complete_target_cmd:
test SEQ_FLAGS, TARG_CMD_PENDING jnz . + 2;
@@ -1345,9 +1348,20 @@ if ((ahc->flags & AHC_TARGETMODE) != 0) {
* from out to in, wait an additional data release delay before continuing.
*/
change_phase:
+ /* Wait for preceeding I/O session to complete. */
+ test SCSISIGI, ACKI jnz .;
+
+ /* Change the phase */
and DINDEX, IOI, SCSISIGI;
mov SCSISIGO, SINDEX;
and A, IOI, SINDEX;
+
+ /*
+ * If the data direction has changed, from
+ * out (initiator driving) to in (target driving),
+ * we must waitat least a data release delay plus
+ * the normal bus settle delay. [SCSI III SPI 10.11.0]
+ */
cmp DINDEX, A je change_phase_wait;
test SINDEX, IOI jz change_phase_wait;
call change_phase_wait;
OpenPOWER on IntegriCloud