summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgibbs <gibbs@FreeBSD.org>1999-08-16 02:33:46 +0000
committergibbs <gibbs@FreeBSD.org>1999-08-16 02:33:46 +0000
commite1f29df19fe8385a08a0e76eef216a188b052a30 (patch)
treee8591df83daa9f75313e72192b892fdadb3418d3
parent47a5eeb6791258a1ae8a09b8768e1d7302f35b4f (diff)
downloadFreeBSD-src-e1f29df19fe8385a08a0e76eef216a188b052a30.zip
FreeBSD-src-e1f29df19fe8385a08a0e76eef216a188b052a30.tar.gz
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.
-rw-r--r--sys/dev/aic7xxx/ahc_pci.c17
-rw-r--r--sys/pci/ahc_pci.c17
2 files changed, 18 insertions, 16 deletions
diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c
index bc4fd3f..38e071f 100644
--- a/sys/dev/aic7xxx/ahc_pci.c
+++ b/sys/dev/aic7xxx/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 <sys/param.h>
@@ -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
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 <sys/param.h>
@@ -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
OpenPOWER on IntegriCloud