diff --git a/sys/dev/microcode/aic7xxx/aic7xxx.seq b/sys/dev/microcode/aic7xxx/aic7xxx.seq index c89421666c81..1eb8f2edb470 100644 --- a/sys/dev/microcode/aic7xxx/aic7xxx.seq +++ b/sys/dev/microcode/aic7xxx/aic7xxx.seq @@ -1,4 +1,4 @@ -/* $NetBSD: aic7xxx.seq,v 1.9 1998/07/03 23:45:10 mjacob Exp $ */ +/* $NetBSD: aic7xxx.seq,v 1.10 1998/07/04 22:29:46 mjacob Exp $ */ /*+M*********************************************************************** *Adaptec 274x/284x/294x device driver for Linux and FreeBSD. @@ -43,7 +43,7 @@ * *-M************************************************************************/ -VERSION AIC7XXX_SEQ_VER "$NetBSD: aic7xxx.seq,v 1.9 1998/07/03 23:45:10 mjacob Exp $" +VERSION AIC7XXX_SEQ_VER "$NetBSD: aic7xxx.seq,v 1.10 1998/07/04 22:29:46 mjacob Exp $" #if defined(__NetBSD__) #include "../../ic/aic7xxxreg.h" @@ -905,9 +905,9 @@ mesgin_phasemis: */ dma: mov DFCNTRL,SINDEX -dma_loop: - test SSTAT0,DMADONE jnz dma_checkfifo - test SSTAT1,PHASEMIS jz dma_loop /* ie. underrun */ +dma1: + test SSTAT0,DMADONE jnz dma3 + test SSTAT1,PHASEMIS jz dma1 /* ie. underrun */ /* * We will be "done" DMAing when the transfer count goes to zero, or @@ -917,30 +917,20 @@ dma_loop: * magically on STCNT=0 or a phase change, so just wait for FIFO empty * status. */ -dma_checkfifo: - test DFCNTRL,DIRECTION jnz dma_fifoempty -dma_fifoflush: - test DFSTATUS,FIFOEMP jz dma_fifoflush - -dma_fifoempty: - /* Don't clobber an inprogress host data transfer */ - test DFSTATUS, MREQPEND jnz dma_fifoempty +dma3: + test SINDEX,DIRECTION jnz dma5 +dma4: + test DFSTATUS,FIFOEMP jz dma4 + /* - * Now shut the DMA enables off and make sure that the DMA enables are + * Now shut the DMA enables off and make sure that the DMA enables are * actually off first lest we get an ILLSADDR. */ -dma_dmadone: - and DFCNTRL, 0xc7 /* ~(SCSIEN|SDMAEN|HDMAEN); */ -dma_halt: - /* - * Some revisions of the aic7880 have a problem where, if the - * data fifo is full, but the PCI input latch is not empty, - * HDMAEN cannot be cleared. The fix used here is to attempt - * to drain the data fifo until there is space for the input - * latch to drain and HDMAEN de-asserts. - */ - mov NONE, DFDAT - test DFCNTRL, HDMAEN jnz dma_halt +dma5: + /* disable DMA, but maintain WIDEODD */ + and DFCNTRL,WIDEODD +dma6: + test DFCNTRL,0x38 jnz dma6 /* SCSIENACK|SDMAENACK|HDMAENACK */ return: ret diff --git a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h index efb0c1b8f4f7..350ec6fa0202 100644 --- a/sys/dev/microcode/aic7xxx/aic7xxx_seq.h +++ b/sys/dev/microcode/aic7xxx/aic7xxx_seq.h @@ -1,4 +1,4 @@ -#define AIC7XXX_SEQ_VER "$NetBSD: aic7xxx_seq.h,v 1.3 1998/07/03 23:45:10 mjacob Exp $" +#define AIC7XXX_SEQ_VER "$NetBSD: aic7xxx_seq.h,v 1.4 1998/07/04 22:29:46 mjacob Exp $" 0xff, 0x6a, 0x93, 0x02, 0xff, 0x6a, 0x03, 0x02, 0x0f, 0x4a, 0x4a, 0x02, @@ -33,7 +33,7 @@ 0x08, 0xa1, 0x64, 0x02, 0x00, 0x65, 0x65, 0x00, 0xff, 0x65, 0x1f, 0x02, - 0x00, 0xa1, 0x37, 0x17, + 0x00, 0xa1, 0x35, 0x17, 0x58, 0x6a, 0x00, 0x00, 0x40, 0xa0, 0x64, 0x02, 0x07, 0xa1, 0x35, 0x02, @@ -50,13 +50,13 @@ 0x40, 0x0b, 0x36, 0x1a, 0x20, 0x0b, 0x30, 0x1e, 0xff, 0x6a, 0x34, 0x02, - 0x00, 0x19, 0x37, 0x17, + 0x00, 0x19, 0x35, 0x17, 0x80, 0x4a, 0x4a, 0x00, 0x00, 0x65, 0x38, 0x10, 0xff, 0xba, 0x4e, 0x02, 0x20, 0x4a, 0x4a, 0x00, 0x02, 0x01, 0x01, 0x00, - 0x00, 0x65, 0x7e, 0x17, + 0x00, 0x65, 0x7c, 0x17, 0xff, 0x6c, 0x04, 0x02, 0xff, 0x05, 0x6e, 0x02, 0xff, 0x6e, 0x64, 0x02, @@ -91,9 +91,9 @@ 0xff, 0xab, 0x0a, 0x02, 0x00, 0x65, 0x60, 0x10, 0x79, 0x6a, 0x41, 0x00, - 0x00, 0x65, 0x3b, 0x17, + 0x00, 0x65, 0x39, 0x17, 0x10, 0x4a, 0x57, 0x1a, - 0x00, 0x65, 0x62, 0x17, + 0x00, 0x65, 0x60, 0x17, 0x10, 0x4a, 0x4a, 0x00, 0xff, 0x42, 0x65, 0x1a, 0x80, 0x02, 0x02, 0x00, @@ -140,7 +140,7 @@ 0x7f, 0x02, 0x02, 0x02, 0xe1, 0x6a, 0x91, 0x00, 0x00, 0x65, 0x48, 0x10, - 0x00, 0x65, 0x3b, 0x17, + 0x00, 0x65, 0x39, 0x17, 0xff, 0xb4, 0x88, 0x02, 0xff, 0xb5, 0x89, 0x02, 0xff, 0xb6, 0x8a, 0x02, @@ -240,7 +240,7 @@ 0xff, 0x4f, 0x90, 0x02, 0x10, 0x6a, 0x60, 0x00, 0x00, 0x65, 0xbd, 0x10, - 0x00, 0x65, 0x71, 0x17, + 0x00, 0x65, 0x6f, 0x17, 0x00, 0x65, 0xbd, 0x10, 0xef, 0x4a, 0x4a, 0x02, 0x00, 0x65, 0xbd, 0x10, @@ -263,7 +263,7 @@ 0x00, 0x65, 0x12, 0x13, 0x04, 0x4a, 0x0c, 0x1f, 0x00, 0x65, 0x2a, 0x17, - 0x00, 0x6a, 0x3e, 0x17, + 0x00, 0x6a, 0x3c, 0x17, 0xfb, 0xa0, 0xa0, 0x02, 0x40, 0x4a, 0x4a, 0x00, 0x00, 0x65, 0x48, 0x10, @@ -303,37 +303,35 @@ 0xff, 0x65, 0x93, 0x02, 0x01, 0x0b, 0x30, 0x1b, 0x10, 0x0c, 0x2e, 0x1f, - 0x04, 0x93, 0x32, 0x1b, + 0x04, 0x65, 0x32, 0x1b, 0x01, 0x94, 0x31, 0x1f, - 0x10, 0x94, 0x32, 0x1b, - 0xc7, 0x93, 0x93, 0x02, - 0xff, 0x99, 0x6a, 0x02, - 0x08, 0x93, 0x34, 0x1b, + 0x40, 0x93, 0x93, 0x02, + 0x38, 0x93, 0x33, 0x1b, 0xff, 0x6a, 0x6a, 0x03, 0xf0, 0x65, 0x65, 0x02, 0x0f, 0x05, 0x64, 0x02, 0x00, 0x65, 0x65, 0x00, 0xff, 0x65, 0x05, 0x03, - 0x80, 0x4a, 0x36, 0x1f, - 0x40, 0x4a, 0x36, 0x1b, + 0x80, 0x4a, 0x34, 0x1f, + 0x40, 0x4a, 0x34, 0x1b, 0x21, 0x6a, 0x91, 0x01, 0xff, 0x4b, 0x64, 0x02, 0xff, 0x65, 0x90, 0x02, 0x50, 0x6a, 0x60, 0x00, - 0x00, 0xa1, 0x56, 0x19, - 0x04, 0xa0, 0x56, 0x1f, - 0x20, 0xa0, 0x46, 0x1b, - 0xff, 0x3e, 0x48, 0x1d, - 0x00, 0x65, 0x56, 0x11, + 0x00, 0xa1, 0x54, 0x19, + 0x04, 0xa0, 0x54, 0x1f, + 0x20, 0xa0, 0x44, 0x1b, + 0xff, 0x3e, 0x46, 0x1d, + 0x00, 0x65, 0x54, 0x11, 0xff, 0x3e, 0x64, 0x02, - 0x00, 0xb9, 0x56, 0x19, - 0x04, 0x4a, 0x55, 0x1f, - 0xff, 0xba, 0x4e, 0x1d, + 0x00, 0xb9, 0x54, 0x19, + 0x04, 0x4a, 0x53, 0x1f, + 0xff, 0xba, 0x4c, 0x1d, 0xff, 0xbb, 0x50, 0x02, 0xff, 0xba, 0x90, 0x02, 0xff, 0x50, 0xbb, 0x02, 0xff, 0x65, 0x90, 0x02, - 0xff, 0xbb, 0x54, 0x1d, + 0xff, 0xbb, 0x52, 0x1d, 0xff, 0xba, 0x50, 0x02, 0xff, 0xbb, 0x90, 0x02, 0xff, 0x50, 0xba, 0x02, @@ -344,11 +342,11 @@ 0x10, 0x6a, 0x60, 0x00, 0x01, 0x65, 0x65, 0x06, 0xff, 0x47, 0x64, 0x02, - 0x00, 0x65, 0x3e, 0x19, + 0x00, 0x65, 0x3c, 0x19, 0x31, 0x6a, 0x91, 0x00, - 0x10, 0x3f, 0x36, 0x1d, + 0x10, 0x3f, 0x34, 0x1d, 0x10, 0x03, 0x03, 0x00, - 0xff, 0x3e, 0x60, 0x19, + 0xff, 0x3e, 0x5e, 0x19, 0x06, 0x6a, 0x1c, 0x17, 0x00, 0x65, 0x48, 0x10, 0x0d, 0x6a, 0x1c, 0x17, @@ -368,7 +366,7 @@ 0xff, 0xa5, 0x44, 0x02, 0xff, 0xa6, 0x45, 0x02, 0xff, 0xa7, 0x46, 0x03, - 0x10, 0x4a, 0x36, 0x1f, + 0x10, 0x4a, 0x34, 0x1f, 0xff, 0x42, 0xa3, 0x02, 0xff, 0x43, 0xa4, 0x02, 0xff, 0x44, 0xa5, 0x02, @@ -382,6 +380,6 @@ 0xff, 0xaa, 0xb1, 0x02, 0xff, 0xab, 0xb2, 0x03, 0x4c, 0x05, 0x64, 0x0a, - 0x08, 0x1f, 0x81, 0x1f, + 0x08, 0x1f, 0x7f, 0x1f, 0x08, 0x64, 0x64, 0x00, 0x20, 0x64, 0x65, 0x07,