aic7xxx.seq (42652) | aic7xxx.seq (43880) |
---|---|
1/* 2 * Adaptec 274x/284x/294x device driver firmware for Linux and FreeBSD. 3 * 4 * Copyright (c) 1994-1999 Justin Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 18 unchanged lines hidden (view full) --- 27 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * | 1/* 2 * Adaptec 274x/284x/294x device driver firmware for Linux and FreeBSD. 3 * 4 * Copyright (c) 1994-1999 Justin Gibbs. 5 * All rights reserved. 6 * 7 * Redistribution and use in source and binary forms, with or without 8 * modification, are permitted provided that the following conditions --- 18 unchanged lines hidden (view full) --- 27 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 28 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33 * SUCH DAMAGE. 34 * |
35 * $Id: aic7xxx.seq,v 1.83 1998/12/17 00:06:52 gibbs Exp $ | 35 * $Id: aic7xxx.seq,v 1.84 1999/01/14 06:14:15 gibbs Exp $ |
36 */ 37 38#include <dev/aic7xxx/aic7xxx.reg> 39#include <cam/scsi/scsi_message.h> 40 41/* 42 * A few words on the waiting SCB list: 43 * After starting the selection hardware, we check for reconnecting targets --- 436 unchanged lines hidden (view full) --- 480 jmp host_target_message_loop; 481 482target_disconnect: 483 mvi P_MESGIN|BSYO call change_phase; 484 test SEQ_FLAGS, DPHASE jz . + 2; 485 mvi MSG_SAVEDATAPOINTER call target_outb; 486 mvi MSG_DISCONNECT call target_outb; 487 | 36 */ 37 38#include <dev/aic7xxx/aic7xxx.reg> 39#include <cam/scsi/scsi_message.h> 40 41/* 42 * A few words on the waiting SCB list: 43 * After starting the selection hardware, we check for reconnecting targets --- 436 unchanged lines hidden (view full) --- 480 jmp host_target_message_loop; 481 482target_disconnect: 483 mvi P_MESGIN|BSYO call change_phase; 484 test SEQ_FLAGS, DPHASE jz . + 2; 485 mvi MSG_SAVEDATAPOINTER call target_outb; 486 mvi MSG_DISCONNECT call target_outb; 487 |
488target_busfree_wait: 489 /* Wait for preceeding I/O session to complete. */ 490 test SCSISIGI, ACKI jnz .; |
|
488target_busfree: 489 clr SCSISIGO; 490 call complete_target_cmd; 491 call clear_target_state; 492 jmp poll_for_work; 493 494target_cmdphase: 495 mvi P_COMMAND|BSYO call change_phase; --- 53 unchanged lines hidden (view full) --- 549target_sphase: 550 mvi P_STATUS|BSYO call change_phase; 551 mvi LASTPHASE, P_STATUS; 552 mov SCB_TARGET_STATUS call target_outb; 553 /* XXX Watch for ATN or parity errors??? */ 554 mvi SCSISIGO, P_MESGIN|BSYO; 555 /* MSG_CMDCMPLT is 0, but we can't do an immediate of 0 */ 556 mov ALLZEROS call target_outb; | 491target_busfree: 492 clr SCSISIGO; 493 call complete_target_cmd; 494 call clear_target_state; 495 jmp poll_for_work; 496 497target_cmdphase: 498 mvi P_COMMAND|BSYO call change_phase; --- 53 unchanged lines hidden (view full) --- 552target_sphase: 553 mvi P_STATUS|BSYO call change_phase; 554 mvi LASTPHASE, P_STATUS; 555 mov SCB_TARGET_STATUS call target_outb; 556 /* XXX Watch for ATN or parity errors??? */ 557 mvi SCSISIGO, P_MESGIN|BSYO; 558 /* MSG_CMDCMPLT is 0, but we can't do an immediate of 0 */ 559 mov ALLZEROS call target_outb; |
557 jmp target_busfree; | 560 jmp target_busfree_wait; |
558 559complete_target_cmd: 560 test SEQ_FLAGS, TARG_CMD_PENDING jnz . + 2; 561 mov SCB_TAG jmp complete_post; 562 if ((ahc->features & AHC_CMD_CHAN) != 0) { 563 /* Set the valid byte */ 564 mvi CCSCBADDR, 24; 565 mov CCSCBRAM, ALLONES; --- 774 unchanged lines hidden (view full) --- 1340} 1341 1342if ((ahc->flags & AHC_TARGETMODE) != 0) { 1343/* 1344 * Change to a new phase. If we are changing the state of the I/O signal, 1345 * from out to in, wait an additional data release delay before continuing. 1346 */ 1347change_phase: | 561 562complete_target_cmd: 563 test SEQ_FLAGS, TARG_CMD_PENDING jnz . + 2; 564 mov SCB_TAG jmp complete_post; 565 if ((ahc->features & AHC_CMD_CHAN) != 0) { 566 /* Set the valid byte */ 567 mvi CCSCBADDR, 24; 568 mov CCSCBRAM, ALLONES; --- 774 unchanged lines hidden (view full) --- 1343} 1344 1345if ((ahc->flags & AHC_TARGETMODE) != 0) { 1346/* 1347 * Change to a new phase. If we are changing the state of the I/O signal, 1348 * from out to in, wait an additional data release delay before continuing. 1349 */ 1350change_phase: |
1351 /* Wait for preceeding I/O session to complete. */ 1352 test SCSISIGI, ACKI jnz .; 1353 1354 /* Change the phase */ |
|
1348 and DINDEX, IOI, SCSISIGI; 1349 mov SCSISIGO, SINDEX; 1350 and A, IOI, SINDEX; | 1355 and DINDEX, IOI, SCSISIGI; 1356 mov SCSISIGO, SINDEX; 1357 and A, IOI, SINDEX; |
1358 1359 /* 1360 * If the data direction has changed, from 1361 * out (initiator driving) to in (target driving), 1362 * we must waitat least a data release delay plus 1363 * the normal bus settle delay. [SCSI III SPI 10.11.0] 1364 */ |
|
1351 cmp DINDEX, A je change_phase_wait; 1352 test SINDEX, IOI jz change_phase_wait; 1353 call change_phase_wait; 1354change_phase_wait: 1355 nop; 1356 nop; 1357 nop; 1358 nop ret; --- 407 unchanged lines hidden --- | 1365 cmp DINDEX, A je change_phase_wait; 1366 test SINDEX, IOI jz change_phase_wait; 1367 call change_phase_wait; 1368change_phase_wait: 1369 nop; 1370 nop; 1371 nop; 1372 nop ret; --- 407 unchanged lines hidden --- |