Immediately restart slave FSM on several failed requests.
--- 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;
}