Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2012 15:37:57 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
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
Message-ID:  <201210231537.q9NFbvve000126@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210231537.q9NFbvve000126>