equal
deleted
inserted
replaced
356 slave's mailbox for a new EoE datagram. |
356 slave's mailbox for a new EoE datagram. |
357 */ |
357 */ |
358 |
358 |
359 void ec_eoe_state_rx_start(ec_eoe_t *eoe /**< EoE handler */) |
359 void ec_eoe_state_rx_start(ec_eoe_t *eoe /**< EoE handler */) |
360 { |
360 { |
361 if (eoe->slave->online_state == EC_SLAVE_OFFLINE || |
361 if (eoe->slave->error_flag || !eoe->slave->master->main_device.link_state) |
362 !eoe->slave->master->main_device.link_state) |
|
363 return; |
362 return; |
364 |
363 |
365 ec_slave_mbox_prepare_check(eoe->slave, &eoe->datagram); |
364 ec_slave_mbox_prepare_check(eoe->slave, &eoe->datagram); |
366 eoe->queue_datagram = 1; |
365 eoe->queue_datagram = 1; |
367 eoe->state = ec_eoe_state_rx_check; |
366 eoe->state = ec_eoe_state_rx_check; |
557 { |
556 { |
558 #if EOE_DEBUG_LEVEL > 0 |
557 #if EOE_DEBUG_LEVEL > 0 |
559 unsigned int wakeup = 0; |
558 unsigned int wakeup = 0; |
560 #endif |
559 #endif |
561 |
560 |
562 if (eoe->slave->online_state == EC_SLAVE_OFFLINE || |
561 if (eoe->slave->error_flag || !eoe->slave->master->main_device.link_state) |
563 !eoe->slave->master->main_device.link_state) |
|
564 return; |
562 return; |
565 |
563 |
566 spin_lock_bh(&eoe->tx_queue_lock); |
564 spin_lock_bh(&eoe->tx_queue_lock); |
567 |
565 |
568 if (!eoe->tx_queued_frames || list_empty(&eoe->tx_queue)) { |
566 if (!eoe->tx_queued_frames || list_empty(&eoe->tx_queue)) { |