aic7xxx.seq (79874) | aic7xxx.seq (81170) |
---|---|
1/* 2 * Adaptec 274x/284x/294x device driver firmware for Linux and FreeBSD. 3 * 4 * Copyright (c) 1994-2001 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-2001 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 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx.seq 79874 2001-07-18 21:39:48Z gibbs $ | 31 * $FreeBSD: head/sys/dev/aic7xxx/aic7xxx.seq 81170 2001-08-05 22:20:12Z gibbs $ |
32 */ 33 34VERSION = "$Id: //depot/src/aic7xxx/aic7xxx.seq#32 $" 35 36#include "aic7xxx.reg" 37#include "scsi_message.h" 38 39/* --- 1635 unchanged lines hidden (view full) --- 1675 1676 /* 1677 * If we are asked to save our position at the end of the 1678 * transfer, just mark us at the end rather than perform a 1679 * full save. 1680 */ 1681 test SCB_RESIDUAL_SGPTR[0], SG_LIST_NULL jz mesgin_sdptrs_full; 1682 or SCB_SGPTR, SG_LIST_NULL; | 32 */ 33 34VERSION = "$Id: //depot/src/aic7xxx/aic7xxx.seq#32 $" 35 36#include "aic7xxx.reg" 37#include "scsi_message.h" 38 39/* --- 1635 unchanged lines hidden (view full) --- 1675 1676 /* 1677 * If we are asked to save our position at the end of the 1678 * transfer, just mark us at the end rather than perform a 1679 * full save. 1680 */ 1681 test SCB_RESIDUAL_SGPTR[0], SG_LIST_NULL jz mesgin_sdptrs_full; 1682 or SCB_SGPTR, SG_LIST_NULL; |
1683 jmp mesgin_done; | 1683 if ((ahc->features & AHC_ULTRA2) != 0) { 1684 jmp ITloop; 1685 } else { 1686 jmp mesgin_done; 1687 } |
1684 1685mesgin_sdptrs_full: 1686 1687 /* 1688 * The SCB_SGPTR becomes the next one we'll download, 1689 * and the SCB_DATAPTR becomes the current SHADDR. 1690 * Use the residual number since STCNT is corrupted by 1691 * any message transfer. --- 508 unchanged lines hidden (view full) --- 2200 test DFSTATUS, MREQPEND jnz dma_scb_hang_wait; 2201 test DFSTATUS, HDONE jnz dma_scb_hang_dma_done; 2202 test DFSTATUS, HDONE jnz dma_scb_hang_dma_done; 2203 test DFSTATUS, HDONE jnz dma_scb_hang_dma_done; 2204 /* 2205 * The PCI module no longer intends to perform 2206 * a PCI transaction. Drain the fifo. 2207 */ | 1688 1689mesgin_sdptrs_full: 1690 1691 /* 1692 * The SCB_SGPTR becomes the next one we'll download, 1693 * and the SCB_DATAPTR becomes the current SHADDR. 1694 * Use the residual number since STCNT is corrupted by 1695 * any message transfer. --- 508 unchanged lines hidden (view full) --- 2204 test DFSTATUS, MREQPEND jnz dma_scb_hang_wait; 2205 test DFSTATUS, HDONE jnz dma_scb_hang_dma_done; 2206 test DFSTATUS, HDONE jnz dma_scb_hang_dma_done; 2207 test DFSTATUS, HDONE jnz dma_scb_hang_dma_done; 2208 /* 2209 * The PCI module no longer intends to perform 2210 * a PCI transaction. Drain the fifo. 2211 */ |
2208dma_scb_hang_empty_fifo: 2209 /* 2210 * Skip lines not yet transfered into the FIFO. 2211 */ 2212 add SINDEX, 7, HCNT; 2213 shr SINDEX, 3; 2214 2215 /* 2216 * Skip lines already copied out of the FIFO. 2217 */ 2218 add A, A, SINDEX; 2219 2220 call dma_scb_hang_dma_drain_fifo; 2221 2222 /* 2223 * Set the lines transferred to all but 2224 * those yet to reach the FIFO. 2225 */ 2226 not SINDEX; 2227 add A, 5, SINDEX; 2228 cmp A, 4 je dma_finish_nowait; | 2212dma_scb_hang_dma_drain_fifo: 2213 not A, HCNT; 2214 add A, SCB_DOWNLOAD_SIZE+SCB_BASE+1; 2215 and A, ~0x7; 2216 mov DINDIR,DFDAT; 2217 cmp DINDEX, A jne . - 1; 2218 cmp DINDEX, SCB_DOWNLOAD_SIZE+SCB_BASE 2219 je dma_finish_nowait; 2220 /* Restore A as the lines left to transfer. */ 2221 add A, -SCB_BASE, DINDEX; 2222 shr A, 3; |
2229 jmp dma_scb_hang_fifo; 2230dma_scb_hang_dma_done: 2231 and DFCNTRL, ~HDMAEN; 2232 test DFCNTRL, HDMAEN jnz .; | 2223 jmp dma_scb_hang_fifo; 2224dma_scb_hang_dma_done: 2225 and DFCNTRL, ~HDMAEN; 2226 test DFCNTRL, HDMAEN jnz .; |
2233dma_scb_hang_dma_drain_fifo: | |
2234 add SEQADDR0, A; 2235 } else { 2236 call dma_finish; 2237 } 2238 /* If we were putting the SCB, we are done */ 2239 call dfdat_in_8; 2240 call dfdat_in_8; 2241 call dfdat_in_8; --- 102 unchanged lines hidden --- | 2227 add SEQADDR0, A; 2228 } else { 2229 call dma_finish; 2230 } 2231 /* If we were putting the SCB, we are done */ 2232 call dfdat_in_8; 2233 call dfdat_in_8; 2234 call dfdat_in_8; --- 102 unchanged lines hidden --- |