bsp/mpc55xx: Move work from ISR to task context

This commit is contained in:
Christian Mauderer
2012-08-09 15:47:08 +02:00
committed by Sebastian Huber
parent d9af2ed4dd
commit 6f89813f42

View File

@@ -583,8 +583,6 @@ static void smsc9218i_receive_dma_done(
ASSERT_SC(sc); ASSERT_SC(sc);
jc->done = jc->produce; jc->done = jc->produce;
smsc9218i_setup_receive_dma(e, regs, jc);
} }
static void smsc9218i_transmit_dma_done( static void smsc9218i_transmit_dma_done(
@@ -655,11 +653,11 @@ static void smsc9218i_interrupt_handler(void *arg)
/* Check receive interrupts */ /* Check receive interrupts */
if ((int_sts & SMSC9218I_INT_RSFL) != 0) { if ((int_sts & SMSC9218I_INT_RSFL) != 0) {
smsc9218i_receive_job_control *jc = &smsc_rx_jc;
int_en &= ~SMSC9218I_INT_RSFL; int_en &= ~SMSC9218I_INT_RSFL;
++e->receive_interrupts; ++e->receive_interrupts;
smsc9218i_setup_receive_dma(e, regs, jc);
sc = rtems_event_send(e->receive_task, SMSC9218I_EVENT_RX);
ASSERT_SC(sc);
} }
/* Check PHY interrupts */ /* Check PHY interrupts */
@@ -878,13 +876,17 @@ static void smsc9218i_receive_task(void *arg)
rtems_event_set events; rtems_event_set events;
sc = rtems_bsdnet_event_receive( sc = rtems_bsdnet_event_receive(
SMSC9218I_EVENT_DMA | SMSC9218I_EVENT_PHY, SMSC9218I_EVENT_DMA | SMSC9218I_EVENT_PHY | SMSC9218I_EVENT_RX,
RTEMS_EVENT_ANY | RTEMS_WAIT, RTEMS_EVENT_ANY | RTEMS_WAIT,
RTEMS_NO_TIMEOUT, RTEMS_NO_TIMEOUT,
&events &events
); );
ASSERT_SC(sc); ASSERT_SC(sc);
if ((events & (SMSC9218I_EVENT_RX | SMSC9218I_EVENT_DMA)) != 0) {
smsc9218i_setup_receive_dma(e, regs, jc);
}
if ((events & SMSC9218I_EVENT_DMA) != 0) { if ((events & SMSC9218I_EVENT_DMA) != 0) {
smsc9218i_ether_input(e, regs, jc); smsc9218i_ether_input(e, regs, jc);
} }