Files
RedBear-OS/drivers/net/e1000d
Red Bear OS 30819f87cf e1000d: TX/IRQ watchdog detects silent stalls
If neither the IRQ line nor the scheme surface has produced activity
for TX_WATCHDOG_SECS, log a warning. This is a much weaker contract
than the Linux NET_TX_TIMEOUT (which resets the device), but it does
three things the previous code did not:

1. Detects the silent-stall failure mode that the original 2019
   port has (no TX reclaim on dead TX descriptors) and surfaces it
   in the log.
2. Forces the next event-loop iteration to call scheme.tick()
   which exercises the transmit ring.
3. Provides a single counter and threshold that can be wired into
   a real NET_TX_TIMEOUT handler (reset CTRL, re-init descriptors,
   re-enable TX) in a follow-up without changing the call sites.

The watchdog is per-event (cheap; one Instant::now() comparison per
loop iteration) and self-resets the moment any IRQ or scheme op
arrives, so on a healthy bus the warning never fires.
2026-07-26 17:39:16 +09:00
..