Discard EoE traffic in CoE statemachine, if EoE is disabled.
This commit is contained in:
parent
3ccae1d47d
commit
c8c23aa448
|
|
@ -539,6 +539,16 @@ void ec_fsm_coe_dict_response(
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef EC_EOE
|
||||
if (mbox_prot == EC_MBOX_TYPE_EOE) {
|
||||
// discard EoE message and wait for the next reponse
|
||||
ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
|
||||
fsm->retries = EC_FSM_RETRIES;
|
||||
fsm->state = ec_fsm_coe_dict_check;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mbox_prot != EC_MBOX_TYPE_COE) {
|
||||
EC_SLAVE_ERR(slave, "Received mailbox protocol 0x%02X as response.\n",
|
||||
mbox_prot);
|
||||
|
|
@ -821,6 +831,16 @@ void ec_fsm_coe_dict_desc_response(
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef EC_EOE
|
||||
if (mbox_prot == EC_MBOX_TYPE_EOE) {
|
||||
// discard EoE message and wait for the next reponse
|
||||
ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
|
||||
fsm->retries = EC_FSM_RETRIES;
|
||||
fsm->state = ec_fsm_coe_dict_desc_check;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mbox_prot != EC_MBOX_TYPE_COE) {
|
||||
EC_SLAVE_ERR(slave, "Received mailbox protocol 0x%02X as response.\n",
|
||||
mbox_prot);
|
||||
|
|
@ -1057,6 +1077,16 @@ void ec_fsm_coe_dict_entry_response(
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef EC_EOE
|
||||
if (mbox_prot == EC_MBOX_TYPE_EOE) {
|
||||
// discard EoE message and wait for the next reponse
|
||||
ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
|
||||
fsm->retries = EC_FSM_RETRIES;
|
||||
fsm->state = ec_fsm_coe_dict_entry_check;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mbox_prot != EC_MBOX_TYPE_COE) {
|
||||
EC_SLAVE_ERR(slave, "Received mailbox protocol"
|
||||
" 0x%02X as response.\n", mbox_prot);
|
||||
|
|
@ -1574,6 +1604,16 @@ void ec_fsm_coe_down_response(
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef EC_EOE
|
||||
if (mbox_prot == EC_MBOX_TYPE_EOE) {
|
||||
// discard EoE message and wait for the next reponse
|
||||
ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
|
||||
fsm->retries = EC_FSM_RETRIES;
|
||||
fsm->state = ec_fsm_coe_down_check;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mbox_prot != EC_MBOX_TYPE_COE) {
|
||||
request->errno = EIO;
|
||||
fsm->state = ec_fsm_coe_error;
|
||||
|
|
@ -1752,6 +1792,16 @@ void ec_fsm_coe_down_seg_response(
|
|||
return;
|
||||
}
|
||||
|
||||
#ifndef EC_EOE
|
||||
if (mbox_prot == EC_MBOX_TYPE_EOE) {
|
||||
// discard EoE message and wait for the next reponse
|
||||
ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
|
||||
fsm->retries = EC_FSM_RETRIES;
|
||||
fsm->state = ec_fsm_coe_down_check;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mbox_prot != EC_MBOX_TYPE_COE) {
|
||||
request->errno = EIO;
|
||||
fsm->state = ec_fsm_coe_error;
|
||||
|
|
@ -2114,10 +2164,15 @@ void ec_fsm_coe_up_response(
|
|||
return;
|
||||
}
|
||||
|
||||
if (master->debug_level) {
|
||||
EC_SLAVE_DBG(slave, 1, "Upload response:\n");
|
||||
ec_print_data(data, rec_size);
|
||||
#ifndef EC_EOE
|
||||
if (mbox_prot == EC_MBOX_TYPE_EOE) {
|
||||
// discard EoE message and wait for the next reponse
|
||||
ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
|
||||
fsm->retries = EC_FSM_RETRIES;
|
||||
fsm->state = ec_fsm_coe_up_check;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mbox_prot != EC_MBOX_TYPE_COE) {
|
||||
request->errno = EIO;
|
||||
|
|
@ -2135,6 +2190,11 @@ void ec_fsm_coe_up_response(
|
|||
return;
|
||||
}
|
||||
|
||||
if (master->debug_level) {
|
||||
EC_SLAVE_DBG(slave, 1, "Upload response:\n");
|
||||
ec_print_data(data, rec_size);
|
||||
}
|
||||
|
||||
if (rec_size < 6) {
|
||||
request->errno = EIO;
|
||||
fsm->state = ec_fsm_coe_error;
|
||||
|
|
@ -2411,10 +2471,15 @@ void ec_fsm_coe_up_seg_response(
|
|||
return;
|
||||
}
|
||||
|
||||
if (master->debug_level) {
|
||||
EC_SLAVE_DBG(slave, 1, "Upload segment response:\n");
|
||||
ec_print_data(data, rec_size);
|
||||
#ifndef EC_EOE
|
||||
if (mbox_prot == EC_MBOX_TYPE_EOE) {
|
||||
// discard EoE message and wait for the next reponse
|
||||
ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
|
||||
fsm->retries = EC_FSM_RETRIES;
|
||||
fsm->state = ec_fsm_coe_up_seg_check;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (mbox_prot != EC_MBOX_TYPE_COE) {
|
||||
EC_SLAVE_ERR(slave, "Received mailbox protocol 0x%02X as response.\n",
|
||||
|
|
@ -2432,6 +2497,12 @@ void ec_fsm_coe_up_seg_response(
|
|||
return;
|
||||
}
|
||||
|
||||
if (master->debug_level) {
|
||||
EC_SLAVE_DBG(slave, 1, "Upload segment response:\n");
|
||||
ec_print_data(data, rec_size);
|
||||
}
|
||||
|
||||
|
||||
if (rec_size < 10) {
|
||||
EC_SLAVE_ERR(slave, "Received currupted SDO upload"
|
||||
" segment response!\n");
|
||||
|
|
|
|||
Loading…
Reference in New Issue