From 1907f932b8995c96eab85a1686d305c21d1b8898 Mon Sep 17 00:00:00 2001 From: "Justin T. Gibbs" Date: Wed, 9 Feb 2000 21:00:22 +0000 Subject: [PATCH] Fix parity error detection logic for aic7880 and aic7895 chips during the probe of external SRAM. Approved by: jkh@FreeBSD.org --- sys/dev/aic7xxx/ahc_pci.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/sys/dev/aic7xxx/ahc_pci.c b/sys/dev/aic7xxx/ahc_pci.c index 6e86839412b..44ff93fdc22 100644 --- a/sys/dev/aic7xxx/ahc_pci.c +++ b/sys/dev/aic7xxx/ahc_pci.c @@ -549,11 +549,11 @@ static void configure_termination(struct ahc_softc *ahc, u_int *sxfrctl1); static void ahc_new_term_detect(struct ahc_softc *ahc, - int *enableSEC_low, - int *enableSEC_high, - int *enablePRI_low, - int *enablePRI_high, - int *eeprom_present); + int *enableSEC_low, + int *enableSEC_high, + int *enablePRI_low, + int *enablePRI_high, + int *eeprom_present); static void aic787X_cable_detect(struct ahc_softc *ahc, int *internal50_present, int *internal68_present, int *externalcable_present, @@ -956,6 +956,15 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc) } enable = TRUE; + /* + * Clear any outstanding parity error + * and ensure that parity error reporting + * is enabled. + */ + ahc_outb(ahc, SEQCTL, 0); + ahc_outb(ahc, CLRINT, CLRPARERR); + ahc_outb(ahc, CLRINT, CLRBRKADRINT); + /* Now see if we can do parity */ ahc_ext_scbram_config(ahc, enable, /*pcheck*/TRUE, fast); num_scbs = ahc_probe_scbs(ahc); @@ -976,12 +985,17 @@ ahc_probe_ext_scbram(struct ahc_softc *ahc) fast = TRUE; done: - /* Clear any resulting parity error */ + /* + * Disable parity error reporting until we + * can load instruction ram. + */ + ahc_outb(ahc, SEQCTL, PERRORDIS|FAILDIS); + /* Clear any latched parity error */ ahc_outb(ahc, CLRINT, CLRPARERR); ahc_outb(ahc, CLRINT, CLRBRKADRINT); if (bootverbose && enable) { - printf("%s: External SRAM, %dns access%s\n", - ahc_name(ahc), fast ? 10 : 20, + printf("%s: External SRAM, %s access%s\n", + ahc_name(ahc), fast ? "fast" : "slow", pcheck ? ", parity checking enabled" : ""); }