From owner-p4-projects@FreeBSD.ORG Fri Oct 2 05:00:12 2009 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 9E91C106568B; Fri, 2 Oct 2009 05:00:11 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A4451065670 for ; Fri, 2 Oct 2009 05:00:11 +0000 (UTC) (envelope-from scottl@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 481DE8FC1C for ; Fri, 2 Oct 2009 05:00:11 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id n92507cZ058477 for ; Fri, 2 Oct 2009 05:00:07 GMT (envelope-from scottl@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id n92507Q3058475 for perforce@freebsd.org; Fri, 2 Oct 2009 05:00:07 GMT (envelope-from scottl@freebsd.org) Date: Fri, 2 Oct 2009 05:00:07 GMT Message-Id: <200910020500.n92507Q3058475@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to scottl@freebsd.org using -f From: Scott Long To: Perforce Change Reviews Cc: Subject: PERFORCE change 169118 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Oct 2009 05:00:12 -0000 http://perforce.freebsd.org/chv.cgi?CH=169118 Change 169118 by scottl@scottl-y1 on 2009/10/02 05:00:03 Clean up xpt_config timeout messages. Affected files ... .. //depot/projects/firewire/sys/cam/cam_xpt.c#4 edit Differences ... ==== //depot/projects/firewire/sys/cam/cam_xpt.c#4 (text+ko) ==== @@ -4628,9 +4628,13 @@ return(1); } +#define CAM_WARN_INTERVAL_SECS 60 + static void xpt_config(void *arg) { + u_int warned = 0; + /* * Now that interrupts are enabled, go find our devices */ @@ -4682,8 +4686,12 @@ mtx_lock(&xsoftc.xpt_lock); while (msleep(xpt_config, &xsoftc.xpt_lock, PCONFIG, "camhk", - 30 * hz) == EWOULDBLOCK) { - printf("Warning\n"); + CAM_WARN_INTERVAL_SECS * hz) == EWOULDBLOCK) { + if (++warned < 6) + printf("xpt_config: still waiting after %d seconds " + "for CAM buses to respond\n", + warned * CAM_WARN_INTERVAL_SECS); + KASSERT(warned < 6, ("xpt_config: waited too long")); } mtx_unlock(&xsoftc.xpt_lock); }