Unrelated to the actual problem, I would like to add that
if( pxClientSocket != NULL )
{
FreeRTOS_printf( ( "prvAcceptWaitClient: client %p parent %p\n",
( void * ) pxClientSocket, ( void * ) pxParentSocket ) );
}
is generally a very slow operation and should probably not be used lightly in a semi-critical section like prvAcceptWaitClient
creates, through disabling the scheduler. I mean everything else between vTaskSuspendAll();
and ( void ) xTaskResumeAll();
is just a handful of assembly lines.
Deleting the print is clearing up this race condition between a GMAC interrupt and the re-enabling of the scheduler but I am still a bit bewildered as how it can come to pass in the first place.