From 571861c6ea1418d5a121a6ea0e5fd9ab71b0380c Mon Sep 17 00:00:00 2001 From: Mariano Alvira Date: Mon, 8 Mar 2010 12:29:49 -0500 Subject: [PATCH] post_receive still needs to timeout if it can't find any free bufferes. --- lib/maca.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/maca.c b/lib/maca.c index a885c9769..844839dbe 100644 --- a/lib/maca.c +++ b/lib/maca.c @@ -122,6 +122,11 @@ void post_receive(void) { dma_rx = get_free_packet(); if (dma_rx == 0) { printf("trying to fill MACA_DMARX but out of packet buffers\n\r"); + /* set the sftclock so that we return to the maca_isr */ + *MACA_SFTCLK = *MACA_CLK + RECV_SOFTIMEOUT; /* soft timeout */ + *MACA_TMREN = (1 << maca_tmren_sft); + /* no free buffers, so don't start a reception */ + enable_irq(MACA); return; } }