equal
deleted
inserted
replaced
315 slave's mailbox for a new EoE datagram. |
315 slave's mailbox for a new EoE datagram. |
316 */ |
316 */ |
317 |
317 |
318 void ec_eoe_state_rx_start(ec_eoe_t *eoe /**< EoE handler */) |
318 void ec_eoe_state_rx_start(ec_eoe_t *eoe /**< EoE handler */) |
319 { |
319 { |
320 if (!eoe->slave->online || !eoe->slave->master->main_device.link_state) |
320 if (eoe->slave->online_state == EC_SLAVE_OFFLINE || |
|
321 !eoe->slave->master->main_device.link_state) |
321 return; |
322 return; |
322 |
323 |
323 ec_slave_mbox_prepare_check(eoe->slave, &eoe->datagram); |
324 ec_slave_mbox_prepare_check(eoe->slave, &eoe->datagram); |
324 ec_master_queue_datagram(eoe->slave->master, &eoe->datagram); |
325 ec_master_queue_datagram(eoe->slave->master, &eoe->datagram); |
325 eoe->state = ec_eoe_state_rx_check; |
326 eoe->state = ec_eoe_state_rx_check; |
516 { |
517 { |
517 #if EOE_DEBUG_LEVEL > 0 |
518 #if EOE_DEBUG_LEVEL > 0 |
518 unsigned int wakeup = 0; |
519 unsigned int wakeup = 0; |
519 #endif |
520 #endif |
520 |
521 |
521 if (!eoe->slave->online || !eoe->slave->master->main_device.link_state) |
522 if (eoe->slave->online_state == EC_SLAVE_OFFLINE || |
|
523 !eoe->slave->master->main_device.link_state) |
522 return; |
524 return; |
523 |
525 |
524 spin_lock_bh(&eoe->tx_queue_lock); |
526 spin_lock_bh(&eoe->tx_queue_lock); |
525 |
527 |
526 if (!eoe->tx_queued_frames || list_empty(&eoe->tx_queue)) { |
528 if (!eoe->tx_queued_frames || list_empty(&eoe->tx_queue)) { |