Module Name:    src
Committed By:   jdolecek
Date:           Sat Nov 11 16:49:13 UTC 2017

Modified Files:
        src/sys/dev/ic: ahcisata_core.c

Log Message:
change several of error logs in ahci_intr_port() to use AHCIDEBUG_PRINT()
so they don't show unless debugging; e.g. the AHCI_P_IX_TFES seems to be
triggered normally by ATAPI with 'Media Change' error

adresses 'dmesg spam: ahcisata0 port 1: active 2 is 0x40000001 tfd 0x2051'
thread by Stefan Hertenberger on current-users@


To generate a diff of this commit:
cvs rdiff -u -r1.59 -r1.60 src/sys/dev/ic/ahcisata_core.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/ahcisata_core.c
diff -u src/sys/dev/ic/ahcisata_core.c:1.59 src/sys/dev/ic/ahcisata_core.c:1.60
--- src/sys/dev/ic/ahcisata_core.c:1.59	Fri Oct 20 07:06:07 2017
+++ src/sys/dev/ic/ahcisata_core.c	Sat Nov 11 16:49:13 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_core.c,v 1.59 2017/10/20 07:06:07 jdolecek Exp $	*/
+/*	$NetBSD: ahcisata_core.c,v 1.60 2017/11/11 16:49:13 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.59 2017/10/20 07:06:07 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_core.c,v 1.60 2017/11/11 16:49:13 jdolecek Exp $");
 
 #include <sys/types.h>
 #include <sys/malloc.h>
@@ -572,6 +572,7 @@ ahci_intr_port(struct ahci_softc *sc, st
 
 	is = AHCI_READ(sc, AHCI_P_IS(chp->ch_channel));
 	AHCI_WRITE(sc, AHCI_P_IS(chp->ch_channel), is);
+
 	AHCIDEBUG_PRINT((
 	    "ahci_intr_port %s port %d is 0x%x CI 0x%x SACT 0x%x TFD 0x%x\n",
 	    AHCINAME(sc),
@@ -604,8 +605,10 @@ ahci_intr_port(struct ahci_softc *sc, st
 				    >> AHCI_P_CMD_CCS_SHIFT;
 			}
 
-			aprint_error("%s port %d: active %x is 0x%x tfd 0x%x\n",
-			    AHCINAME(sc), chp->ch_channel, sact, is, tfd);
+			AHCIDEBUG_PRINT((
+			    "%s port %d: TFE: sact 0x%x is 0x%x tfd 0x%x\n",
+			    AHCINAME(sc), chp->ch_channel, sact, is, tfd),
+			    DEBUG_INTR);
 		} else {
 			/* mark an error, and set BSY */
 			tfd = (WDCE_ABRT << AHCI_P_TFD_ERR_SHIFT) |
@@ -613,9 +616,10 @@ ahci_intr_port(struct ahci_softc *sc, st
 		}
 
 		if (is & AHCI_P_IX_IFS) {
-			aprint_error("%s port %d: SERR 0x%x\n",
+			AHCIDEBUG_PRINT(("%s port %d: SERR 0x%x\n",
 			    AHCINAME(sc), chp->ch_channel,
-			    AHCI_READ(sc, AHCI_P_SERR(chp->ch_channel)));
+			    AHCI_READ(sc, AHCI_P_SERR(chp->ch_channel))),
+			    DEBUG_INTR);
 		}
 
 		if (!achp->ahcic_recovering)
@@ -628,8 +632,8 @@ ahci_intr_port(struct ahci_softc *sc, st
 			if (!achp->ahcic_recovering)
 				recover = true;
 
-			aprint_error("%s port %d: transfer aborted 0x%x\n",
-			    AHCINAME(sc), chp->ch_channel, tfd);
+			AHCIDEBUG_PRINT(("%s port %d: transfer aborted 0x%x\n",
+			    AHCINAME(sc), chp->ch_channel, tfd), DEBUG_INTR);
 
 		}
 	} else {

Reply via email to