Added some debug statements concering re-scanning.
This commit is contained in:
parent
7843101ed3
commit
1a6af314d8
|
|
@ -292,7 +292,8 @@ void ec_fsm_master_state_broadcast(
|
||||||
if (datagram->working_counter != fsm->slaves_responding[fsm->dev_idx]) {
|
if (datagram->working_counter != fsm->slaves_responding[fsm->dev_idx]) {
|
||||||
fsm->rescan_required = 1;
|
fsm->rescan_required = 1;
|
||||||
fsm->slaves_responding[fsm->dev_idx] = datagram->working_counter;
|
fsm->slaves_responding[fsm->dev_idx] = datagram->working_counter;
|
||||||
EC_MASTER_INFO(master, "%u slave(s) responding on %s device.\n",
|
EC_MASTER_INFO(master, "%u slave(s) responding on %s device. "
|
||||||
|
"Re-scanning on next possibility.\n",
|
||||||
fsm->slaves_responding[fsm->dev_idx],
|
fsm->slaves_responding[fsm->dev_idx],
|
||||||
ec_device_names[fsm->dev_idx != 0]);
|
ec_device_names[fsm->dev_idx != 0]);
|
||||||
}
|
}
|
||||||
|
|
@ -355,6 +356,8 @@ void ec_fsm_master_state_broadcast(
|
||||||
master->scan_index = 0;
|
master->scan_index = 0;
|
||||||
up(&master->scan_sem);
|
up(&master->scan_sem);
|
||||||
|
|
||||||
|
EC_MASTER_INFO(master, "Re-scanning now.\n");
|
||||||
|
|
||||||
// clear all slaves and scan the bus
|
// clear all slaves and scan the bus
|
||||||
fsm->rescan_required = 0;
|
fsm->rescan_required = 0;
|
||||||
fsm->idle = 0;
|
fsm->idle = 0;
|
||||||
|
|
@ -651,7 +654,7 @@ void ec_fsm_master_action_idle(
|
||||||
// check for pending SII write operations.
|
// check for pending SII write operations.
|
||||||
if (ec_fsm_master_action_process_sii(fsm)) {
|
if (ec_fsm_master_action_process_sii(fsm)) {
|
||||||
return; // SII write request found
|
return; // SII write request found
|
||||||
}
|
}
|
||||||
|
|
||||||
ec_fsm_master_restart(fsm);
|
ec_fsm_master_restart(fsm);
|
||||||
}
|
}
|
||||||
|
|
@ -768,7 +771,8 @@ void ec_fsm_master_state_read_state(
|
||||||
if (datagram->working_counter != 1) {
|
if (datagram->working_counter != 1) {
|
||||||
if (!slave->error_flag) {
|
if (!slave->error_flag) {
|
||||||
slave->error_flag = 1;
|
slave->error_flag = 1;
|
||||||
EC_SLAVE_DBG(slave, 1, "Slave did not respond to state query.\n");
|
EC_SLAVE_DBG(slave, 1, "Slave did not respond to state query. "
|
||||||
|
"Re-scanning on next possibility...\n");
|
||||||
}
|
}
|
||||||
fsm->rescan_required = 1;
|
fsm->rescan_required = 1;
|
||||||
ec_fsm_master_restart(fsm);
|
ec_fsm_master_restart(fsm);
|
||||||
|
|
@ -1080,6 +1084,8 @@ void ec_fsm_master_enter_write_system_times(
|
||||||
|
|
||||||
// scanning and setting system times complete
|
// scanning and setting system times complete
|
||||||
ec_master_request_op(master);
|
ec_master_request_op(master);
|
||||||
|
EC_MASTER_DBG(master, 1, "After requesting OP, rescan_required is %u.\n",
|
||||||
|
fsm->rescan_required);
|
||||||
ec_fsm_master_restart(fsm);
|
ec_fsm_master_restart(fsm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -647,6 +647,8 @@ static ATTRIBUTES int ec_ioctl_master_rescan(
|
||||||
void *arg /**< ioctl() argument. */
|
void *arg /**< ioctl() argument. */
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
EC_MASTER_DBG(master, 1, "Got rescan command via ioctl()."
|
||||||
|
" Re-scanning on next possibility.\n");
|
||||||
master->fsm.rescan_required = 1;
|
master->fsm.rescan_required = 1;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue