aic7xxx.seq (70204) | aic7xxx.seq (71390) |
---|---|
1/* 2 * Adaptec 274x/284x/294x device driver firmware for Linux and FreeBSD. 3 * 4 * Copyright (c) 1994-2000 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 --- 14 unchanged lines hidden (view full) --- 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * | 1/* 2 * Adaptec 274x/284x/294x device driver firmware for Linux and FreeBSD. 3 * 4 * Copyright (c) 1994-2000 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 --- 14 unchanged lines hidden (view full) --- 23 * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 24 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 25 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 26 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 27 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 28 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 29 * SUCH DAMAGE. 30 * |
31 * $Id: //depot/src/aic7xxx/aic7xxx.seq#15 $ | 31 * $Id: //depot/src/aic7xxx/aic7xxx.seq#16 $ |
32 * | 32 * |
33 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx.seq 70204 2000-12-20 01:11:37Z gibbs $ | 33 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx.seq 71390 2001-01-22 21:03:48Z gibbs $ |
34 */ 35 36#include "aic7xxx.reg" 37#include "scsi_message.h" 38 39/* 40 * A few words on the waiting SCB list: 41 * After starting the selection hardware, we check for reconnecting targets --- 7 unchanged lines hidden (view full) --- 49 * use byte 27 of the SCB as a psuedo-next pointer and to thread a list 50 * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, 51 * SCB_LIST_NULL is 0xff which is out of range. An entry is also added to 52 * this list everytime a request sense occurs or after completing a non-tagged 53 * command for which a second SCB has been queued. The sequencer will 54 * automatically consume the entries. 55 */ 56 | 34 */ 35 36#include "aic7xxx.reg" 37#include "scsi_message.h" 38 39/* 40 * A few words on the waiting SCB list: 41 * After starting the selection hardware, we check for reconnecting targets --- 7 unchanged lines hidden (view full) --- 49 * use byte 27 of the SCB as a psuedo-next pointer and to thread a list 50 * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, 51 * SCB_LIST_NULL is 0xff which is out of range. An entry is also added to 52 * this list everytime a request sense occurs or after completing a non-tagged 53 * command for which a second SCB has been queued. The sequencer will 54 * automatically consume the entries. 55 */ 56 |
57bus_free_sel: 58 /* 59 * Turn off the selection hardware. We need to reset the 60 * selection request in order to perform a new selection. 61 */ 62 and SCSISEQ, TEMODE|ENSELI|ENRSELI|ENAUTOATNP, SCSISEQ; 63 and SIMODE1, ~ENBUSFREE; |
|
57poll_for_work: 58 call clear_target_state; 59 and SXFRCTL0, ~SPIOEN; 60 if ((ahc->features & AHC_ULTRA2) != 0) { 61 clr SCSIBUSL; 62 } 63poll_for_work_loop: 64 test SSTAT0, SELDO|SELDI jnz selection; --- 65 unchanged lines hidden (view full) --- 130 /* 131 * Start the first entry on the waiting SCB list. 132 */ 133 mov SCBPTR, WAITING_SCBH; 134 call start_selection; 135 jmp poll_for_work_loop; 136 137abort_qinscb: | 64poll_for_work: 65 call clear_target_state; 66 and SXFRCTL0, ~SPIOEN; 67 if ((ahc->features & AHC_ULTRA2) != 0) { 68 clr SCSIBUSL; 69 } 70poll_for_work_loop: 71 test SSTAT0, SELDO|SELDI jnz selection; --- 65 unchanged lines hidden (view full) --- 137 /* 138 * Start the first entry on the waiting SCB list. 139 */ 140 mov SCBPTR, WAITING_SCBH; 141 call start_selection; 142 jmp poll_for_work_loop; 143 144abort_qinscb: |
138 mvi ABORT_QINSCB call set_seqint; | |
139 call add_scb_to_free_list; 140 jmp poll_for_work_loop; 141 142start_selection: 143 /* 144 * If bus reset interrupts have been disabled (from a previous 145 * reset), re-enable them now. Resets are only of interest 146 * when we have outstanding transactions, so we can safely --- 56 unchanged lines hidden (view full) --- 203 mvi CLRSINT1,CLRBUSFREE; 204 or SIMODE1, ENBUSFREE; 205 206 /* 207 * Guard against a bus free after (re)selection 208 * but prior to enabling the busfree interrupt. SELDI 209 * and SELDO will be cleared in that case. 210 */ | 145 call add_scb_to_free_list; 146 jmp poll_for_work_loop; 147 148start_selection: 149 /* 150 * If bus reset interrupts have been disabled (from a previous 151 * reset), re-enable them now. Resets are only of interest 152 * when we have outstanding transactions, so we can safely --- 56 unchanged lines hidden (view full) --- 209 mvi CLRSINT1,CLRBUSFREE; 210 or SIMODE1, ENBUSFREE; 211 212 /* 213 * Guard against a bus free after (re)selection 214 * but prior to enabling the busfree interrupt. SELDI 215 * and SELDO will be cleared in that case. 216 */ |
217 test SSTAT0, SELDI|SELDO jz bus_free_sel; |
|
211 test SSTAT0,SELDO jnz select_out; | 218 test SSTAT0,SELDO jnz select_out; |
212 test SSTAT0, SELDI jnz . + 3; 213 and SIMODE1, ~ENBUSFREE; 214 jmp poll_for_work; 215 mvi CLRSINT0, CLRSELDI; | |
216select_in: 217 if ((ahc->flags & AHC_TARGETROLE) != 0) { 218 if ((ahc->flags & AHC_INITIATORROLE) != 0) { 219 test SSTAT0, TARGET jz initiator_reselect; 220 } | 219select_in: 220 if ((ahc->flags & AHC_TARGETROLE) != 0) { 221 if ((ahc->flags & AHC_INITIATORROLE) != 0) { 222 test SSTAT0, TARGET jz initiator_reselect; 223 } |
224 mvi CLRSINT0, CLRSELDI; |
|
221 222 /* 223 * We've just been selected. Assert BSY and 224 * setup the phase for receiving messages 225 * from the target. 226 * 227 * If bus reset interrupts have been disabled (from a 228 * previous reset), re-enable them now. Resets are only --- 173 unchanged lines hidden (view full) --- 402 403if ((ahc->flags & AHC_INITIATORROLE) != 0) { 404/* 405 * Reselection has been initiated by a target. Make a note that we've been 406 * reselected, but haven't seen an IDENTIFY message from the target yet. 407 */ 408initiator_reselect: 409 /* XXX test for and handle ONE BIT condition */ | 225 226 /* 227 * We've just been selected. Assert BSY and 228 * setup the phase for receiving messages 229 * from the target. 230 * 231 * If bus reset interrupts have been disabled (from a 232 * previous reset), re-enable them now. Resets are only --- 173 unchanged lines hidden (view full) --- 406 407if ((ahc->flags & AHC_INITIATORROLE) != 0) { 408/* 409 * Reselection has been initiated by a target. Make a note that we've been 410 * reselected, but haven't seen an IDENTIFY message from the target yet. 411 */ 412initiator_reselect: 413 /* XXX test for and handle ONE BIT condition */ |
414 or SXFRCTL0, SPIOEN|CLRSTCNT|CLRCHN; |
|
410 and SAVED_SCSIID, SELID_MASK, SELID; 411 if ((ahc->features & AHC_ULTRA2) != 0) { 412 and A, OID, SCSIID_ULTRA2; 413 } else { 414 and A, OID, SCSIID; 415 } 416 or SAVED_SCSIID, A; 417 if ((ahc->features & AHC_TWIN) != 0) { 418 test SBLKCTL, SELBUSB jz . + 2; 419 or SAVED_SCSIID, TWIN_CHNLB; 420 } | 415 and SAVED_SCSIID, SELID_MASK, SELID; 416 if ((ahc->features & AHC_ULTRA2) != 0) { 417 and A, OID, SCSIID_ULTRA2; 418 } else { 419 and A, OID, SCSIID; 420 } 421 or SAVED_SCSIID, A; 422 if ((ahc->features & AHC_TWIN) != 0) { 423 test SBLKCTL, SELBUSB jz . + 2; 424 or SAVED_SCSIID, TWIN_CHNLB; 425 } |
421 or SXFRCTL0, SPIOEN|CLRSTCNT|CLRCHN; | 426 mvi CLRSINT0, CLRSELDI; |
422 jmp ITloop; 423} 424 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. --- 107 unchanged lines hidden (view full) --- 537 * the total for the command since we've already fetched 538 * the first byte. 539 */ 540 shr A, CMD_GROUP_CODE_SHIFT; 541 add SINDEX, CMDSIZE_TABLE, A; 542 mov A, SINDIR; 543 544 test A, 0xFF jz command_phase_done; | 427 jmp ITloop; 428} 429 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. --- 107 unchanged lines hidden (view full) --- 542 * the total for the command since we've already fetched 543 * the first byte. 544 */ 545 shr A, CMD_GROUP_CODE_SHIFT; 546 add SINDEX, CMDSIZE_TABLE, A; 547 mov A, SINDIR; 548 549 test A, 0xFF jz command_phase_done; |
545command_loop: | |
546 or SXFRCTL0, SPIOEN; | 550 or SXFRCTL0, SPIOEN; |
551command_loop: |
|
547 test SSTAT0, SPIORDY jz .; 548 cmp A, 1 jne . + 2; 549 and SXFRCTL0, ~SPIOEN; /* Last Byte */ 550 if ((ahc->features & AHC_CMD_CHAN) != 0) { 551 mov CCSCBRAM, SCSIDATL; 552 } else { 553 mov DFDAT, SCSIDATL; 554 } --- 699 unchanged lines hidden (view full) --- 1254 * be the case by clearing HADDR[0] even though 1255 * we aren't going to touch host memeory. 1256 */ 1257 clr HADDR[0]; 1258 if ((ahc->features & AHC_ULTRA2) != 0) { 1259 mvi DFCNTRL, (PRELOADEN|SCSIEN|DIRECTION); 1260 bmov DFDAT, SCB_CDB_STORE, 12; 1261 } else if ((ahc->features & AHC_CMD_CHAN) != 0) { | 552 test SSTAT0, SPIORDY jz .; 553 cmp A, 1 jne . + 2; 554 and SXFRCTL0, ~SPIOEN; /* Last Byte */ 555 if ((ahc->features & AHC_CMD_CHAN) != 0) { 556 mov CCSCBRAM, SCSIDATL; 557 } else { 558 mov DFDAT, SCSIDATL; 559 } --- 699 unchanged lines hidden (view full) --- 1259 * be the case by clearing HADDR[0] even though 1260 * we aren't going to touch host memeory. 1261 */ 1262 clr HADDR[0]; 1263 if ((ahc->features & AHC_ULTRA2) != 0) { 1264 mvi DFCNTRL, (PRELOADEN|SCSIEN|DIRECTION); 1265 bmov DFDAT, SCB_CDB_STORE, 12; 1266 } else if ((ahc->features & AHC_CMD_CHAN) != 0) { |
1262 if ((ahc->features & AHC_SCB_BTT) != 0) { | 1267 if ((ahc->flags & AHC_SCB_BTT) != 0) { |
1263 /* 1264 * On the 7895 the data FIFO will 1265 * get corrupted if you try to dump 1266 * data from external SCB memory into 1267 * the FIFO while it is enabled. So, 1268 * fill the fifo and then enable SCSI 1269 * transfers. 1270 */ 1271 mvi DFCNTRL, (DIRECTION|FIFORESET); 1272 } else { 1273 mvi DFCNTRL, (SCSIEN|SDMAEN|DIRECTION|FIFORESET); 1274 } 1275 bmov DFDAT, SCB_CDB_STORE, 12; | 1268 /* 1269 * On the 7895 the data FIFO will 1270 * get corrupted if you try to dump 1271 * data from external SCB memory into 1272 * the FIFO while it is enabled. So, 1273 * fill the fifo and then enable SCSI 1274 * transfers. 1275 */ 1276 mvi DFCNTRL, (DIRECTION|FIFORESET); 1277 } else { 1278 mvi DFCNTRL, (SCSIEN|SDMAEN|DIRECTION|FIFORESET); 1279 } 1280 bmov DFDAT, SCB_CDB_STORE, 12; |
1276 if ((ahc->features & AHC_SCB_BTT) != 0) { | 1281 if ((ahc->flags & AHC_SCB_BTT) != 0) { |
1277 mvi DFCNTRL, (SCSIEN|SDMAEN|DIRECTION|FIFOFLUSH); 1278 } else { 1279 or DFCNTRL, FIFOFLUSH; 1280 } 1281 } else { 1282 mvi DFCNTRL, (SCSIEN|SDMAEN|DIRECTION|FIFORESET); 1283 call copy_to_fifo_6; 1284 call copy_to_fifo_6; --- 293 unchanged lines hidden (view full) --- 1578 jmp mesgin_done; 1579 1580/* 1581 * Index into our Busy Target table. SINDEX and DINDEX are modified 1582 * upon return. SCBPTR may be modified by this action. 1583 */ 1584set_busy_target: 1585 shr DINDEX, 4, SINDEX; | 1282 mvi DFCNTRL, (SCSIEN|SDMAEN|DIRECTION|FIFOFLUSH); 1283 } else { 1284 or DFCNTRL, FIFOFLUSH; 1285 } 1286 } else { 1287 mvi DFCNTRL, (SCSIEN|SDMAEN|DIRECTION|FIFORESET); 1288 call copy_to_fifo_6; 1289 call copy_to_fifo_6; --- 293 unchanged lines hidden (view full) --- 1583 jmp mesgin_done; 1584 1585/* 1586 * Index into our Busy Target table. SINDEX and DINDEX are modified 1587 * upon return. SCBPTR may be modified by this action. 1588 */ 1589set_busy_target: 1590 shr DINDEX, 4, SINDEX; |
1586 if ((ahc->features & AHC_SCB_BTT) != 0) { | 1591 if ((ahc->flags & AHC_SCB_BTT) != 0) { |
1587 mov SCBPTR, SAVED_LUN; 1588 add DINDEX, SCB_64_BTT; 1589 } else { 1590 add DINDEX, BUSY_TARGETS; 1591 } 1592 mov DINDIR, ARG_1 ret; 1593 1594/* 1595 * Identify message? For a reconnecting target, this tells us the lun 1596 * that the reconnection is for - find the correct SCB and switch to it, 1597 * clearing the "disconnected" bit so we don't "find" it by accident later. 1598 */ 1599mesgin_identify: | 1592 mov SCBPTR, SAVED_LUN; 1593 add DINDEX, SCB_64_BTT; 1594 } else { 1595 add DINDEX, BUSY_TARGETS; 1596 } 1597 mov DINDIR, ARG_1 ret; 1598 1599/* 1600 * Identify message? For a reconnecting target, this tells us the lun 1601 * that the reconnection is for - find the correct SCB and switch to it, 1602 * clearing the "disconnected" bit so we don't "find" it by accident later. 1603 */ 1604mesgin_identify: |
1600 and SAVED_LUN, MSG_IDENTIFY_LUNMASK, A; | |
1601 /* 1602 * Determine whether a target is using tagged or non-tagged 1603 * transactions by first looking at the transaction stored in 1604 * the busy target array. If there is no untagged transaction 1605 * for this target or the transaction is for a different lun, then 1606 * this must be an untagged transaction. 1607 */ | 1605 /* 1606 * Determine whether a target is using tagged or non-tagged 1607 * transactions by first looking at the transaction stored in 1608 * the busy target array. If there is no untagged transaction 1609 * for this target or the transaction is for a different lun, then 1610 * this must be an untagged transaction. 1611 */ |
1608fetch_busy_target: 1609 shr A, 4, SAVED_SCSIID; 1610 if ((ahc->features & AHC_SCB_BTT) != 0) { 1611 add SINDEX, SCB_64_BTT, A; | 1612 shr SINDEX, 4, SELID; 1613 and SAVED_LUN, MSG_IDENTIFY_LUNMASK, A; 1614 if ((ahc->flags & AHC_SCB_BTT) != 0) { 1615 add SINDEX, SCB_64_BTT; |
1612 mov SCBPTR, SAVED_LUN; | 1616 mov SCBPTR, SAVED_LUN; |
1617 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1618 add NONE, -SCB_64_BTT, SINDEX; 1619 jc . + 2; 1620 mvi INTSTAT, OUT_OF_RANGE; 1621 nop; 1622 add NONE, -(SCB_64_BTT + 16), SINDEX; 1623 jnc . + 2; 1624 mvi INTSTAT, OUT_OF_RANGE; 1625 nop; 1626 } |
|
1613 } else { | 1627 } else { |
1614 add SINDEX, BUSY_TARGETS, A; | 1628 add SINDEX, BUSY_TARGETS; |
1615 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { | 1629 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { |
1616 add A, -BUSY_TARGETS, SINDEX; | 1630 add NONE, -BUSY_TARGETS, SINDEX; |
1617 jc . + 2; 1618 mvi INTSTAT, OUT_OF_RANGE; 1619 nop; | 1631 jc . + 2; 1632 mvi INTSTAT, OUT_OF_RANGE; 1633 nop; |
1620 add A, -(BUSY_TARGETS + 16), SINDEX; | 1634 add NONE, -(BUSY_TARGETS + 16), SINDEX; |
1621 jnc . + 2; 1622 mvi INTSTAT, OUT_OF_RANGE; 1623 nop; 1624 } 1625 } 1626 mov ARG_1, SINDIR; 1627 cmp ARG_1, SCB_LIST_NULL je snoop_tag; 1628 if ((ahc->flags & AHC_PAGESCBS) != 0) { 1629 mov ARG_1 call findSCB; 1630 } else { 1631 mov SCBPTR, RETURN_1; 1632 } | 1635 jnc . + 2; 1636 mvi INTSTAT, OUT_OF_RANGE; 1637 nop; 1638 } 1639 } 1640 mov ARG_1, SINDIR; 1641 cmp ARG_1, SCB_LIST_NULL je snoop_tag; 1642 if ((ahc->flags & AHC_PAGESCBS) != 0) { 1643 mov ARG_1 call findSCB; 1644 } else { 1645 mov SCBPTR, RETURN_1; 1646 } |
1633 if ((ahc->features & AHC_SCB_BTT) != 0) { | 1647 if ((ahc->flags & AHC_SCB_BTT) != 0) { |
1634 jmp setup_SCB_id_lun_okay; 1635 } else { | 1648 jmp setup_SCB_id_lun_okay; 1649 } else { |
1636 mov A, SCB_LUN; 1637 cmp SAVED_LUN, A je setup_SCB_id_lun_okay; | 1650 jmp setup_SCB_id_okay; |
1638 } | 1651 } |
1639 if ((ahc->flags & AHC_PAGESCBS) != 0) { 1640 call add_scb_to_disc_list; 1641 } | |
1642 1643/* 1644 * Here we "snoop" the bus looking for a SIMPLE QUEUE TAG message. 1645 * If we get one, we use the tag returned to find the proper 1646 * SCB. With SCB paging, we must search for non-tagged 1647 * transactions since the SCB may exist in any slot. If we're not 1648 * using SCB paging, we can use the tag as the direct index to the 1649 * SCB. 1650 */ 1651snoop_tag: | 1652 1653/* 1654 * Here we "snoop" the bus looking for a SIMPLE QUEUE TAG message. 1655 * If we get one, we use the tag returned to find the proper 1656 * SCB. With SCB paging, we must search for non-tagged 1657 * transactions since the SCB may exist in any slot. If we're not 1658 * using SCB paging, we can use the tag as the direct index to the 1659 * SCB. 1660 */ 1661snoop_tag: |
1662 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1663 or SEQ_FLAGS, 0x80; 1664 } |
|
1652 mov NONE,SCSIDATL; /* ACK Identify MSG */ 1653 call phase_lock; 1654 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1655 or SEQ_FLAGS, 0x1; 1656 } 1657 cmp LASTPHASE, P_MESGIN jne not_found; 1658 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1659 or SEQ_FLAGS, 0x2; --- 8 unchanged lines hidden (view full) --- 1668 mov SCBPTR, ARG_1; 1669 } 1670 1671/* 1672 * Ensure that the SCB the tag points to is for 1673 * an SCB transaction to the reconnecting target. 1674 */ 1675setup_SCB: | 1665 mov NONE,SCSIDATL; /* ACK Identify MSG */ 1666 call phase_lock; 1667 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1668 or SEQ_FLAGS, 0x1; 1669 } 1670 cmp LASTPHASE, P_MESGIN jne not_found; 1671 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1672 or SEQ_FLAGS, 0x2; --- 8 unchanged lines hidden (view full) --- 1681 mov SCBPTR, ARG_1; 1682 } 1683 1684/* 1685 * Ensure that the SCB the tag points to is for 1686 * an SCB transaction to the reconnecting target. 1687 */ 1688setup_SCB: |
1676 mov A, SAVED_SCSIID; | |
1677 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1678 or SEQ_FLAGS, 0x4; 1679 } | 1689 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1690 or SEQ_FLAGS, 0x4; 1691 } |
1680 cmp SCB_SCSIID, A jne not_found_cleanup_scb; 1681 mov A, SAVED_LUN; | 1692 mov A, SCB_SCSIID; 1693 cmp SAVED_SCSIID, A jne not_found_cleanup_scb; |
1682 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1683 or SEQ_FLAGS, 0x8; 1684 } | 1694 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1695 or SEQ_FLAGS, 0x8; 1696 } |
1685 cmp SCB_LUN, A jne not_found_cleanup_scb; | 1697setup_SCB_id_okay: 1698 mov A, SCB_LUN; 1699 cmp SAVED_LUN, A jne not_found_cleanup_scb; |
1686setup_SCB_id_lun_okay: 1687 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1688 or SEQ_FLAGS, 0x10; 1689 } 1690 test SCB_CONTROL,DISCONNECTED jz not_found_cleanup_scb; 1691 and SCB_CONTROL,~DISCONNECTED; 1692 test SCB_CONTROL, TAG_ENB jnz setup_SCB_tagged; 1693 mov A, SCBPTR; --- 266 unchanged lines hidden (view full) --- 1960 */ 1961dma_scb: 1962 mov A, SINDEX; 1963 if ((ahc->features & AHC_CMD_CHAN) != 0) { 1964 mvi DINDEX, CCHADDR; 1965 mvi HSCB_ADDR call set_64byte_addr; 1966 mov CCSCBPTR, SCBPTR; 1967 test DMAPARAMS, DIRECTION jz dma_scb_tohost; | 1700setup_SCB_id_lun_okay: 1701 if ((ahc->flags & AHC_SEQUENCER_DEBUG) != 0) { 1702 or SEQ_FLAGS, 0x10; 1703 } 1704 test SCB_CONTROL,DISCONNECTED jz not_found_cleanup_scb; 1705 and SCB_CONTROL,~DISCONNECTED; 1706 test SCB_CONTROL, TAG_ENB jnz setup_SCB_tagged; 1707 mov A, SCBPTR; --- 266 unchanged lines hidden (view full) --- 1974 */ 1975dma_scb: 1976 mov A, SINDEX; 1977 if ((ahc->features & AHC_CMD_CHAN) != 0) { 1978 mvi DINDEX, CCHADDR; 1979 mvi HSCB_ADDR call set_64byte_addr; 1980 mov CCSCBPTR, SCBPTR; 1981 test DMAPARAMS, DIRECTION jz dma_scb_tohost; |
1968 if ((ahc->features & AHC_SCB_BTT) != 0) { | 1982 if ((ahc->flags & AHC_SCB_BTT) != 0) { |
1969 mvi CCHCNT, SCB_DOWNLOAD_SIZE_64; 1970 } else { 1971 mvi CCHCNT, SCB_DOWNLOAD_SIZE; 1972 } 1973 mvi CCSCBCTL, CCARREN|CCSCBEN|CCSCBDIR|CCSCBRESET; 1974 cmp CCSCBCTL, CCSCBDONE|ARRDONE|CCARREN|CCSCBEN|CCSCBDIR jne .; 1975 jmp dma_scb_finish; 1976dma_scb_tohost: --- 175 unchanged lines hidden --- | 1983 mvi CCHCNT, SCB_DOWNLOAD_SIZE_64; 1984 } else { 1985 mvi CCHCNT, SCB_DOWNLOAD_SIZE; 1986 } 1987 mvi CCSCBCTL, CCARREN|CCSCBEN|CCSCBDIR|CCSCBRESET; 1988 cmp CCSCBCTL, CCSCBDONE|ARRDONE|CCARREN|CCSCBEN|CCSCBDIR jne .; 1989 jmp dma_scb_finish; 1990dma_scb_tohost: --- 175 unchanged lines hidden --- |