diff options
author | gibbs <gibbs@FreeBSD.org> | 1996-05-31 06:32:09 +0000 |
---|---|---|
committer | gibbs <gibbs@FreeBSD.org> | 1996-05-31 06:32:09 +0000 |
commit | d4c70b6e6444ede1b94fe2e860bc791d28cd0604 (patch) | |
tree | bdbf2a508d98bacf8f6a569a836d34cc9e63c4ab /sys/i386 | |
parent | 5512054c8c5f872f505932515d9686b6f44dea96 (diff) | |
download | FreeBSD-src-d4c70b6e6444ede1b94fe2e860bc791d28cd0604.zip FreeBSD-src-d4c70b6e6444ede1b94fe2e860bc791d28cd0604.tar.gz |
Fix a regression. Turn off the selection hardware during a selection timeout
before clearing the SELTO interrupt. We used to do this in the past, but
this outb got lost.
Turn ATN on ourselves as appropriate during a parity error instead of relying
on ENAUTOATNP.
Don't use a loop in RESTART_SEQUENCER. Its not necessary.
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/scsi/aic7xxx.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/sys/i386/scsi/aic7xxx.c b/sys/i386/scsi/aic7xxx.c index 3158c3d..8ec84bb 100644 --- a/sys/i386/scsi/aic7xxx.c +++ b/sys/i386/scsi/aic7xxx.c @@ -31,7 +31,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: aic7xxx.c,v 1.70 1996/05/23 15:02:06 gibbs Exp $ + * $Id: aic7xxx.c,v 1.71 1996/05/30 07:19:57 gibbs Exp $ */ /* * TODO: @@ -235,10 +235,7 @@ static struct scsi_device ahc_dev = * Restart the sequencer program from address zero */ #define RESTART_SEQUENCER(ahc) \ - do { \ - AHC_OUTB(ahc, SEQCTL, SEQRESET|FASTMODE); \ - } while (AHC_INB(ahc, SEQADDR0) != 0 && \ - AHC_INB(ahc, SEQADDR1) != 0); \ + AHC_OUTB(ahc, SEQCTL, SEQRESET|FASTMODE); \ \ UNPAUSE_SEQUENCER(ahc); @@ -1747,13 +1744,14 @@ clear: printf("parity error during %s phase.\n", phase); /* - * We've set the hardware to assert ATN if we - * get a parity error on "in" phases, so all we - * need to do is stuff the message buffer with + * Assert ATN if we got a parity error in an "in" + * phase, and stuff the message buffer with * the appropriate message. "In" phases have set * mesg_out to something other than MSG_NOP. */ if(mesg_out != MSG_NOP) { + u_char scsisig = AHC_INB(ahc, SCSISIGI); + AHC_OUTB(ahc, SCSISIGO, scsisig | ATNO); AHC_OUTB(ahc, MSG0, mesg_out); AHC_OUTB(ahc, MSG_LEN, 1); } @@ -1783,6 +1781,8 @@ clear: IS_SCSIBUS_B(ahc, xs->sc_link) #endif ? 'B' : 'A'); + /* Stop the selection */ + AHC_OUTB(ahc, SCSISEQ, 0); AHC_OUTB(ahc, SCB_CONTROL, 0); @@ -2624,11 +2624,8 @@ static void ahc_loadseq(ahc) AHC_OUTSB(ahc, SEQRAM, seqprog, sizeof(seqprog)); AHC_OUTB(ahc, SEQCTL, FASTMODE|SEQRESET); - do { - AHC_OUTB(ahc, SEQCTL, SEQRESET|FASTMODE); - } while (AHC_INB(ahc, SEQADDR0) != 0 && - AHC_INB(ahc, SEQADDR1) != 0); + AHC_OUTB(ahc, SEQCTL, SEQRESET|FASTMODE); } /* |