{\r
xNetworkBufferDescriptor_t *pxNetworkBuffer;\r
xIPStackEvent_t xRxEvent = { eEthernetRxEvent, NULL };\r
+static const portTickType xBufferWaitDelay = 500UL / portTICK_RATE_MS;\r
\r
( void ) pvParameters;\r
configASSERT( xGMACRxEventSemaphore );\r
\r
/* The buffer filled by the DMA is going to be passed into the IP\r
stack. Allocate another buffer for the DMA descriptor. */\r
- pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, portMAX_DELAY );\r
+ pxNetworkBuffer = pxNetworkBufferGet( ipTOTAL_ETHERNET_FRAME_SIZE, xBufferWaitDelay );\r
\r
if( pxNetworkBuffer != NULL )\r
{\r
}\r
else\r
{\r
+ vNetworkBufferRelease( pxNetworkBuffer );\r
iptraceETHERNET_RX_EVENT_LOST();\r
}\r
}\r
+ else\r
+ {\r
+ /* Left a frame in the driver as a buffer was not available. */\r
+ gmac_dev_reset( &xGMACStruct );\r
+ }\r
}\r
}\r
/*-----------------------------------------------------------*/\r