diff options
author | gibbs <gibbs@FreeBSD.org> | 1994-11-29 23:04:23 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1994-11-29 23:04:23 +0000 |
commit | 9f58d54fdf4eb0050768344d09c65f95be2ce15f (patch) | |
tree | b9b79201d2cb9396ff0da8b9681fb918ca7f1d90 /sys/gnu | |
parent | 1a56b472fc84919bdc69ba9d59de3deca89ab62d (diff) | |
download | FreeBSD-src-9f58d54fdf4eb0050768344d09c65f95be2ce15f.zip FreeBSD-src-9f58d54fdf4eb0050768344d09c65f95be2ce15f.tar.gz |
Merge in latest Linux sequencer code release with my changes. This should
make the sequencer code fully compatible with the aic7870 (ie 294x adaptors).
I've also added to my local mods putting the sequencer into "FASTMODE" clock.
This gives upwards of 2M/sec write preformance improvement in some scenarios.
There haven't been any reports of this causing problems, and I have been
reaping the benifits of it for more than a week now.
This also includes a new version of the pre-generated file <ugh>
Obtained from: John Aycock (aycock@cpsc.ucalgary.ca) and myself
Diffstat (limited to 'sys/gnu')
-rw-r--r-- | sys/gnu/misc/aic7770/aic7770.seq | 39 | ||||
-rw-r--r-- | sys/gnu/misc/aic7770/aic7770_seq.h | 114 | ||||
-rw-r--r-- | sys/gnu/misc/aic7xxx/aic7770_seq.h | 114 | ||||
-rw-r--r-- | sys/gnu/misc/aic7xxx/aic7xxx.seq | 39 |
4 files changed, 154 insertions, 152 deletions
diff --git a/sys/gnu/misc/aic7770/aic7770.seq b/sys/gnu/misc/aic7770/aic7770.seq index 9b83b84..9d55ed1 100644 --- a/sys/gnu/misc/aic7770/aic7770.seq +++ b/sys/gnu/misc/aic7770/aic7770.seq @@ -1,4 +1,4 @@ -# @(#)aic7xxx.seq 1.30 94/11/09 jda +# @(#)aic7xxx.seq 1.31 94/11/25 jda # # Adaptec 274x device driver for Linux. # Copyright (c) 1994 The University of Calgary Department of Computer Science. @@ -17,9 +17,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -VERSION AIC7XXX_SEQ_VERSION 1.30 +VERSION AIC7XXX_SEQ_VERSION 1.31 -MAXSCB-1 = 0xf +SCBMASK = 0x1f SCSISEQ = 0x00 SXFRCTL0 = 0x01 @@ -159,12 +159,12 @@ SG_NEXT+3 = 0x55 SCBCOUNT = 0x56 # the actual number of SCBs ACTIVE_A = 0x57 -# Poll QINCNT for work - the lower three bits contain +# Poll QINCNT for work - the lower bits contain # the number of entries in the Queue In FIFO. # start: test SCSISIGI,0x4 jnz reselect # BSYI - test QINCNT,MAXSCB-1 jz start + test QINCNT,SCBMASK jz start # We have at least one queued SCB now. Set the SCB pointer # from the FIFO so we see the right bank of SCB registers, @@ -194,7 +194,7 @@ active: # into the message out phase since we have ATN asserted. Prepare # the message to send, locking out the device driver. If the device # driver hasn't beaten us with an ABORT or RESET message, then tack -# on a SDTR negotation if required. +# on an SDTR negotiation if required. # # Messages are stored in scratch RAM starting with a flag byte (high bit # set means active message), one length byte, and then the message itself. @@ -663,7 +663,7 @@ bcopy: # if there is no active message already. SINDEX is returned intact. # mk_mesg: - mvi SEQCTL,0x40 # PAUSEDIS + mvi SEQCTL,0x50 # PAUSEDIS|FASTMODE test MSG_FLAGS,0x80 jnz mk_mesg1 # active message? mvi MSG_FLAGS,0x80 # if not, there is now @@ -671,7 +671,7 @@ mk_mesg: mov MSG_START+0,SINDEX # 1-byte message mk_mesg1: - clr SEQCTL # !PAUSEDIS + mvi SEQCTL,0x10 # !PAUSEDIS|FASTMODE ret # Input byte in Automatic PIO mode. The address to store the byte @@ -765,14 +765,14 @@ dma2: # We will be "done" DMAing when the transfer count goes to zero, or # the target changes the phase (in light of this, it makes sense that # the DMA circuitry doesn't ACK when PHASEMIS is active). If we are -# doing a SCSI->Host transfer, flush the data FIFO. +# doing a SCSI->Host transfer, the data FIFO should be flushed auto- +# magically on STCNT=0 or a phase change, so just wait for FIFO empty +# status. # dma3: test SINDEX,0x4 jnz dma5 # DIRECTION - and SINDEX,0xfe # mask out FIFORESET - or DFCNTRL,0x2,SINDEX # FIFOFLUSH dma4: - test DFCNTRL,0x2 jnz dma4 # FIFOFLUSHACK + test DFSTATUS,0x1 jz dma4 # FIFOFLUSHACK # Now shut the DMA enables off, and copy STCNT (ie. the underrun # amount, if any) to the SCB registers; SG_COUNT will get copied to @@ -811,14 +811,18 @@ initialize: # with synchronous SCSI, if you do it later, you blow away some # data in the SCSI FIFO that the target has already sent to you. # - mvi SXFRCTL0,0xa # SPIOEN|CLRCHN +# DFON is a 7870 bit enabling digital filtering of REQ and ACK signals. +# + mvi SXFRCTL0,0x8a # DFON|SPIOEN|CLRCHN # Set SCSI bus parity checking and the selection timeout value, # and enable the hardware selection timer. Set the SELTO interrupt # to signal the driver. # +# STPWEN is 7870-specific, enabling an external termination power source. +# and A,0x38,SCSICONF # PARITY_ENB_A|SEL_TIM_A[10] - or SXFRCTL1,0x4,A # ENSTIMER + or SXFRCTL1,0x5,A # ENSTIMER|STPWEN mvi SIMODE1,0x84 # ENSELTIMO|ENSCSIPERR # Initialize scatter-gather pointers by setting up the working copy @@ -846,7 +850,7 @@ assert1: # Find out if disconnection is ok from the information the BIOS has left # us. The target ID should be in the upper four bits of SINDEX; A will -# contain either 0x40 (disconnection ok) or 0x00 (diconnection not ok) +# contain either 0x40 (disconnection ok) or 0x00 (disconnection not ok) # on exit. # # This is the only place the target ID is limited to three bits, so we @@ -864,7 +868,7 @@ disconnect1: # Locate the SCB matching the target ID in SELID and the lun in the lower # three bits of SINDEX, and switch the SCB to it. Have the kernel print # a warning message if it can't be found, and generate an ABORT message -# to the target. We keep the value of the t/c/l that we are trying to +# to the target. We keep the value of the t/c/l that we are trying to find # in DINDEX so it is not overwritten during our check to see if we are # at the last SCB. # @@ -876,8 +880,8 @@ findSCB: clr SINDEX findSCB1: - mov SCBPTR,SINDEX # switch to new SCB mov A,DINDEX + mov SCBPTR,SINDEX # switch to new SCB cmp SCBARRAY+1,A jne findSCB2 # target ID/channel/lun match? test SCBARRAY+0,0x4 jz findSCB2 # should be disconnected @@ -1061,4 +1065,3 @@ mk_sdtr1: scsisig: mov SIGSTATE,SINDEX mov SCSISIGO,SINDEX ret - diff --git a/sys/gnu/misc/aic7770/aic7770_seq.h b/sys/gnu/misc/aic7770/aic7770_seq.h index b59e898..24fa91b 100644 --- a/sys/gnu/misc/aic7770/aic7770_seq.h +++ b/sys/gnu/misc/aic7770/aic7770_seq.h @@ -1,6 +1,6 @@ -#define AIC7XXX_SEQ_VERSION "1.30" +#define AIC7XXX_SEQ_VERSION "1.31" 0x04, 0x03, 0x18, 0x1a, - 0x0f, 0x9c, 0x00, 0x1e, + 0x1f, 0x9c, 0x00, 0x1e, 0xff, 0x9b, 0x90, 0x02, 0x70, 0xa1, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x02, @@ -8,16 +8,16 @@ 0xff, 0x90, 0x9b, 0x02, 0x00, 0x65, 0x00, 0x10, 0x00, 0x57, 0x57, 0x00, - 0x00, 0xa1, 0xf3, 0x16, + 0x00, 0xa1, 0xf1, 0x16, 0xff, 0x6a, 0x50, 0x02, 0xff, 0x6a, 0x34, 0x02, - 0x00, 0xa1, 0x05, 0x17, + 0x00, 0xa1, 0x03, 0x17, 0x07, 0xa1, 0x65, 0x02, 0x00, 0x65, 0x65, 0x00, 0x80, 0x65, 0xc2, 0x16, 0xff, 0x65, 0x64, 0x02, 0x00, 0x37, 0x13, 0x18, - 0x38, 0x6a, 0x53, 0x17, + 0x38, 0x6a, 0x51, 0x17, 0x48, 0x6a, 0x00, 0x00, 0x40, 0x0b, 0x1c, 0x1a, 0x10, 0x0b, 0x14, 0x1e, @@ -25,7 +25,7 @@ 0x00, 0x65, 0x1c, 0x10, 0x10, 0x6a, 0x00, 0x00, 0x20, 0x0b, 0x19, 0x1e, - 0x00, 0x19, 0xf3, 0x16, + 0x00, 0x19, 0xf1, 0x16, 0x80, 0x6a, 0x34, 0x00, 0xff, 0x6a, 0x00, 0x02, 0x08, 0x6a, 0x0c, 0x00, @@ -39,9 +39,9 @@ 0xa0, 0x64, 0x64, 0x1c, 0xe0, 0x64, 0x7c, 0x1c, 0x01, 0x6a, 0x91, 0x00, - 0x00, 0x6a, 0x5e, 0x17, - 0x00, 0x65, 0x01, 0x17, - 0x00, 0x65, 0x2b, 0x17, + 0x00, 0x6a, 0x5c, 0x17, + 0x00, 0x65, 0xff, 0x16, + 0x00, 0x65, 0x29, 0x17, 0x03, 0x6a, 0x64, 0x00, 0x8c, 0x6a, 0x66, 0x00, 0xb7, 0x6a, 0xbe, 0x16, @@ -58,12 +58,12 @@ 0x04, 0x6a, 0x64, 0x00, 0xb3, 0x6a, 0x66, 0x00, 0x14, 0x6a, 0xbe, 0x16, - 0x00, 0x65, 0x40, 0x17, + 0x00, 0x65, 0x3e, 0x17, 0xff, 0x51, 0xb2, 0x02, 0x00, 0x65, 0x1e, 0x10, - 0x40, 0x6a, 0x5e, 0x17, - 0x00, 0x65, 0x01, 0x17, - 0x00, 0x65, 0x2b, 0x17, + 0x40, 0x6a, 0x5c, 0x17, + 0x00, 0x65, 0xff, 0x16, + 0x00, 0x65, 0x29, 0x17, 0x03, 0x6a, 0x64, 0x00, 0x8c, 0x6a, 0x66, 0x00, 0xb7, 0x6a, 0xbe, 0x16, @@ -80,11 +80,11 @@ 0x04, 0x6a, 0x64, 0x00, 0xb3, 0x6a, 0x66, 0x00, 0x14, 0x6a, 0xbe, 0x16, - 0x00, 0x65, 0x40, 0x17, + 0x00, 0x65, 0x3e, 0x17, 0xff, 0x51, 0xb2, 0x02, 0x00, 0x65, 0x1e, 0x10, - 0x80, 0x6a, 0x5e, 0x17, - 0x00, 0x65, 0x01, 0x17, + 0x80, 0x6a, 0x5c, 0x17, + 0x00, 0x65, 0xff, 0x16, 0x03, 0x6a, 0x64, 0x00, 0x8c, 0x6a, 0x66, 0x00, 0xab, 0x6a, 0xbe, 0x16, @@ -96,10 +96,10 @@ 0xa7, 0x6a, 0xbe, 0x16, 0x3d, 0x6a, 0xe6, 0x16, 0x00, 0x65, 0x1e, 0x10, - 0xc0, 0x6a, 0x5e, 0x17, + 0xc0, 0x6a, 0x5c, 0x17, 0xae, 0x6a, 0xc9, 0x16, 0x00, 0x65, 0x1e, 0x10, - 0xa0, 0x6a, 0x5e, 0x17, + 0xa0, 0x6a, 0x5c, 0x17, 0x08, 0x6a, 0xc2, 0x16, 0x37, 0x6a, 0x65, 0x00, 0xff, 0x36, 0x66, 0x02, @@ -118,12 +118,12 @@ 0x01, 0x0c, 0x73, 0x1e, 0xe0, 0x03, 0x64, 0x02, 0xa0, 0x64, 0x79, 0x18, - 0x10, 0x6a, 0x5e, 0x17, + 0x10, 0x6a, 0x5c, 0x17, 0x00, 0x65, 0x1e, 0x10, 0x40, 0x6a, 0x0c, 0x00, 0xff, 0x6a, 0x35, 0x02, 0x00, 0x65, 0x1e, 0x10, - 0xe0, 0x6a, 0x5e, 0x17, + 0xe0, 0x6a, 0x5c, 0x17, 0x64, 0x6a, 0xcf, 0x16, 0x00, 0x6a, 0x31, 0x00, 0x00, 0x6a, 0x8a, 0x18, @@ -145,7 +145,7 @@ 0x4c, 0x6a, 0xd1, 0x16, 0x4d, 0x6a, 0xd1, 0x16, 0x41, 0x6a, 0x91, 0x00, - 0x00, 0x65, 0x4e, 0x17, + 0x00, 0x65, 0x4c, 0x17, 0xff, 0x65, 0x66, 0x02, 0xff, 0x4c, 0x6d, 0x02, 0xff, 0x64, 0x64, 0x04, @@ -156,24 +156,24 @@ 0x04, 0xa0, 0xa0, 0x00, 0x00, 0x65, 0xb9, 0x10, 0x02, 0x64, 0x9f, 0x18, - 0x00, 0x65, 0x23, 0x17, + 0x00, 0x65, 0x21, 0x17, 0x00, 0x65, 0xb9, 0x10, 0x03, 0x64, 0xa2, 0x18, - 0x00, 0x65, 0x1b, 0x17, + 0x00, 0x65, 0x19, 0x17, 0x00, 0x65, 0xb9, 0x10, 0x80, 0x64, 0xaa, 0x1e, 0x78, 0x64, 0xb5, 0x1a, - 0x00, 0x64, 0x0a, 0x17, + 0x00, 0x64, 0x08, 0x17, 0x80, 0x35, 0xb9, 0x1a, 0x04, 0xa0, 0xa0, 0x04, 0xc0, 0x6a, 0x34, 0x00, - 0x00, 0x65, 0x1b, 0x17, + 0x00, 0x65, 0x19, 0x17, 0x00, 0x65, 0xb9, 0x10, 0x07, 0x64, 0xb5, 0x18, 0x70, 0x05, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x02, 0x00, 0x4f, 0xb9, 0x1e, - 0x00, 0x65, 0x4e, 0x17, + 0x00, 0x65, 0x4c, 0x17, 0xff, 0x65, 0x66, 0x02, 0xff, 0x6a, 0x6d, 0x02, 0xff, 0x64, 0x64, 0x04, @@ -181,7 +181,7 @@ 0xff, 0x6a, 0x04, 0x02, 0x00, 0x65, 0xb9, 0x10, 0x10, 0x4e, 0x65, 0x00, - 0x00, 0x65, 0x5e, 0x17, + 0x00, 0x65, 0x5c, 0x17, 0x11, 0x6a, 0x91, 0x00, 0x07, 0x6a, 0xc2, 0x16, 0x00, 0x65, 0xd7, 0x16, @@ -193,12 +193,12 @@ 0xff, 0x64, 0x64, 0x06, 0x00, 0x6a, 0xbe, 0x18, 0xff, 0x6a, 0x6a, 0x03, - 0x40, 0x6a, 0x60, 0x00, + 0x50, 0x6a, 0x60, 0x00, 0x80, 0x35, 0xc7, 0x1a, 0x80, 0x6a, 0x35, 0x00, 0x01, 0x6a, 0x36, 0x00, 0xff, 0x65, 0x37, 0x02, - 0xff, 0x6a, 0x60, 0x02, + 0x10, 0x6a, 0x60, 0x00, 0xff, 0x6a, 0x6a, 0x03, 0x02, 0x0b, 0xc9, 0x1e, 0xff, 0x65, 0x66, 0x02, @@ -232,12 +232,10 @@ 0xff, 0x65, 0x93, 0x02, 0x01, 0x0b, 0xe9, 0x1a, 0x10, 0x0c, 0xe7, 0x1e, - 0x04, 0x65, 0xed, 0x1a, - 0xfe, 0x65, 0x65, 0x02, - 0x02, 0x65, 0x93, 0x00, - 0x02, 0x93, 0xec, 0x1a, + 0x04, 0x65, 0xeb, 0x1a, + 0x01, 0x94, 0xea, 0x1e, 0xff, 0x6a, 0x93, 0x02, - 0x38, 0x93, 0xee, 0x1a, + 0x38, 0x93, 0xec, 0x1a, 0x03, 0x6a, 0x64, 0x00, 0xaf, 0x6a, 0x66, 0x00, 0x08, 0x6a, 0xbe, 0x16, @@ -248,46 +246,46 @@ 0x00, 0x05, 0x05, 0x00, 0xff, 0x6a, 0x30, 0x02, 0xff, 0x6a, 0x4e, 0x02, - 0x0a, 0x6a, 0x01, 0x00, + 0x8a, 0x6a, 0x01, 0x00, 0x38, 0x5a, 0x64, 0x02, - 0x04, 0x64, 0x02, 0x00, + 0x05, 0x64, 0x02, 0x00, 0x84, 0x6a, 0x11, 0x00, - 0x00, 0x65, 0x1b, 0x17, - 0x00, 0x65, 0x4e, 0x17, + 0x00, 0x65, 0x19, 0x17, + 0x00, 0x65, 0x4c, 0x17, 0xff, 0x6c, 0x04, 0x02, 0xff, 0x6a, 0x6a, 0x03, - 0x80, 0x34, 0x04, 0x1f, - 0x40, 0x34, 0x04, 0x1b, + 0x80, 0x34, 0x02, 0x1f, + 0x40, 0x34, 0x02, 0x1b, 0x21, 0x6a, 0x91, 0x00, 0xff, 0x6a, 0x6a, 0x03, 0x70, 0x65, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x02, - 0x00, 0x32, 0x09, 0x1f, + 0x00, 0x32, 0x07, 0x1f, 0xff, 0x6a, 0x64, 0x03, 0x40, 0x6a, 0x64, 0x01, 0x07, 0x65, 0x64, 0x02, 0x00, 0x19, 0x66, 0x00, 0xf7, 0x66, 0x66, 0x02, 0xff, 0x6a, 0x65, 0x02, - 0xff, 0x65, 0x90, 0x02, 0xff, 0x66, 0x64, 0x02, - 0x00, 0xa1, 0x13, 0x19, - 0x04, 0xa0, 0x13, 0x1f, + 0xff, 0x65, 0x90, 0x02, + 0x00, 0xa1, 0x11, 0x19, + 0x04, 0xa0, 0x11, 0x1f, 0xff, 0x6a, 0x6a, 0x03, 0x01, 0x65, 0x65, 0x06, 0xff, 0x56, 0x64, 0x02, - 0x00, 0x65, 0x0e, 0x19, + 0x00, 0x65, 0x0c, 0x19, 0x31, 0x6a, 0x91, 0x00, 0x06, 0x6a, 0xc2, 0x16, 0x10, 0x4e, 0x65, 0x00, - 0x00, 0x65, 0x5e, 0x17, + 0x00, 0x65, 0x5c, 0x17, 0xff, 0x6a, 0x6a, 0x03, 0xff, 0xa2, 0x51, 0x02, 0x04, 0x6a, 0x64, 0x00, 0x52, 0x6a, 0x66, 0x00, 0xa3, 0x6a, 0xbe, 0x16, 0x80, 0x6a, 0x50, 0x00, - 0x10, 0xa0, 0x22, 0x1b, + 0x10, 0xa0, 0x20, 0x1b, 0xff, 0x6a, 0x50, 0x02, 0xff, 0x6a, 0x6a, 0x03, 0xff, 0x51, 0xa2, 0x02, @@ -295,11 +293,11 @@ 0xa3, 0x6a, 0x66, 0x00, 0x52, 0x6a, 0xbe, 0x16, 0xef, 0xa0, 0xa0, 0x02, - 0x80, 0x50, 0x2a, 0x1f, + 0x80, 0x50, 0x28, 0x1f, 0x10, 0xa0, 0xa0, 0x00, 0xff, 0x6a, 0x6a, 0x03, - 0xff, 0x51, 0x3f, 0x1f, - 0x80, 0x50, 0x3f, 0x1b, + 0xff, 0x51, 0x3d, 0x1f, + 0x80, 0x50, 0x3d, 0x1b, 0xff, 0x6a, 0x8e, 0x02, 0xff, 0x6a, 0x8d, 0x02, 0x08, 0x6a, 0x8c, 0x00, @@ -307,9 +305,9 @@ 0x88, 0x6a, 0x66, 0x00, 0x52, 0x6a, 0xbe, 0x16, 0x0d, 0x6a, 0x93, 0x00, - 0x08, 0x94, 0x34, 0x1f, + 0x08, 0x94, 0x32, 0x1f, 0xff, 0x6a, 0x93, 0x02, - 0x08, 0x93, 0x36, 0x1b, + 0x08, 0x93, 0x34, 0x1b, 0xff, 0x99, 0xb3, 0x02, 0xff, 0x99, 0xb4, 0x02, 0xff, 0x99, 0xb5, 0x02, @@ -319,10 +317,10 @@ 0xff, 0x99, 0xb9, 0x02, 0xff, 0x99, 0x6a, 0x02, 0xff, 0x6a, 0x6a, 0x03, - 0xff, 0x51, 0x4d, 0x1f, - 0xff, 0x08, 0x4c, 0x1b, - 0xff, 0x09, 0x4c, 0x1b, - 0xff, 0x0a, 0x4c, 0x1b, + 0xff, 0x51, 0x4b, 0x1f, + 0xff, 0x08, 0x4a, 0x1b, + 0xff, 0x09, 0x4a, 0x1b, + 0xff, 0x0a, 0x4a, 0x1b, 0xff, 0x6a, 0x50, 0x02, 0xff, 0x51, 0x51, 0x06, 0xff, 0x6a, 0x64, 0x02, @@ -339,8 +337,8 @@ 0x70, 0x05, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x03, 0xff, 0x65, 0x66, 0x02, - 0x00, 0x65, 0x4e, 0x17, - 0x00, 0x4f, 0x57, 0x1b, + 0x00, 0x65, 0x4c, 0x17, + 0x00, 0x4f, 0x55, 0x1b, 0xff, 0x6a, 0x6a, 0x03, 0x01, 0x6a, 0x6d, 0x00, 0x03, 0x6a, 0x6d, 0x00, diff --git a/sys/gnu/misc/aic7xxx/aic7770_seq.h b/sys/gnu/misc/aic7xxx/aic7770_seq.h index b59e898..24fa91b 100644 --- a/sys/gnu/misc/aic7xxx/aic7770_seq.h +++ b/sys/gnu/misc/aic7xxx/aic7770_seq.h @@ -1,6 +1,6 @@ -#define AIC7XXX_SEQ_VERSION "1.30" +#define AIC7XXX_SEQ_VERSION "1.31" 0x04, 0x03, 0x18, 0x1a, - 0x0f, 0x9c, 0x00, 0x1e, + 0x1f, 0x9c, 0x00, 0x1e, 0xff, 0x9b, 0x90, 0x02, 0x70, 0xa1, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x02, @@ -8,16 +8,16 @@ 0xff, 0x90, 0x9b, 0x02, 0x00, 0x65, 0x00, 0x10, 0x00, 0x57, 0x57, 0x00, - 0x00, 0xa1, 0xf3, 0x16, + 0x00, 0xa1, 0xf1, 0x16, 0xff, 0x6a, 0x50, 0x02, 0xff, 0x6a, 0x34, 0x02, - 0x00, 0xa1, 0x05, 0x17, + 0x00, 0xa1, 0x03, 0x17, 0x07, 0xa1, 0x65, 0x02, 0x00, 0x65, 0x65, 0x00, 0x80, 0x65, 0xc2, 0x16, 0xff, 0x65, 0x64, 0x02, 0x00, 0x37, 0x13, 0x18, - 0x38, 0x6a, 0x53, 0x17, + 0x38, 0x6a, 0x51, 0x17, 0x48, 0x6a, 0x00, 0x00, 0x40, 0x0b, 0x1c, 0x1a, 0x10, 0x0b, 0x14, 0x1e, @@ -25,7 +25,7 @@ 0x00, 0x65, 0x1c, 0x10, 0x10, 0x6a, 0x00, 0x00, 0x20, 0x0b, 0x19, 0x1e, - 0x00, 0x19, 0xf3, 0x16, + 0x00, 0x19, 0xf1, 0x16, 0x80, 0x6a, 0x34, 0x00, 0xff, 0x6a, 0x00, 0x02, 0x08, 0x6a, 0x0c, 0x00, @@ -39,9 +39,9 @@ 0xa0, 0x64, 0x64, 0x1c, 0xe0, 0x64, 0x7c, 0x1c, 0x01, 0x6a, 0x91, 0x00, - 0x00, 0x6a, 0x5e, 0x17, - 0x00, 0x65, 0x01, 0x17, - 0x00, 0x65, 0x2b, 0x17, + 0x00, 0x6a, 0x5c, 0x17, + 0x00, 0x65, 0xff, 0x16, + 0x00, 0x65, 0x29, 0x17, 0x03, 0x6a, 0x64, 0x00, 0x8c, 0x6a, 0x66, 0x00, 0xb7, 0x6a, 0xbe, 0x16, @@ -58,12 +58,12 @@ 0x04, 0x6a, 0x64, 0x00, 0xb3, 0x6a, 0x66, 0x00, 0x14, 0x6a, 0xbe, 0x16, - 0x00, 0x65, 0x40, 0x17, + 0x00, 0x65, 0x3e, 0x17, 0xff, 0x51, 0xb2, 0x02, 0x00, 0x65, 0x1e, 0x10, - 0x40, 0x6a, 0x5e, 0x17, - 0x00, 0x65, 0x01, 0x17, - 0x00, 0x65, 0x2b, 0x17, + 0x40, 0x6a, 0x5c, 0x17, + 0x00, 0x65, 0xff, 0x16, + 0x00, 0x65, 0x29, 0x17, 0x03, 0x6a, 0x64, 0x00, 0x8c, 0x6a, 0x66, 0x00, 0xb7, 0x6a, 0xbe, 0x16, @@ -80,11 +80,11 @@ 0x04, 0x6a, 0x64, 0x00, 0xb3, 0x6a, 0x66, 0x00, 0x14, 0x6a, 0xbe, 0x16, - 0x00, 0x65, 0x40, 0x17, + 0x00, 0x65, 0x3e, 0x17, 0xff, 0x51, 0xb2, 0x02, 0x00, 0x65, 0x1e, 0x10, - 0x80, 0x6a, 0x5e, 0x17, - 0x00, 0x65, 0x01, 0x17, + 0x80, 0x6a, 0x5c, 0x17, + 0x00, 0x65, 0xff, 0x16, 0x03, 0x6a, 0x64, 0x00, 0x8c, 0x6a, 0x66, 0x00, 0xab, 0x6a, 0xbe, 0x16, @@ -96,10 +96,10 @@ 0xa7, 0x6a, 0xbe, 0x16, 0x3d, 0x6a, 0xe6, 0x16, 0x00, 0x65, 0x1e, 0x10, - 0xc0, 0x6a, 0x5e, 0x17, + 0xc0, 0x6a, 0x5c, 0x17, 0xae, 0x6a, 0xc9, 0x16, 0x00, 0x65, 0x1e, 0x10, - 0xa0, 0x6a, 0x5e, 0x17, + 0xa0, 0x6a, 0x5c, 0x17, 0x08, 0x6a, 0xc2, 0x16, 0x37, 0x6a, 0x65, 0x00, 0xff, 0x36, 0x66, 0x02, @@ -118,12 +118,12 @@ 0x01, 0x0c, 0x73, 0x1e, 0xe0, 0x03, 0x64, 0x02, 0xa0, 0x64, 0x79, 0x18, - 0x10, 0x6a, 0x5e, 0x17, + 0x10, 0x6a, 0x5c, 0x17, 0x00, 0x65, 0x1e, 0x10, 0x40, 0x6a, 0x0c, 0x00, 0xff, 0x6a, 0x35, 0x02, 0x00, 0x65, 0x1e, 0x10, - 0xe0, 0x6a, 0x5e, 0x17, + 0xe0, 0x6a, 0x5c, 0x17, 0x64, 0x6a, 0xcf, 0x16, 0x00, 0x6a, 0x31, 0x00, 0x00, 0x6a, 0x8a, 0x18, @@ -145,7 +145,7 @@ 0x4c, 0x6a, 0xd1, 0x16, 0x4d, 0x6a, 0xd1, 0x16, 0x41, 0x6a, 0x91, 0x00, - 0x00, 0x65, 0x4e, 0x17, + 0x00, 0x65, 0x4c, 0x17, 0xff, 0x65, 0x66, 0x02, 0xff, 0x4c, 0x6d, 0x02, 0xff, 0x64, 0x64, 0x04, @@ -156,24 +156,24 @@ 0x04, 0xa0, 0xa0, 0x00, 0x00, 0x65, 0xb9, 0x10, 0x02, 0x64, 0x9f, 0x18, - 0x00, 0x65, 0x23, 0x17, + 0x00, 0x65, 0x21, 0x17, 0x00, 0x65, 0xb9, 0x10, 0x03, 0x64, 0xa2, 0x18, - 0x00, 0x65, 0x1b, 0x17, + 0x00, 0x65, 0x19, 0x17, 0x00, 0x65, 0xb9, 0x10, 0x80, 0x64, 0xaa, 0x1e, 0x78, 0x64, 0xb5, 0x1a, - 0x00, 0x64, 0x0a, 0x17, + 0x00, 0x64, 0x08, 0x17, 0x80, 0x35, 0xb9, 0x1a, 0x04, 0xa0, 0xa0, 0x04, 0xc0, 0x6a, 0x34, 0x00, - 0x00, 0x65, 0x1b, 0x17, + 0x00, 0x65, 0x19, 0x17, 0x00, 0x65, 0xb9, 0x10, 0x07, 0x64, 0xb5, 0x18, 0x70, 0x05, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x02, 0x00, 0x4f, 0xb9, 0x1e, - 0x00, 0x65, 0x4e, 0x17, + 0x00, 0x65, 0x4c, 0x17, 0xff, 0x65, 0x66, 0x02, 0xff, 0x6a, 0x6d, 0x02, 0xff, 0x64, 0x64, 0x04, @@ -181,7 +181,7 @@ 0xff, 0x6a, 0x04, 0x02, 0x00, 0x65, 0xb9, 0x10, 0x10, 0x4e, 0x65, 0x00, - 0x00, 0x65, 0x5e, 0x17, + 0x00, 0x65, 0x5c, 0x17, 0x11, 0x6a, 0x91, 0x00, 0x07, 0x6a, 0xc2, 0x16, 0x00, 0x65, 0xd7, 0x16, @@ -193,12 +193,12 @@ 0xff, 0x64, 0x64, 0x06, 0x00, 0x6a, 0xbe, 0x18, 0xff, 0x6a, 0x6a, 0x03, - 0x40, 0x6a, 0x60, 0x00, + 0x50, 0x6a, 0x60, 0x00, 0x80, 0x35, 0xc7, 0x1a, 0x80, 0x6a, 0x35, 0x00, 0x01, 0x6a, 0x36, 0x00, 0xff, 0x65, 0x37, 0x02, - 0xff, 0x6a, 0x60, 0x02, + 0x10, 0x6a, 0x60, 0x00, 0xff, 0x6a, 0x6a, 0x03, 0x02, 0x0b, 0xc9, 0x1e, 0xff, 0x65, 0x66, 0x02, @@ -232,12 +232,10 @@ 0xff, 0x65, 0x93, 0x02, 0x01, 0x0b, 0xe9, 0x1a, 0x10, 0x0c, 0xe7, 0x1e, - 0x04, 0x65, 0xed, 0x1a, - 0xfe, 0x65, 0x65, 0x02, - 0x02, 0x65, 0x93, 0x00, - 0x02, 0x93, 0xec, 0x1a, + 0x04, 0x65, 0xeb, 0x1a, + 0x01, 0x94, 0xea, 0x1e, 0xff, 0x6a, 0x93, 0x02, - 0x38, 0x93, 0xee, 0x1a, + 0x38, 0x93, 0xec, 0x1a, 0x03, 0x6a, 0x64, 0x00, 0xaf, 0x6a, 0x66, 0x00, 0x08, 0x6a, 0xbe, 0x16, @@ -248,46 +246,46 @@ 0x00, 0x05, 0x05, 0x00, 0xff, 0x6a, 0x30, 0x02, 0xff, 0x6a, 0x4e, 0x02, - 0x0a, 0x6a, 0x01, 0x00, + 0x8a, 0x6a, 0x01, 0x00, 0x38, 0x5a, 0x64, 0x02, - 0x04, 0x64, 0x02, 0x00, + 0x05, 0x64, 0x02, 0x00, 0x84, 0x6a, 0x11, 0x00, - 0x00, 0x65, 0x1b, 0x17, - 0x00, 0x65, 0x4e, 0x17, + 0x00, 0x65, 0x19, 0x17, + 0x00, 0x65, 0x4c, 0x17, 0xff, 0x6c, 0x04, 0x02, 0xff, 0x6a, 0x6a, 0x03, - 0x80, 0x34, 0x04, 0x1f, - 0x40, 0x34, 0x04, 0x1b, + 0x80, 0x34, 0x02, 0x1f, + 0x40, 0x34, 0x02, 0x1b, 0x21, 0x6a, 0x91, 0x00, 0xff, 0x6a, 0x6a, 0x03, 0x70, 0x65, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x02, - 0x00, 0x32, 0x09, 0x1f, + 0x00, 0x32, 0x07, 0x1f, 0xff, 0x6a, 0x64, 0x03, 0x40, 0x6a, 0x64, 0x01, 0x07, 0x65, 0x64, 0x02, 0x00, 0x19, 0x66, 0x00, 0xf7, 0x66, 0x66, 0x02, 0xff, 0x6a, 0x65, 0x02, - 0xff, 0x65, 0x90, 0x02, 0xff, 0x66, 0x64, 0x02, - 0x00, 0xa1, 0x13, 0x19, - 0x04, 0xa0, 0x13, 0x1f, + 0xff, 0x65, 0x90, 0x02, + 0x00, 0xa1, 0x11, 0x19, + 0x04, 0xa0, 0x11, 0x1f, 0xff, 0x6a, 0x6a, 0x03, 0x01, 0x65, 0x65, 0x06, 0xff, 0x56, 0x64, 0x02, - 0x00, 0x65, 0x0e, 0x19, + 0x00, 0x65, 0x0c, 0x19, 0x31, 0x6a, 0x91, 0x00, 0x06, 0x6a, 0xc2, 0x16, 0x10, 0x4e, 0x65, 0x00, - 0x00, 0x65, 0x5e, 0x17, + 0x00, 0x65, 0x5c, 0x17, 0xff, 0x6a, 0x6a, 0x03, 0xff, 0xa2, 0x51, 0x02, 0x04, 0x6a, 0x64, 0x00, 0x52, 0x6a, 0x66, 0x00, 0xa3, 0x6a, 0xbe, 0x16, 0x80, 0x6a, 0x50, 0x00, - 0x10, 0xa0, 0x22, 0x1b, + 0x10, 0xa0, 0x20, 0x1b, 0xff, 0x6a, 0x50, 0x02, 0xff, 0x6a, 0x6a, 0x03, 0xff, 0x51, 0xa2, 0x02, @@ -295,11 +293,11 @@ 0xa3, 0x6a, 0x66, 0x00, 0x52, 0x6a, 0xbe, 0x16, 0xef, 0xa0, 0xa0, 0x02, - 0x80, 0x50, 0x2a, 0x1f, + 0x80, 0x50, 0x28, 0x1f, 0x10, 0xa0, 0xa0, 0x00, 0xff, 0x6a, 0x6a, 0x03, - 0xff, 0x51, 0x3f, 0x1f, - 0x80, 0x50, 0x3f, 0x1b, + 0xff, 0x51, 0x3d, 0x1f, + 0x80, 0x50, 0x3d, 0x1b, 0xff, 0x6a, 0x8e, 0x02, 0xff, 0x6a, 0x8d, 0x02, 0x08, 0x6a, 0x8c, 0x00, @@ -307,9 +305,9 @@ 0x88, 0x6a, 0x66, 0x00, 0x52, 0x6a, 0xbe, 0x16, 0x0d, 0x6a, 0x93, 0x00, - 0x08, 0x94, 0x34, 0x1f, + 0x08, 0x94, 0x32, 0x1f, 0xff, 0x6a, 0x93, 0x02, - 0x08, 0x93, 0x36, 0x1b, + 0x08, 0x93, 0x34, 0x1b, 0xff, 0x99, 0xb3, 0x02, 0xff, 0x99, 0xb4, 0x02, 0xff, 0x99, 0xb5, 0x02, @@ -319,10 +317,10 @@ 0xff, 0x99, 0xb9, 0x02, 0xff, 0x99, 0x6a, 0x02, 0xff, 0x6a, 0x6a, 0x03, - 0xff, 0x51, 0x4d, 0x1f, - 0xff, 0x08, 0x4c, 0x1b, - 0xff, 0x09, 0x4c, 0x1b, - 0xff, 0x0a, 0x4c, 0x1b, + 0xff, 0x51, 0x4b, 0x1f, + 0xff, 0x08, 0x4a, 0x1b, + 0xff, 0x09, 0x4a, 0x1b, + 0xff, 0x0a, 0x4a, 0x1b, 0xff, 0x6a, 0x50, 0x02, 0xff, 0x51, 0x51, 0x06, 0xff, 0x6a, 0x64, 0x02, @@ -339,8 +337,8 @@ 0x70, 0x05, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x03, 0xff, 0x65, 0x66, 0x02, - 0x00, 0x65, 0x4e, 0x17, - 0x00, 0x4f, 0x57, 0x1b, + 0x00, 0x65, 0x4c, 0x17, + 0x00, 0x4f, 0x55, 0x1b, 0xff, 0x6a, 0x6a, 0x03, 0x01, 0x6a, 0x6d, 0x00, 0x03, 0x6a, 0x6d, 0x00, diff --git a/sys/gnu/misc/aic7xxx/aic7xxx.seq b/sys/gnu/misc/aic7xxx/aic7xxx.seq index 9b83b84..9d55ed1 100644 --- a/sys/gnu/misc/aic7xxx/aic7xxx.seq +++ b/sys/gnu/misc/aic7xxx/aic7xxx.seq @@ -1,4 +1,4 @@ -# @(#)aic7xxx.seq 1.30 94/11/09 jda +# @(#)aic7xxx.seq 1.31 94/11/25 jda # # Adaptec 274x device driver for Linux. # Copyright (c) 1994 The University of Calgary Department of Computer Science. @@ -17,9 +17,9 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -VERSION AIC7XXX_SEQ_VERSION 1.30 +VERSION AIC7XXX_SEQ_VERSION 1.31 -MAXSCB-1 = 0xf +SCBMASK = 0x1f SCSISEQ = 0x00 SXFRCTL0 = 0x01 @@ -159,12 +159,12 @@ SG_NEXT+3 = 0x55 SCBCOUNT = 0x56 # the actual number of SCBs ACTIVE_A = 0x57 -# Poll QINCNT for work - the lower three bits contain +# Poll QINCNT for work - the lower bits contain # the number of entries in the Queue In FIFO. # start: test SCSISIGI,0x4 jnz reselect # BSYI - test QINCNT,MAXSCB-1 jz start + test QINCNT,SCBMASK jz start # We have at least one queued SCB now. Set the SCB pointer # from the FIFO so we see the right bank of SCB registers, @@ -194,7 +194,7 @@ active: # into the message out phase since we have ATN asserted. Prepare # the message to send, locking out the device driver. If the device # driver hasn't beaten us with an ABORT or RESET message, then tack -# on a SDTR negotation if required. +# on an SDTR negotiation if required. # # Messages are stored in scratch RAM starting with a flag byte (high bit # set means active message), one length byte, and then the message itself. @@ -663,7 +663,7 @@ bcopy: # if there is no active message already. SINDEX is returned intact. # mk_mesg: - mvi SEQCTL,0x40 # PAUSEDIS + mvi SEQCTL,0x50 # PAUSEDIS|FASTMODE test MSG_FLAGS,0x80 jnz mk_mesg1 # active message? mvi MSG_FLAGS,0x80 # if not, there is now @@ -671,7 +671,7 @@ mk_mesg: mov MSG_START+0,SINDEX # 1-byte message mk_mesg1: - clr SEQCTL # !PAUSEDIS + mvi SEQCTL,0x10 # !PAUSEDIS|FASTMODE ret # Input byte in Automatic PIO mode. The address to store the byte @@ -765,14 +765,14 @@ dma2: # We will be "done" DMAing when the transfer count goes to zero, or # the target changes the phase (in light of this, it makes sense that # the DMA circuitry doesn't ACK when PHASEMIS is active). If we are -# doing a SCSI->Host transfer, flush the data FIFO. +# doing a SCSI->Host transfer, the data FIFO should be flushed auto- +# magically on STCNT=0 or a phase change, so just wait for FIFO empty +# status. # dma3: test SINDEX,0x4 jnz dma5 # DIRECTION - and SINDEX,0xfe # mask out FIFORESET - or DFCNTRL,0x2,SINDEX # FIFOFLUSH dma4: - test DFCNTRL,0x2 jnz dma4 # FIFOFLUSHACK + test DFSTATUS,0x1 jz dma4 # FIFOFLUSHACK # Now shut the DMA enables off, and copy STCNT (ie. the underrun # amount, if any) to the SCB registers; SG_COUNT will get copied to @@ -811,14 +811,18 @@ initialize: # with synchronous SCSI, if you do it later, you blow away some # data in the SCSI FIFO that the target has already sent to you. # - mvi SXFRCTL0,0xa # SPIOEN|CLRCHN +# DFON is a 7870 bit enabling digital filtering of REQ and ACK signals. +# + mvi SXFRCTL0,0x8a # DFON|SPIOEN|CLRCHN # Set SCSI bus parity checking and the selection timeout value, # and enable the hardware selection timer. Set the SELTO interrupt # to signal the driver. # +# STPWEN is 7870-specific, enabling an external termination power source. +# and A,0x38,SCSICONF # PARITY_ENB_A|SEL_TIM_A[10] - or SXFRCTL1,0x4,A # ENSTIMER + or SXFRCTL1,0x5,A # ENSTIMER|STPWEN mvi SIMODE1,0x84 # ENSELTIMO|ENSCSIPERR # Initialize scatter-gather pointers by setting up the working copy @@ -846,7 +850,7 @@ assert1: # Find out if disconnection is ok from the information the BIOS has left # us. The target ID should be in the upper four bits of SINDEX; A will -# contain either 0x40 (disconnection ok) or 0x00 (diconnection not ok) +# contain either 0x40 (disconnection ok) or 0x00 (disconnection not ok) # on exit. # # This is the only place the target ID is limited to three bits, so we @@ -864,7 +868,7 @@ disconnect1: # Locate the SCB matching the target ID in SELID and the lun in the lower # three bits of SINDEX, and switch the SCB to it. Have the kernel print # a warning message if it can't be found, and generate an ABORT message -# to the target. We keep the value of the t/c/l that we are trying to +# to the target. We keep the value of the t/c/l that we are trying to find # in DINDEX so it is not overwritten during our check to see if we are # at the last SCB. # @@ -876,8 +880,8 @@ findSCB: clr SINDEX findSCB1: - mov SCBPTR,SINDEX # switch to new SCB mov A,DINDEX + mov SCBPTR,SINDEX # switch to new SCB cmp SCBARRAY+1,A jne findSCB2 # target ID/channel/lun match? test SCBARRAY+0,0x4 jz findSCB2 # should be disconnected @@ -1061,4 +1065,3 @@ mk_sdtr1: scsisig: mov SIGSTATE,SINDEX mov SCSISIGO,SINDEX ret - |