matilda

liblan9218 - bug

Discussion created by matilda on Feb 27, 2012
Latest reply on Mar 1, 2012 by SrinivasG

hi,

 

we found bug In C:\Program Files\Analog Devices\VisualDSP 5.0\Blackfin\lib\src\drivers\ethernet\lan9218\lan9218.c

When the driver gets some tcp packets _together_ (one after the other immediately), it handles only the first message and loses the others.

the bug is in the function LAN9218_InterruptHandler:

the old code

 

while (GetRegDW(g_pLAN911x, RX_FIFO_INF) & 0x00FF0000) 

{

LAN9218_rcv(dev);

}

new code: use if instead of while

now all the packets are handled correctly and received by the application.

 

 

 

Outcomes