master/fsm_foe.c
changeset 2607 b59d6aecdbaa
parent 2606 764801a0f2aa
child 2608 ec0b5d9a2ff1
equal deleted inserted replaced
2606:764801a0f2aa 2607:b59d6aecdbaa
   372         return;
   372         return;
   373     }
   373     }
   374 
   374 
   375     if (!ec_slave_mbox_check(fsm->datagram)) {
   375     if (!ec_slave_mbox_check(fsm->datagram)) {
   376         // slave did not put anything in the mailbox yet
   376         // slave did not put anything in the mailbox yet
   377         if (time_after(datagram->jiffies_received,
   377         if (time_after(fsm->datagram->jiffies_received,
   378                     fsm->jiffies_start + EC_FSM_FOE_TIMEOUT_JIFFIES)) {
   378                     fsm->jiffies_start + EC_FSM_FOE_TIMEOUT_JIFFIES)) {
   379             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   379             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   380             EC_SLAVE_ERR(slave, "Timeout while waiting for ack response.\n");
   380             EC_SLAVE_ERR(slave, "Timeout while waiting for ack response.\n");
   381             return;
   381             return;
   382         }
   382         }
   734         ec_datagram_print_wc_error(fsm->datagram);
   734         ec_datagram_print_wc_error(fsm->datagram);
   735         return;
   735         return;
   736     }
   736     }
   737 
   737 
   738     if (!ec_slave_mbox_check(fsm->datagram)) {
   738     if (!ec_slave_mbox_check(fsm->datagram)) {
   739         if (time_after(datagram->jiffies_received,
   739         if (time_after(fsm->datagram->jiffies_received,
   740                     fsm->jiffies_start + EC_FSM_FOE_TIMEOUT_JIFFIES)) {
   740                     fsm->jiffies_start + EC_FSM_FOE_TIMEOUT_JIFFIES)) {
   741             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   741             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   742             EC_SLAVE_ERR(slave, "Timeout while waiting for ack response.\n");
   742             EC_SLAVE_ERR(slave, "Timeout while waiting for ack response.\n");
   743             return;
   743             return;
   744         }
   744         }