From owner-svn-src-head@FreeBSD.ORG Tue Sep 14 01:51:05 2010 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8CAB1065675; Tue, 14 Sep 2010 01:51:04 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D84988FC1B; Tue, 14 Sep 2010 01:51:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o8E1p4J4054108; Tue, 14 Sep 2010 01:51:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o8E1p49P054106; Tue, 14 Sep 2010 01:51:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201009140151.o8E1p49P054106@svn.freebsd.org> From: Ed Maste Date: Tue, 14 Sep 2010 01:51:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r212594 - head/sys/dev/aac X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Sep 2010 01:51:05 -0000 Author: emaste Date: Tue Sep 14 01:51:04 2010 New Revision: 212594 URL: http://svn.freebsd.org/changeset/base/212594 Log: 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. MFC after: 1 month Modified: head/sys/dev/aac/aac.c Modified: head/sys/dev/aac/aac.c ============================================================================== --- head/sys/dev/aac/aac.c Tue Sep 14 01:48:01 2010 (r212593) +++ head/sys/dev/aac/aac.c Tue Sep 14 01:51:04 2010 (r212594) @@ -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",