Tested clearing slave list after link down; minor changes.
authorFlorian Pose <fp@igh-essen.com>
Mon, 20 Apr 2009 09:17:39 +0000
changeset 1402 4c1203ec569d
parent 1401 96baef8a3162
child 1403 4192279a1a82
Tested clearing slave list after link down; minor changes.
master/fsm_master.c
--- 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;
     }