svn commit: r241949 - stable/9/sys/cam

Alexander Motin mav at FreeBSD.org
Tue Oct 23 15:37:58 UTC 2012


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;


More information about the svn-src-all mailing list