Immediately restart slave FSM on several failed requests. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Wed, 14 Nov 2012 22:08:32 +0100
branchstable-1.5
changeset 2442 86ebf18a029f
parent 2441 a89481754fd5
child 2443 2c3ccdde3919
Immediately restart slave FSM on several failed requests.
master/fsm_slave.c
--- a/master/fsm_slave.c	Wed Nov 14 22:00:11 2012 +0100
+++ b/master/fsm_slave.c	Wed Nov 14 22:08:32 2012 +0100
@@ -234,7 +234,7 @@
         request->state = EC_INT_REQUEST_FAILURE;
         wake_up(&slave->sdo_queue);
         fsm->sdo_request = NULL;
-        fsm->state = ec_fsm_slave_state_idle;
+        fsm->state = ec_fsm_slave_state_ready;
         return;
     }
 
@@ -250,9 +250,9 @@
 
 /*****************************************************************************/
 
-/** Check for pending FOE requests and process one.
- *
- * \return non-zero, if an FOE request is processed.
+/** Check for pending FoE requests and process one.
+ *
+ * \return non-zero, if an FoE request is processed.
  */
 int ec_fsm_slave_action_process_foe(
         ec_fsm_slave_t *fsm /**< Slave state machine. */
@@ -264,7 +264,7 @@
     // search the first request to be processed
     list_for_each_entry_safe(request, next, &slave->foe_requests, list) {
         if (slave->current_state & EC_SLAVE_STATE_ACK_ERR) {
-            EC_SLAVE_WARN(slave, "Aborting FOE request,"
+            EC_SLAVE_WARN(slave, "Aborting FoE request,"
                     " slave has error flag set.\n");
             request->req.state = EC_INT_REQUEST_FAILURE;
             wake_up(&slave->sdo_queue);
@@ -308,7 +308,7 @@
         request->state = EC_INT_REQUEST_FAILURE;
         wake_up(&slave->foe_queue);
         fsm->foe_request = NULL;
-        fsm->state = ec_fsm_slave_state_idle;
+        fsm->state = ec_fsm_slave_state_ready;
         return;
     }
 
@@ -394,7 +394,7 @@
         request->state = EC_INT_REQUEST_FAILURE;
         wake_up(&slave->soe_queue);
         fsm->soe_request = NULL;
-        fsm->state = ec_fsm_slave_state_idle;
+        fsm->state = ec_fsm_slave_state_ready;
         return;
     }