From f82bf4368efe7aec7483753270e29c1c2e531d19 Mon Sep 17 00:00:00 2001 From: Anirudha Sarangi Date: Mon, 9 Feb 2015 18:35:57 +0530 Subject: [PATCH] lwip: Made changes in emacps adapter to release the semaphore once per ISR This patch makes changes in the emacps adapter file to ensure that the semaphore released is once per ISR. This means, once the ISR is invoked for Rx path, all the available packets in the BDs will be enqueued before the semaphore is released. Signed-off-by: Anirudha Sarangi --- .../lwip141/src/contrib/ports/xilinx/netif/xemacpsif_dma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ThirdParty/sw_services/lwip141/src/contrib/ports/xilinx/netif/xemacpsif_dma.c b/ThirdParty/sw_services/lwip141/src/contrib/ports/xilinx/netif/xemacpsif_dma.c index e4a538a6..e4bd9215 100755 --- a/ThirdParty/sw_services/lwip141/src/contrib/ports/xilinx/netif/xemacpsif_dma.c +++ b/ThirdParty/sw_services/lwip141/src/contrib/ports/xilinx/netif/xemacpsif_dma.c @@ -414,16 +414,15 @@ void emacps_recv_handler(void *arg) lwip_stats.link.drop++; #endif pbuf_free(p); - } else { -#if !NO_SYS - sys_sem_signal(&xemac->sem_rx_data_available); -#endif } curbdptr = XEmacPs_BdRingNext( rxring, curbdptr); } /* free up the BD's */ XEmacPs_BdRingFree(rxring, bd_processed, rxbdset); setup_rx_bds(xemacpsif, rxring); +#if !NO_SYS + sys_sem_signal(&xemac->sem_rx_data_available); +#endif } #ifdef OS_IS_FREERTOS