merge -c1521 branches/stable-1.4: Fixed race concerning ec_slave_config_state->operational.

This commit is contained in:
Florian Pose 2008-10-17 13:30:55 +00:00
parent 9819aa655b
commit b8f4c144de
3 changed files with 4 additions and 5 deletions

View File

@ -790,6 +790,8 @@ void ec_fsm_master_state_configure_slave(
if (ec_fsm_slave_config_exec(&fsm->fsm_slave_config))
return;
fsm->slave->force_config = 0;
// configuration finished
master->config_busy = 0;
wake_up_interruptible(&master->config_queue);

View File

@ -172,10 +172,6 @@ void ec_fsm_slave_config_state_start(
EC_DBG("Configuring slave %u...\n", fsm->slave->ring_position);
}
// configuration will be done immediately; therefore reset the
// force flag
fsm->slave->force_config = 0;
ec_fsm_change_start(fsm->fsm_change, fsm->slave, EC_SLAVE_STATE_INIT);
ec_fsm_change_exec(fsm->fsm_change);
fsm->state = ec_fsm_slave_config_state_init;

View File

@ -807,7 +807,8 @@ void ecrt_slave_config_state(const ec_slave_config_t *sc,
state->online = sc->slave ? 1 : 0;
if (state->online) {
state->operational =
sc->slave->current_state == EC_SLAVE_STATE_OP;
sc->slave->current_state == EC_SLAVE_STATE_OP
&& !sc->slave->force_config;
state->al_state = sc->slave->current_state;
} else {
state->operational = 0;