From owner-svn-src-stable-9@FreeBSD.ORG Tue Oct 23 15:37:58 2012 Return-Path: Delivered-To: svn-src-stable-9@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 032995B7; Tue, 23 Oct 2012 15:37:58 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF0AC8FC08; Tue, 23 Oct 2012 15:37:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q9NFbv7D000132; Tue, 23 Oct 2012 15:37:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q9NFbvve000126; Tue, 23 Oct 2012 15:37:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201210231537.q9NFbvve000126@svn.freebsd.org> From: Alexander Motin Date: Tue, 23 Oct 2012 15:37:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r241949 - stable/9/sys/cam X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable-9@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for only the 9-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Oct 2012 15:37:58 -0000 Author: mav Date: Tue Oct 23 15:37:57 2012 New Revision: 241949 URL: http://svn.freebsd.org/changeset/base/241949 Log: MFC r241536: Add explicit check for not set time inside cam_periph_freeze_after_event(). System time is set later on boot process then initial bus scan by CAM. Until that moment microtime() is equal to microuptime(), and if system boots quickly, the value can be close to zero. That causes settle time waiting even for buses that don't use reset during probe. On my test system this reduces boot time by 1 second if USB enabled, or by 4 seconds if USB disabled. CAM waited for ctl2cam0 bus "settle". Modified: stable/9/sys/cam/cam_periph.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Tue Oct 23 15:36:23 2012 (r241948) +++ stable/9/sys/cam/cam_periph.c Tue Oct 23 15:37:57 2012 (r241949) @@ -1257,6 +1257,9 @@ cam_periph_freeze_after_event(struct cam struct timeval delta; struct timeval duration_tv; + if (!timevalisset(event_time)) + return; + microtime(&delta); timevalsub(&delta, event_time); duration_tv.tv_sec = duration_ms / 1000;