rx: keep draining while the NIC buffer holds data

The main loop drains the NIC only after an RX interrupt, at most
RX_BUDGET frames, then clears the status and waits for the next one.
When frames are left and the buffer reaches the RX stop threshold, the
NIC takes no more frames and raises no further interrupt, so reception
stops for good.

Check the buffer after clearing the status and keep draining while it
holds data; the interrupt is re-enabled only once it is empty.
This commit is contained in:
DrDoof authored and d00f committed 2026-09-24 15:44:10 +02:00
1 parent e406a3e82b
commit db9ce7543e
1 file changed
+5 -1
+5 -1
View File
@@ -1300,7 +1300,11 @@ void idle(void)
rx_irq = 0;
handle_rx();
REG_SET(RTL837X_NIC_INT_STS, NIC_INT_RXIS);
EX1 = 1;
reg_read(RTL837X_REG_NIC_RX_BUFF_DATA);
if (SFR_DATA_U16)
rx_irq = 1;
else
EX1 = 1;
}
health_phase(HEALTH_PH_RX);
if (cmd_available) {