# HG changeset patch # User Florian Pose # Date 1173707963 0 # Node ID 15cff76b66c755a2a4049a3c2dd4f5ade90fb6b6 # Parent 8c11399cc9110c704fb7fe667a121a6151e407e2 Added scan time output. diff -r 8c11399cc911 -r 15cff76b66c7 master/fsm_master.c --- a/master/fsm_master.c Mon Mar 12 13:59:06 2007 +0000 +++ b/master/fsm_master.c Mon Mar 12 13:59:23 2007 +0000 @@ -227,6 +227,7 @@ fsm->topology_change_pending = 0; fsm->tainted = 0; fsm->idle = 0; + fsm->scan_jiffies = jiffies; ec_master_eoe_stop(master); ec_master_destroy_slaves(master); @@ -744,11 +745,13 @@ /*****************************************************************************/ /** - Master state: SCAN SLAVES. - Executes the sub-statemachine for the scanning of a slave. -*/ - -void ec_fsm_master_state_scan_slaves(ec_fsm_master_t *fsm /**< master state machine */) + * Master state: SCAN SLAVES. + * Executes the sub-statemachine for the scanning of a slave. + */ + +void ec_fsm_master_state_scan_slaves( + ec_fsm_master_t *fsm /**< master state machine */ + ) { ec_master_t *master = fsm->master; ec_slave_t *slave = fsm->slave; @@ -764,7 +767,8 @@ return; } - EC_INFO("Bus scanning completed.\n"); + EC_INFO("Bus scanning completed in %u ms.\n", + (u32) (jiffies - fsm->scan_jiffies) * 1000 / HZ); // set initial states of all slaves to PREOP to make mailbox // communication possible diff -r 8c11399cc911 -r 15cff76b66c7 master/fsm_master.h --- a/master/fsm_master.h Mon Mar 12 13:59:06 2007 +0000 +++ b/master/fsm_master.h Mon Mar 12 13:59:23 2007 +0000 @@ -82,6 +82,7 @@ void (*state)(ec_fsm_master_t *); /**< master state function */ int idle; /**< state machine is in idle phase */ + unsigned long scan_jiffies; /**< beginning of slave scanning */ unsigned int slaves_responding; /**< number of responding slaves */ unsigned int topology_change_pending; /**< bus topology changed */ ec_slave_state_t slave_states; /**< states of responding slaves */