Tested clearing slave list after link down; minor changes.
--- a/master/fsm_master.c Fri Apr 17 12:55:55 2009 +0000
+++ b/master/fsm_master.c Mon Apr 20 09:17:39 2009 +0000
@@ -196,7 +196,11 @@
}
if (fsm->link_state && !master->main_device.link_state) { // link went down
- // clear slave list
+ if (master->debug_level) {
+ EC_DBG("Master state machine detected "
+ "link down. Clearing slave list.\n");
+ }
+
#ifdef EC_EOE
ec_master_eoe_stop(master);
ec_master_clear_eoe_handlers(master);
@@ -205,7 +209,7 @@
}
fsm->link_state = master->main_device.link_state;
- if (datagram->state != EC_DATAGRAM_RECEIVED) { // link is down
+ if (datagram->state != EC_DATAGRAM_RECEIVED) {
ec_fsm_master_restart(fsm);
return;
}