Date: Fri, 2 Oct 2009 05:00:07 GMT From: Scott Long <scottl@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 169118 for review Message-ID: <200910020500.n92507Q3058475@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200910020500.n92507Q3058475>