Author: mav
Date: Sun Oct 14 08:50:05 2012
New Revision: 241536
URL: http://svn.freebsd.org/changeset/base/241536

Log:
  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:
  head/sys/cam/cam_periph.c

Modified: head/sys/cam/cam_periph.c
==============================================================================
--- head/sys/cam/cam_periph.c   Sun Oct 14 07:55:14 2012        (r241535)
+++ head/sys/cam/cam_periph.c   Sun Oct 14 08:50:05 2012        (r241536)
@@ -1250,6 +1250,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;
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to