mirror of
https://github.com/apache/nuttx.git
synced 2026-10-03 12:18:06 +00:00
openeth_receive() (arch/xtensa/src/common/espressif/esp_openeth.c) tracks the next expected RX descriptor in priv->cur_rx_desc, an int initialized to 0 exactly once, in esp_openeth_initialize(). QEMU's esp32s3 machine models the OpenCores MAC's DMA ring pointer as resetting to descriptor 0 every time RXEN is toggled off and back on (openeth_disable()/openeth_enable(), called from ifdown()/ifup()), but nothing rewinds the driver's own index to match. On the very first bring-up both start at 0, so nothing looks wrong; from the second ifup() onward the two permanently disagree, openeth_receive() keeps inspecting the wrong descriptor, finds it still marked "owned by HW" (e=1), and silently drops the notification. This breaks all inbound traffic on the interface, not just application sockets -- ARP replies and ICMP echo replies are RX frames too, so ping breaks identically. Re-run the same descriptor initialization esp_openeth_initialize() does at boot -- re-arm every RX/TX descriptor, rewind cur_rx_desc/cur_tx_desc to 0 -- inside openeth_ifup(), under the same critical section that already toggles RXEN. Board-independent code, and open_eth only exists as a QEMU peripheral, so there is no real-hardware regression risk. Assisted-by: Claude:claude-sonnet-5 Signed-off-by: Felipe Moura <moura.fmo@gmail.com> |
||
|---|---|---|
| .. | ||
| include | ||
| src | ||
| CMakeLists.txt | ||
| Kconfig | ||