Deleted Added
full compact
aic7xxx.seq (41646) aic7xxx.seq (41816)
1/*
2 * Adaptec 274x/284x/294x device driver firmware for Linux and FreeBSD.
3 *
4 * Copyright (c) 1994-1998 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-1998 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.80 1998/11/23 01:33:47 gibbs Exp $
35 * $Id: aic7xxx.seq,v 1.81 1998/12/10 04:14:50 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

--- 11 unchanged lines hidden (view full) ---

55 * command for which a second SCB has been queued. The sequencer will
56 * automatically consume the entries.
57 */
58
59reset:
60 clr SCSISIGO; /* De-assert BSY */
61 and SXFRCTL1, ~BITBUCKET;
62 /* Always allow reselection */
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

--- 11 unchanged lines hidden (view full) ---

55 * command for which a second SCB has been queued. The sequencer will
56 * automatically consume the entries.
57 */
58
59reset:
60 clr SCSISIGO; /* De-assert BSY */
61 and SXFRCTL1, ~BITBUCKET;
62 /* Always allow reselection */
63 if ((ahc->flags & AHC_TARGETMODE) != 0) {
64 mvi SCSISEQ, ENSELI|ENRSELI|ENAUTOATNP;
65 } else {
66 mvi SCSISEQ, ENRSELI|ENAUTOATNP;
67 }
63 and SCSISEQ, ENSELI|ENRSELI|ENAUTOATNP, SCSISEQ_TEMPLATE;
68
69 if ((ahc->features & AHC_CMD_CHAN) != 0) {
70 /* Ensure that no DMA operations are in progress */
71 clr CCSGCTL;
72 clr CCSCBCTL;
73 }
74
75 call clear_target_state;

--- 101 unchanged lines hidden (view full) ---

177 and A, TID, SCB_TCL; /* Get target ID */
178 and SCSIID_ULTRA2, OID; /* Clear old target */
179 or SCSIID_ULTRA2, A;
180 } else {
181 and A, TID, SCB_TCL; /* Get target ID */
182 and SCSIID, OID; /* Clear old target */
183 or SCSIID, A;
184 }
64
65 if ((ahc->features & AHC_CMD_CHAN) != 0) {
66 /* Ensure that no DMA operations are in progress */
67 clr CCSGCTL;
68 clr CCSCBCTL;
69 }
70
71 call clear_target_state;

--- 101 unchanged lines hidden (view full) ---

173 and A, TID, SCB_TCL; /* Get target ID */
174 and SCSIID_ULTRA2, OID; /* Clear old target */
175 or SCSIID_ULTRA2, A;
176 } else {
177 and A, TID, SCB_TCL; /* Get target ID */
178 and SCSIID, OID; /* Clear old target */
179 or SCSIID, A;
180 }
181 mov SINDEX, SCSISEQ_TEMPLATE;
185 if ((ahc->flags & AHC_TARGETMODE) != 0) {
182 if ((ahc->flags & AHC_TARGETMODE) != 0) {
186 and SINDEX, TARGET_SCB, SCB_CONTROL;
187 or SCSISEQ, ENSELO|ENAUTOATNO|ENSELI
188 |ENRSELI|ENAUTOATNP, SINDEX ret ;
189 } else if ((ahc->flags & AHC_INITIATORMODE) != 0) {
190 mvi SCSISEQ, ENSELO|ENAUTOATNO|ENRSELI|ENAUTOATNP ret;
183 test SCB_CONTROL, TARGET_SCB jz . + 2;
184 or SINDEX, TEMODE;
191 }
185 }
186 mov SCSISEQ, SINDEX ret;
192
193/*
194 * Initialize transfer settings and clear the SCSI channel.
195 * SINDEX should contain any additional bit's the client wants
196 * set in SXFRCTL0. We also assume that the current SCB is
197 * a valid SCB for the target we wish to talk to.
198 */
199initialize_channel:

--- 230 unchanged lines hidden (view full) ---

430/*
431 * After the selection, remove this SCB from the "waiting SCB"
432 * list. This is achieved by simply moving our "next" pointer into
433 * WAITING_SCBH. Our next pointer will be set to null the next time this
434 * SCB is used, so don't bother with it now.
435 */
436select_out:
437 /* Turn off the selection hardware */
187
188/*
189 * Initialize transfer settings and clear the SCSI channel.
190 * SINDEX should contain any additional bit's the client wants
191 * set in SXFRCTL0. We also assume that the current SCB is
192 * a valid SCB for the target we wish to talk to.
193 */
194initialize_channel:

--- 230 unchanged lines hidden (view full) ---

425/*
426 * After the selection, remove this SCB from the "waiting SCB"
427 * list. This is achieved by simply moving our "next" pointer into
428 * WAITING_SCBH. Our next pointer will be set to null the next time this
429 * SCB is used, so don't bother with it now.
430 */
431select_out:
432 /* Turn off the selection hardware */
438 if ((ahc->flags & AHC_TARGETMODE) != 0) {
439 mvi SCSISEQ, ENSELI|ENRSELI|ENAUTOATNP;
440 } else if ((ahc->flags & AHC_INITIATORMODE) != 0) {
441 mvi SCSISEQ, ENRSELI|ENAUTOATNP;
442 }
433 and SCSISEQ, ENSELI|ENRSELI|ENAUTOATNP, SCSISEQ_TEMPLATE;
443 mvi CLRSINT0, CLRSELDO;
444 mov SCBPTR, WAITING_SCBH;
445 mov WAITING_SCBH,SCB_NEXT;
446 mov SAVED_TCL, SCB_TCL;
447 if ((ahc->flags & AHC_TARGETMODE) != 0) {
448 test SSTAT0, TARGET jz initiator_select;
449
450 /*

--- 53 unchanged lines hidden (view full) ---

504 mvi SCSISIGO, P_MESGOUT|BSYO;
505 call target_inb;
506 /* Local Processing goes here... */
507target_mesgout_pending_msg:
508 jmp host_target_message_loop;
509
510target_disconnect:
511 mvi P_MESGIN|BSYO call change_phase;
434 mvi CLRSINT0, CLRSELDO;
435 mov SCBPTR, WAITING_SCBH;
436 mov WAITING_SCBH,SCB_NEXT;
437 mov SAVED_TCL, SCB_TCL;
438 if ((ahc->flags & AHC_TARGETMODE) != 0) {
439 test SSTAT0, TARGET jz initiator_select;
440
441 /*

--- 53 unchanged lines hidden (view full) ---

495 mvi SCSISIGO, P_MESGOUT|BSYO;
496 call target_inb;
497 /* Local Processing goes here... */
498target_mesgout_pending_msg:
499 jmp host_target_message_loop;
500
501target_disconnect:
502 mvi P_MESGIN|BSYO call change_phase;
503 test SEQ_FLAGS, DPHASE jz . + 2;
504 mvi MSG_SAVEDATAPOINTER call target_outb;
512 mvi MSG_DISCONNECT call target_outb;
513
514target_busfree:
515 clr SCSISIGO;
516 call complete_target_cmd;
517 cmp LAST_MSG, MSG_NOOP je . + 2;
518 mvi INTSTAT, TARGET_MSG_HELP;
519 call clear_target_state;

--- 1284 unchanged lines hidden ---
505 mvi MSG_DISCONNECT call target_outb;
506
507target_busfree:
508 clr SCSISIGO;
509 call complete_target_cmd;
510 cmp LAST_MSG, MSG_NOOP je . + 2;
511 mvi INTSTAT, TARGET_MSG_HELP;
512 call clear_target_state;

--- 1284 unchanged lines hidden ---