I am developing a product using an MK64FN1M0VLL12 microcontroller and a two-port managed ethernet switch, SMSC's LAN9303i. I have encountered a problem in which the ethernet driver seems to lock up after a flood of packets (ICMP/ping, in this case). The symptom is that the transmit buffer ring appears to fill up, but gets in a state where it never gets cleaned up. Subsequent calls to ENET_DRV_SendData fail due to the buffer being full. I do not observe the Tx interrupt ever being triggered in this state (thus, ENET_DRV_CleanupTxBuffDescrip() is never called, which 'frees' up buffer descriptors).
The only options I can think of are:
- Apply some band-aid by manually cleaning up the buffer descriptor ring (when? how?)
- Increase the transmit buffer ring size. This also seems like a band-aid that doesn't address the root problem.
- Reset the whole driver when this state occurs (last resort)