Author: emaste
Date: Thu Oct 14 00:46:33 2010
New Revision: 213816
URL: http://svn.freebsd.org/changeset/base/213816

Log:
  MFC r212594:
  
    Avoid repeatedly spamming the console while a timed out command is waiting
    to complete.  Instead, print one message after the timeout period expires,
    and one more when (if) the command eventually completes.

Modified:
  stable/8/sys/dev/aac/aac.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/xen/xenpci/   (props changed)

Modified: stable/8/sys/dev/aac/aac.c
==============================================================================
--- stable/8/sys/dev/aac/aac.c  Wed Oct 13 23:31:17 2010        (r213815)
+++ stable/8/sys/dev/aac/aac.c  Thu Oct 14 00:46:33 2010        (r213816)
@@ -1129,6 +1129,11 @@ aac_complete(void *context, int pending)
                        AAC_PRINT_FIB(sc, fib);
                        break;
                }
+               if ((cm->cm_flags & AAC_CMD_TIMEDOUT) != 0)
+                       device_printf(sc->aac_dev,
+                           "COMMAND %p COMPLETED AFTER %d SECONDS\n",
+                           cm, (int)(time_uptime-cm->cm_timestamp));
+
                aac_remove_busy(cm);
 
                aac_unmap_command(cm);
@@ -2348,7 +2353,7 @@ aac_timeout(struct aac_softc *sc)
        deadline = time_uptime - AAC_CMD_TIMEOUT;
        TAILQ_FOREACH(cm, &sc->aac_busy, cm_link) {
                if ((cm->cm_timestamp  < deadline)
-                       /* && !(cm->cm_flags & AAC_CMD_TIMEDOUT) */) {
+                   && !(cm->cm_flags & AAC_CMD_TIMEDOUT)) {
                        cm->cm_flags |= AAC_CMD_TIMEDOUT;
                        device_printf(sc->aac_dev,
                            "COMMAND %p (TYPE %d) TIMEOUT AFTER %d SECONDS\n",
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to