master/fsm_master.c
changeset 880 f6212c54a5e3
parent 872 d4e0380d63b3
child 900 f8b5c6d21705
equal deleted inserted replaced
879:9b395c5646ab 880:f6212c54a5e3
   384     list_for_each_entry(slave, &master->slaves, list) {
   384     list_for_each_entry(slave, &master->slaves, list) {
   385         if (!slave->config)
   385         if (!slave->config)
   386             continue;
   386             continue;
   387         list_for_each_entry(req, &slave->config->sdo_requests, list) {
   387         list_for_each_entry(req, &slave->config->sdo_requests, list) {
   388             if (req->state == EC_REQUEST_QUEUED) {
   388             if (req->state == EC_REQUEST_QUEUED) {
   389                 req->state = EC_REQUEST_BUSY;
   389 
       
   390                 if (ec_sdo_request_timed_out(req)) {
       
   391                     req->state = EC_REQUEST_FAILURE;
       
   392                     if (master->debug_level)
       
   393                         EC_DBG("Sdo request for slave %u timed out...\n",
       
   394                                 slave->ring_position);
       
   395                     continue;
       
   396                 }
   390 
   397 
   391                 if (slave->current_state == EC_SLAVE_STATE_INIT ||
   398                 if (slave->current_state == EC_SLAVE_STATE_INIT ||
   392                         slave->error_flag) {
   399                         slave->error_flag) {
   393                     req->state = EC_REQUEST_FAILURE;
   400                     req->state = EC_REQUEST_FAILURE;
   394                     continue;
   401                     continue;
   395                 }
   402                 }
   396 
   403 
       
   404                 req->state = EC_REQUEST_BUSY;
   397                 if (master->debug_level)
   405                 if (master->debug_level)
   398                     EC_DBG("Processing Sdo request for slave %u...\n",
   406                     EC_DBG("Processing Sdo request for slave %u...\n",
   399                             slave->ring_position);
   407                             slave->ring_position);
   400 
   408 
   401                 fsm->idle = 0;
   409                 fsm->idle = 0;