master/fsm_foe.c
changeset 1921 d9cf40facbc4
parent 1901 2a1106b1d863
child 2045 ff2a13a4603c
child 2235 cd49c2c31dcb
equal deleted inserted replaced
1920:d28360ee74c5 1921:d9cf40facbc4
   286     printk("ec_fsm_foe_write_start()\n");
   286     printk("ec_fsm_foe_write_start()\n");
   287 #endif
   287 #endif
   288 
   288 
   289     if (!(slave->sii.mailbox_protocols & EC_MBOX_FOE)) {
   289     if (!(slave->sii.mailbox_protocols & EC_MBOX_FOE)) {
   290         ec_foe_set_tx_error(fsm, FOE_MBOX_PROT_ERROR);
   290         ec_foe_set_tx_error(fsm, FOE_MBOX_PROT_ERROR);
   291         EC_ERR("Slave %u does not support FoE!\n", slave->ring_position);
   291         EC_SLAVE_ERR(slave, "Slave does not support FoE!\n");
   292         return;
   292         return;
   293     }
   293     }
   294 
   294 
   295     if (ec_foe_prepare_wrq_send(fsm)) {
   295     if (ec_foe_prepare_wrq_send(fsm)) {
   296         ec_foe_set_tx_error(fsm, FOE_PROT_ERROR);
   296         ec_foe_set_tx_error(fsm, FOE_PROT_ERROR);
   315     printk("ec_fsm_foe_ack_check()\n");
   315     printk("ec_fsm_foe_ack_check()\n");
   316 #endif
   316 #endif
   317 
   317 
   318     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   318     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   319         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   319         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   320         EC_ERR("Failed to receive FoE mailbox check datagram for slave %u: ",
   320         EC_SLAVE_ERR(slave, "Failed to receive FoE mailbox check datagram: ");
   321                slave->ring_position);
       
   322         ec_datagram_print_state(datagram);
   321         ec_datagram_print_state(datagram);
   323         return;
   322         return;
   324     }
   323     }
   325 
   324 
   326     if (datagram->working_counter != 1) {
   325     if (datagram->working_counter != 1) {
   327         // slave did not put anything in the mailbox yet
   326         // slave did not put anything in the mailbox yet
   328         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   327         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   329         EC_ERR("Reception of FoE mailbox check datagram failed on slave %u: ",
   328         EC_SLAVE_ERR(slave, "Reception of FoE mailbox check datagram"
   330                slave->ring_position);
   329                 " failed: ");
   331         ec_datagram_print_wc_error(datagram);
   330         ec_datagram_print_wc_error(datagram);
   332         return;
   331         return;
   333     }
   332     }
   334 
   333 
   335     if (!ec_slave_mbox_check(datagram)) {
   334     if (!ec_slave_mbox_check(datagram)) {
   336         unsigned long diff_ms =
   335         unsigned long diff_ms =
   337             (datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
   336             (datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
   338         if (diff_ms >= EC_FSM_FOE_TIMEOUT) {
   337         if (diff_ms >= EC_FSM_FOE_TIMEOUT) {
   339             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   338             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   340             EC_ERR("Timeout while waiting for ack response "
   339             EC_SLAVE_ERR(slave, "Timeout while waiting for ack response.\n");
   341                     "on slave %u.\n", slave->ring_position);
       
   342             return;
   340             return;
   343         }
   341         }
   344 
   342 
   345         ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
   343         ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
   346         fsm->retries = EC_FSM_RETRIES;
   344         fsm->retries = EC_FSM_RETRIES;
   372     printk("ec_fsm_foe_ack_read()\n");
   370     printk("ec_fsm_foe_ack_read()\n");
   373 #endif
   371 #endif
   374 
   372 
   375     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   373     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   376         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   374         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   377         EC_ERR("Failed to receive FoE ack response datagram for"
   375         EC_SLAVE_ERR(slave, "Failed to receive FoE ack response datagram: ");
   378                " slave %u: ", slave->ring_position);
       
   379         ec_datagram_print_state(datagram);
   376         ec_datagram_print_state(datagram);
   380         return;
   377         return;
   381     }
   378     }
   382 
   379 
   383     if (datagram->working_counter != 1) {
   380     if (datagram->working_counter != 1) {
   384         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   381         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   385         EC_ERR("Reception of FoE ack response failed on slave %u: ",
   382         EC_SLAVE_ERR(slave, "Reception of FoE ack response failed: ");
   386                 slave->ring_position);
       
   387         ec_datagram_print_wc_error(datagram);
   383         ec_datagram_print_wc_error(datagram);
   388         return;
   384         return;
   389     }
   385     }
   390 
   386 
   391     if (!(data = ec_slave_mbox_fetch(fsm->slave, datagram,
   387     if (!(data = ec_slave_mbox_fetch(fsm->slave, datagram,
   394         return;
   390         return;
   395     }
   391     }
   396 
   392 
   397     if (mbox_prot != EC_MBOX_TYPE_FILEACCESS) { // FoE
   393     if (mbox_prot != EC_MBOX_TYPE_FILEACCESS) { // FoE
   398         ec_foe_set_tx_error(fsm, FOE_MBOX_PROT_ERROR);
   394         ec_foe_set_tx_error(fsm, FOE_MBOX_PROT_ERROR);
   399         EC_ERR("Received mailbox protocol 0x%02X as response.\n", mbox_prot);
   395         EC_SLAVE_ERR(slave, "Received mailbox protocol 0x%02X as response.\n",
       
   396                 mbox_prot);
   400         return;
   397         return;
   401     }
   398     }
   402 
   399 
   403     opCode = EC_READ_U8(data);
   400     opCode = EC_READ_U8(data);
   404 
   401 
   405     if (opCode == EC_FOE_OPCODE_BUSY) {
   402     if (opCode == EC_FOE_OPCODE_BUSY) {
   406         // slave not ready
   403         // slave not ready
   407         if (ec_foe_prepare_data_send(fsm)) {
   404         if (ec_foe_prepare_data_send(fsm)) {
   408             ec_foe_set_tx_error(fsm, FOE_PROT_ERROR);
   405             ec_foe_set_tx_error(fsm, FOE_PROT_ERROR);
   409             EC_ERR("Slave is busy.\n");
   406             EC_SLAVE_ERR(slave, "Slave is busy.\n");
   410             return;
   407             return;
   411         }
   408         }
   412         fsm->state = ec_fsm_foe_state_data_sent;
   409         fsm->state = ec_fsm_foe_state_data_sent;
   413         return;
   410         return;
   414     }
   411     }
   450     printk("ec_foe_state_sent_wrq()\n");
   447     printk("ec_foe_state_sent_wrq()\n");
   451 #endif
   448 #endif
   452 
   449 
   453     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   450     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   454         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   451         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   455         EC_ERR("Failed to send FoE WRQ for slave %u: ",
   452         EC_SLAVE_ERR(slave, "Failed to send FoE WRQ: ");
   456                 slave->ring_position);
       
   457         ec_datagram_print_state(datagram);
   453         ec_datagram_print_state(datagram);
   458         return;
   454         return;
   459     }
   455     }
   460 
   456 
   461     if (datagram->working_counter != 1) {
   457     if (datagram->working_counter != 1) {
   462         // slave did not put anything in the mailbox yet
   458         // slave did not put anything in the mailbox yet
   463         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   459         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   464         EC_ERR("Reception of FoE WRQ failed on slave %u: ",
   460         EC_SLAVE_ERR(slave, "Reception of FoE WRQ failed: ");
   465                 slave->ring_position);
       
   466         ec_datagram_print_wc_error(datagram);
   461         ec_datagram_print_wc_error(datagram);
   467         return;
   462         return;
   468     }
   463     }
   469 
   464 
   470     fsm->jiffies_start = datagram->jiffies_sent;
   465     fsm->jiffies_start = datagram->jiffies_sent;
   493     printk("ec_fsm_foe_state_data_sent()\n");
   488     printk("ec_fsm_foe_state_data_sent()\n");
   494 #endif
   489 #endif
   495 
   490 
   496     if (fsm->datagram->state != EC_DATAGRAM_RECEIVED) {
   491     if (fsm->datagram->state != EC_DATAGRAM_RECEIVED) {
   497         ec_foe_set_tx_error(fsm, FOE_RECEIVE_ERROR);
   492         ec_foe_set_tx_error(fsm, FOE_RECEIVE_ERROR);
   498         EC_ERR("Failed to receive FoE ack response datagram for"
   493         EC_SLAVE_ERR(slave, "Failed to receive FoE ack response datagram: ");
   499                " slave %u: ", slave->ring_position);
       
   500         ec_datagram_print_state(datagram);
   494         ec_datagram_print_state(datagram);
   501         return;
   495         return;
   502     }
   496     }
   503 
   497 
   504     if (fsm->datagram->working_counter != 1) {
   498     if (fsm->datagram->working_counter != 1) {
   505         ec_foe_set_tx_error(fsm, FOE_WC_ERROR);
   499         ec_foe_set_tx_error(fsm, FOE_WC_ERROR);
   506         EC_ERR("Reception of FoE data send failed on slave %u: ",
   500         EC_SLAVE_ERR(slave, "Reception of FoE data send failed: ");
   507                 slave->ring_position);
       
   508         ec_datagram_print_wc_error(datagram);
   501         ec_datagram_print_wc_error(datagram);
   509         return;
   502         return;
   510     }
   503     }
   511 
   504 
   512     ec_slave_mbox_prepare_check(fsm->slave, fsm->datagram);
   505     ec_slave_mbox_prepare_check(fsm->slave, fsm->datagram);
   534     EC_WRITE_U16(data, EC_FOE_OPCODE_RRQ); // fsm read request
   527     EC_WRITE_U16(data, EC_FOE_OPCODE_RRQ); // fsm read request
   535     EC_WRITE_U32(data + 2, 0x00000000); // no passwd
   528     EC_WRITE_U32(data + 2, 0x00000000); // no passwd
   536     memcpy(data + EC_FOE_HEADER_SIZE, fsm->rx_filename, current_size);
   529     memcpy(data + EC_FOE_HEADER_SIZE, fsm->rx_filename, current_size);
   537 
   530 
   538     if (fsm->slave->master->debug_level) {
   531     if (fsm->slave->master->debug_level) {
   539         EC_DBG("FoE Read Request:\n");
   532         EC_SLAVE_DBG(fsm->slave, 1, "FoE Read Request:\n");
   540         ec_print_data(data, current_size + EC_FOE_HEADER_SIZE);
   533         ec_print_data(data, current_size + EC_FOE_HEADER_SIZE);
   541     }
   534     }
   542 
   535 
   543     return 0;
   536     return 0;
   544 }
   537 }
   582     printk("ec_foe_state_rrq_sent()\n");
   575     printk("ec_foe_state_rrq_sent()\n");
   583 #endif
   576 #endif
   584 
   577 
   585     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   578     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   586         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   579         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   587         EC_ERR("Failed to send FoE RRQ for slave %u" ": ",
   580         EC_SLAVE_ERR(slave, "Failed to send FoE RRQ: ");
   588                 slave->ring_position);
       
   589         ec_datagram_print_state(datagram);
   581         ec_datagram_print_state(datagram);
   590         return;
   582         return;
   591     }
   583     }
   592 
   584 
   593     if (datagram->working_counter != 1) {
   585     if (datagram->working_counter != 1) {
   594         // slave did not put anything in the mailbox yet
   586         // slave did not put anything in the mailbox yet
   595         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   587         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   596         EC_ERR("Reception of FoE RRQ failed on slave %u: ",
   588         EC_SLAVE_ERR(slave, "Reception of FoE RRQ failed: ");
   597                 slave->ring_position);
       
   598         ec_datagram_print_wc_error(datagram);
   589         ec_datagram_print_wc_error(datagram);
   599         return;
   590         return;
   600     }
   591     }
   601 
   592 
   602     fsm->jiffies_start = datagram->jiffies_sent;
   593     fsm->jiffies_start = datagram->jiffies_sent;
   644     printk("ec_fsm_foe_read_start()\n");
   635     printk("ec_fsm_foe_read_start()\n");
   645 #endif
   636 #endif
   646 
   637 
   647     if (!(slave->sii.mailbox_protocols & EC_MBOX_FOE)) {
   638     if (!(slave->sii.mailbox_protocols & EC_MBOX_FOE)) {
   648         ec_foe_set_tx_error(fsm, FOE_MBOX_PROT_ERROR);
   639         ec_foe_set_tx_error(fsm, FOE_MBOX_PROT_ERROR);
   649         EC_ERR("Slave %u does not support FoE!\n", slave->ring_position);
   640         EC_SLAVE_ERR(slave, "Slave does not support FoE!\n");
   650         return;
   641         return;
   651     }
   642     }
   652 
   643 
   653     if (ec_foe_prepare_rrq_send(fsm)) {
   644     if (ec_foe_prepare_rrq_send(fsm)) {
   654         ec_foe_set_rx_error(fsm, FOE_PROT_ERROR);
   645         ec_foe_set_rx_error(fsm, FOE_PROT_ERROR);
   673     printk("ec_fsm_foe_state_data_check()\n");
   664     printk("ec_fsm_foe_state_data_check()\n");
   674 #endif
   665 #endif
   675 
   666 
   676     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   667     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   677         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   668         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   678         EC_ERR("Failed to send FoE DATA READ for slave %u: ",
   669         EC_SLAVE_ERR(slave, "Failed to send FoE DATA READ: ");
   679                 slave->ring_position);
       
   680         ec_datagram_print_state(datagram);
   670         ec_datagram_print_state(datagram);
   681         return;
   671         return;
   682     }
   672     }
   683 
   673 
   684     if (datagram->working_counter != 1) {
   674     if (datagram->working_counter != 1) {
   685         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   675         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   686         EC_ERR("Reception of FoE DATA READ on slave %u: ",
   676         EC_SLAVE_ERR(slave, "Reception of FoE DATA READ: ");
   687                 slave->ring_position);
       
   688         ec_datagram_print_wc_error(datagram);
   677         ec_datagram_print_wc_error(datagram);
   689         return;
   678         return;
   690     }
   679     }
   691 
   680 
   692     if (!ec_slave_mbox_check(datagram)) {
   681     if (!ec_slave_mbox_check(datagram)) {
   693         unsigned long diff_ms =
   682         unsigned long diff_ms =
   694             (datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
   683             (datagram->jiffies_received - fsm->jiffies_start) * 1000 / HZ;
   695         if (diff_ms >= EC_FSM_FOE_TIMEOUT) {
   684         if (diff_ms >= EC_FSM_FOE_TIMEOUT) {
   696             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   685             ec_foe_set_tx_error(fsm, FOE_TIMEOUT_ERROR);
   697             EC_ERR("Timeout while waiting for ack response "
   686             EC_SLAVE_ERR(slave, "Timeout while waiting for ack response.\n");
   698                     "on slave %u.\n", slave->ring_position);
       
   699             return;
   687             return;
   700         }
   688         }
   701 
   689 
   702         ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
   690         ec_slave_mbox_prepare_check(slave, datagram); // can not fail.
   703         fsm->retries = EC_FSM_RETRIES;
   691         fsm->retries = EC_FSM_RETRIES;
   730     printk("ec_fsm_foe_state_data_read()\n");
   718     printk("ec_fsm_foe_state_data_read()\n");
   731 #endif
   719 #endif
   732 
   720 
   733     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   721     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   734         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   722         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   735         EC_ERR("Failed to receive FoE DATA READ datagram for"
   723         EC_SLAVE_ERR(slave, "Failed to receive FoE DATA READ datagram: ");
   736                " slave %u: ", slave->ring_position);
       
   737         ec_datagram_print_state(datagram);
   724         ec_datagram_print_state(datagram);
   738         return;
   725         return;
   739     }
   726     }
   740 
   727 
   741     if (datagram->working_counter != 1) {
   728     if (datagram->working_counter != 1) {
   742         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   729         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   743         EC_ERR("Reception of FoE DATA READ failed on slave %u: ",
   730         EC_SLAVE_ERR(slave, "Reception of FoE DATA READ failed: ");
   744                 slave->ring_position);
       
   745         ec_datagram_print_wc_error(datagram);
   731         ec_datagram_print_wc_error(datagram);
   746         return;
   732         return;
   747     }
   733     }
   748 
   734 
   749     if (!(data = ec_slave_mbox_fetch(slave, datagram, &mbox_prot, &rec_size))) {
   735     if (!(data = ec_slave_mbox_fetch(slave, datagram, &mbox_prot, &rec_size))) {
   750         ec_foe_set_rx_error(fsm, FOE_MBOX_FETCH_ERROR);
   736         ec_foe_set_rx_error(fsm, FOE_MBOX_FETCH_ERROR);
   751         return;
   737         return;
   752     }
   738     }
   753 
   739 
   754     if (mbox_prot != EC_MBOX_TYPE_FILEACCESS) { // FoE
   740     if (mbox_prot != EC_MBOX_TYPE_FILEACCESS) { // FoE
   755         EC_ERR("Received mailbox protocol 0x%02X as response.\n", mbox_prot);
   741         EC_SLAVE_ERR(slave, "Received mailbox protocol 0x%02X as response.\n",
       
   742                 mbox_prot);
   756         ec_foe_set_rx_error(fsm, FOE_PROT_ERROR);
   743         ec_foe_set_rx_error(fsm, FOE_PROT_ERROR);
   757         return;
   744         return;
   758     }
   745     }
   759 
   746 
   760     opCode = EC_READ_U8(data);
   747     opCode = EC_READ_U8(data);
   766         return;
   753         return;
   767     }
   754     }
   768 
   755 
   769     if (opCode == EC_FOE_OPCODE_ERR) {
   756     if (opCode == EC_FOE_OPCODE_ERR) {
   770         fsm->request->error_code = EC_READ_U32(data + 2);
   757         fsm->request->error_code = EC_READ_U32(data + 2);
   771         EC_ERR("Received FoE Error Request (code 0x%08x) on slave %u.\n",
   758         EC_SLAVE_ERR(slave, "Received FoE Error Request (code 0x%08x).\n",
   772                 fsm->request->error_code, slave->ring_position);
   759                 fsm->request->error_code);
   773         if (rec_size > 6) {
   760         if (rec_size > 6) {
   774             uint8_t text[1024];
   761             uint8_t text[1024];
   775             strncpy(text, data + 6, min(rec_size - 6, sizeof(text)));
   762             strncpy(text, data + 6, min(rec_size - 6, sizeof(text)));
   776             EC_ERR("FoE Error Text: %s\n", text);
   763             EC_SLAVE_ERR(slave, "FoE Error Text: %s\n", text);
   777         }
   764         }
   778         ec_foe_set_rx_error(fsm, FOE_OPCODE_ERROR);
   765         ec_foe_set_rx_error(fsm, FOE_OPCODE_ERROR);
   779         return;
   766         return;
   780     }
   767     }
   781 
   768 
   782     if (opCode != EC_FOE_OPCODE_DATA) {
   769     if (opCode != EC_FOE_OPCODE_DATA) {
   783         EC_ERR("Received OPCODE %x, expected %x on slave %u.\n",
   770         EC_SLAVE_ERR(slave, "Received OPCODE %x, expected %x.\n",
   784                 opCode, EC_FOE_OPCODE_DATA, slave->ring_position);
   771                 opCode, EC_FOE_OPCODE_DATA);
   785         fsm->request->error_code = 0x00000000;
   772         fsm->request->error_code = 0x00000000;
   786         ec_foe_set_rx_error(fsm, FOE_OPCODE_ERROR);
   773         ec_foe_set_rx_error(fsm, FOE_OPCODE_ERROR);
   787         return;
   774         return;
   788     }
   775     }
   789 
   776 
   790     packet_no = EC_READ_U16(data + 2);
   777     packet_no = EC_READ_U16(data + 2);
   791     if (packet_no != fsm->rx_expected_packet_no) {
   778     if (packet_no != fsm->rx_expected_packet_no) {
   792         EC_ERR("Received unexpected packet number on slave %u.\n",
   779         EC_SLAVE_ERR(slave, "Received unexpected packet number.\n");
   793                 slave->ring_position);
       
   794         ec_foe_set_rx_error(fsm, FOE_PACKETNO_ERROR);
   780         ec_foe_set_rx_error(fsm, FOE_PACKETNO_ERROR);
   795         return;
   781         return;
   796     }
   782     }
   797 
   783 
   798     rec_size -= EC_FOE_HEADER_SIZE;
   784     rec_size -= EC_FOE_HEADER_SIZE;
   852     printk("ec_foe_state_sent_ack()\n");
   838     printk("ec_foe_state_sent_ack()\n");
   853 #endif
   839 #endif
   854 
   840 
   855     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   841     if (datagram->state != EC_DATAGRAM_RECEIVED) {
   856         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   842         ec_foe_set_rx_error(fsm, FOE_RECEIVE_ERROR);
   857         EC_ERR("Failed to send FoE ACK for slave %u: ",
   843         EC_SLAVE_ERR(slave, "Failed to send FoE ACK: ");
   858                 slave->ring_position);
       
   859         ec_datagram_print_state(datagram);
   844         ec_datagram_print_state(datagram);
   860         return;
   845         return;
   861     }
   846     }
   862 
   847 
   863     if (datagram->working_counter != 1) {
   848     if (datagram->working_counter != 1) {
   864         // slave did not put anything into the mailbox yet
   849         // slave did not put anything into the mailbox yet
   865         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   850         ec_foe_set_rx_error(fsm, FOE_WC_ERROR);
   866         EC_ERR("Reception of FoE ACK failed on slave %u: ",
   851         EC_SLAVE_ERR(slave, "Reception of FoE ACK failed: ");
   867                 slave->ring_position);
       
   868         ec_datagram_print_wc_error(datagram);
   852         ec_datagram_print_wc_error(datagram);
   869         return;
   853         return;
   870     }
   854     }
   871 
   855 
   872     fsm->jiffies_start = datagram->jiffies_sent;
   856     fsm->jiffies_start = datagram->jiffies_sent;