--- a/master/fsm_slave.c Tue Dec 01 16:00:22 2009 +0100
+++ b/master/fsm_slave.c Thu Dec 10 13:19:21 2009 +0100
@@ -142,17 +142,15 @@
// search the first external request to be processed
list_for_each_entry_safe(request, next, &slave->slave_sdo_requests, list) {
+
+ if (slave->current_state == EC_SLAVE_STATE_INIT) {
+ EC_WARN("Postponing SDO request, slave %u is in INIT.\n",
+ slave->ring_position);
+ return 0;
+ }
list_del_init(&request->list); // dequeue
request->req.state = EC_INT_REQUEST_BUSY;
- if (slave->current_state == EC_SLAVE_STATE_INIT) {
- EC_ERR("Discarding SDO request, slave %u is in INIT.\n",
- slave->ring_position);
- request->req.state = EC_INT_REQUEST_FAILURE;
- wake_up(&slave->sdo_queue);
- continue;
- }
-
// Found pending SDO request. Execute it!
if (master->debug_level)
EC_DBG("Processing SDO request for slave %u...\n",