Use the AHC_DISABLE_PCI_PERR flag to silence parity error reporting on
authorPeter Avalos <pavalos@dragonflybsd.org>
Sat, 7 Jul 2007 00:49:51 +0000 (00:49 +0000)
committerPeter Avalos <pavalos@dragonflybsd.org>
Sat, 7 Jul 2007 00:49:51 +0000 (00:49 +0000)
chips where setting the FAILDIS bit is not effective.  While here,
try again to make it clear that reported parity errors indicate
a failure of some PCI device *other than* the aic7xxx controller.

Obtained-from: FreeBSD

sys/dev/disk/aic7xxx/aic7xxx_pci.c

index 3d7cabc..190e25c 100644 (file)
@@ -41,8 +41,8 @@
  *
  * $Id: //depot/aic7xxx/aic7xxx/aic7xxx_pci.c#78 $
  *
- * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.33 2004/08/22 14:02:43 gibbs Exp $
- * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_pci.c,v 1.11 2007/07/06 05:40:41 pavalos Exp $
+ * $FreeBSD: src/sys/dev/aic7xxx/aic7xxx_pci.c,v 1.35 2005/09/22 05:11:35 gibbs Exp $
+ * $DragonFly: src/sys/dev/disk/aic7xxx/aic7xxx_pci.c,v 1.12 2007/07/07 00:49:51 pavalos Exp $
  */
 
 #ifdef __linux__
@@ -2023,11 +2023,15 @@ ahc_pci_intr(struct ahc_softc *ahc)
        status1 = aic_pci_read_config(ahc->dev_softc,
                                      PCIR_STATUS + 1, /*bytes*/1);
 
-       kprintf("%s: PCI error Interrupt at seqaddr = 0x%x\n",
-             ahc_name(ahc),
-             ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
+       if ((status1 & ~DPE) != 0
+        || (ahc->flags & AHC_DISABLE_PCI_PERR) == 0) {
+               kprintf("%s: PCI error Interrupt at seqaddr = 0x%x\n",
+                      ahc_name(ahc),
+                      ahc_inb(ahc, SEQADDR0) | (ahc_inb(ahc, SEQADDR1) << 8));
+       }
 
-       if (status1 & DPE) {
+       if (status1 & DPE
+        && (ahc->flags & AHC_DISABLE_PCI_PERR) == 0) {
                ahc->pci_target_perr_count++;
                kprintf("%s: Data Parity Error Detected during address "
                       "or write data phase\n", ahc_name(ahc));
@@ -2060,17 +2064,20 @@ ahc_pci_intr(struct ahc_softc *ahc)
                ahc_outb(ahc, CLRINT, CLRPARERR);
        }
 
-       if (ahc->pci_target_perr_count > AHC_PCI_TARGET_PERR_THRESH) {
+       if (ahc->pci_target_perr_count > AHC_PCI_TARGET_PERR_THRESH
+        && (ahc->flags & AHC_DISABLE_PCI_PERR) == 0) {
                kprintf(
 "%s: WARNING WARNING WARNING WARNING\n"
 "%s: Too many PCI parity errors observed as a target.\n"
-"%s: Some device on this bus is generating bad parity.\n"
-"%s: This is an error *observed by*, not *generated by*, this controller.\n"
+"%s: Some device on this PCI bus is generating bad parity.\n"
+"%s: This is an error *observed by*, not *generated by*, %s.\n"
 "%s: PCI parity error checking has been disabled.\n"
 "%s: WARNING WARNING WARNING WARNING\n",
                       ahc_name(ahc), ahc_name(ahc), ahc_name(ahc),
-                      ahc_name(ahc), ahc_name(ahc), ahc_name(ahc));
+                      ahc_name(ahc), ahc_name(ahc), ahc_name(ahc),
+                      ahc_name(ahc));
                ahc->seqctl |= FAILDIS;
+               ahc->flags |= AHC_DISABLE_PCI_PERR;
                ahc_outb(ahc, SEQCTL, ahc->seqctl);
        }
        ahc_unpause(ahc);