Link down treated as topology change in state machine.
authorFlorian Pose <fp@igh-essen.com>
Fri, 19 May 2006 13:58:15 +0000
changeset 254 986afccca9ea
parent 253 6dd3e49dbb85
child 255 6b916cce7f27
Link down treated as topology change in state machine.
master/fsm.c
--- a/master/fsm.c	Fri May 19 13:39:35 2006 +0000
+++ b/master/fsm.c	Fri May 19 13:58:15 2006 +0000
@@ -151,7 +151,6 @@
 {
     ec_command_brd(&fsm->command, 0x0130, 2);
     ec_master_queue_command(fsm->master, &fsm->command);
-
     fsm->master_state = ec_fsm_master_wait;
 }
 
@@ -164,6 +163,9 @@
     ec_slave_t *slave;
 
     if (command->state != EC_CMD_RECEIVED) {
+        if (!fsm->master->device->link_state)
+            // treat link down as topology change
+            fsm->master_slaves_responding = 0;
         fsm->master_state = ec_fsm_master_start;
         fsm->master_state(fsm); // execute immediately
         return;