arnavsharma990 commented on issue #21112:
URL: https://github.com/apache/nuttx/issues/21112#issuecomment-6520699452

   I have traced through the receive path myself, and agree that this is an 
issue. The RX length from hardware is passed into lan9250_recv_buffer() without 
proper runtime checks. SPI has no check (only DEBUGASSERT), and QSPI/SQI has no 
check.
   
   I would recommend checking the length (including the CRC) in 
lan9250_rxdone_isr(). In lan9250_recv_buffer(), I would leave in the safety 
check.
   
   The RX_DP_CTRL.RX_FFWD bit seems like a good option for recovery of the 
FIFO. This is used by Microchip in their reference implementation, and by 
CycloneTCP to drop packets. How exactly it works and how it handles short 
packets needs to be confirmed.
   
   No board is required to do this at source level, however I would recommend 
doing some hardware testing to confirm the FIFO is being recovered, and packets 
are received. Overall this is a genuine issue to fix.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to