From e1f29df19fe8385a08a0e76eef216a188b052a30 Mon Sep 17 00:00:00 2001 From: gibbs Date: Mon, 16 Aug 1999 02:33:46 +0000 Subject: Fix a long standing bug in the auto-termination control settings for the aic7890/91/96/97 cards. This could cause the system to go into a long retry/recovery loop during probe. Fix the alignment argument to bus_dma_tag_create(). Don't set the CACHETHEN bit in dscommand0 for Ultra2 controllers until we know more about its behavior. The description for this bit makes it sound like it could cause problems with certain PCI chipsets. --- sys/pci/ahc_pci.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'sys/pci') diff --git a/sys/pci/ahc_pci.c b/sys/pci/ahc_pci.c index bc4fd3f..38e071f 100644 --- a/sys/pci/ahc_pci.c +++ b/sys/pci/ahc_pci.c @@ -34,7 +34,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: ahc_pci.c,v 1.15 1999/05/26 16:59:17 gibbs Exp $ + * $Id: ahc_pci.c,v 1.16 1999/07/03 20:16:59 peter Exp $ */ #include @@ -591,7 +591,7 @@ ahc_pci_attach(device_t dev) /* Allocate a dmatag for our SCB DMA maps */ /* XXX Should be a child of the PCI bus dma tag */ - error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/0, + error = bus_dma_tag_create(/*parent*/NULL, /*alignment*/1, /*boundary*/0, /*lowaddr*/BUS_SPACE_MAXADDR_32BIT, /*highaddr*/BUS_SPACE_MAXADDR, @@ -748,7 +748,7 @@ ahc_pci_attach(device_t dev) id_string = "aic7896/97 "; dscommand0 = ahc_inb(ahc, DSCOMMAND0); dscommand0 &= ~(USCBSIZE32|DPARCKEN); - dscommand0 |= CACHETHEN|MPARCKEN; + dscommand0 |= MPARCKEN; ahc_outb(ahc, DSCOMMAND0, dscommand0); break; } @@ -763,7 +763,7 @@ ahc_pci_attach(device_t dev) id_string = "aic7890/91 "; dscommand0 = ahc_inb(ahc, DSCOMMAND0); dscommand0 &= ~(USCBSIZE32|DPARCKEN); - dscommand0 |= CACHETHEN|MPARCKEN; + dscommand0 |= MPARCKEN; ahc_outb(ahc, DSCOMMAND0, dscommand0); break; } @@ -1236,16 +1236,17 @@ ahc_ultra2_term_detect(struct ahc_softc *ahc, int *enableSEC_low, * BRDDAT7 = Eeprom * BRDDAT6 = Enable Secondary High Byte termination * BRDDAT5 = Enable Secondary Low Byte termination - * BRDDAT4 = Enable Primary low byte termination - * BRDDAT3 = Enable Primary high byte termination + * BRDDAT4 = Enable Primary high byte termination + * BRDDAT3 = Enable Primary low byte termination */ brdctl = read_brdctl(ahc); + printf("BRDCTL = 0x%x\n", brdctl); *eeprom_present = brdctl & BRDDAT7; *enableSEC_high = (brdctl & BRDDAT6); *enableSEC_low = (brdctl & BRDDAT5); - *enablePRI_low = (brdctl & BRDDAT4); - *enablePRI_high = (brdctl & BRDDAT3); + *enablePRI_high = (brdctl & BRDDAT4); + *enablePRI_low = (brdctl & BRDDAT3); } static void -- cgit v1.1