nic: do not claim a cause for the bounded TX wait

The comment said the ASIC never completes a TX when the egress port is in a
non-forwarding MSTP state. The guard is worth keeping either way, since an
unbounded spin in the DMA wait takes the whole main loop down, but the
mechanism is more than the evidence supports and the DMA into the TX ring
has no business knowing the egress port at all.
This commit is contained in:
d00f
2026-08-18 23:32:33 +02:00
parent ec069a5bcc
commit 803d9c1242
+3 -6
View File
@@ -702,12 +702,9 @@ void nic_tx_packet(uint16_t ring_ptr)
len += 0xf;
len >>= 3;
SFR_NIC_CTRL = len;
/* Bounded wait: normally the NIC consumes the frame in microseconds, but
* when the egress port is held in an MSTP non-forwarding state the ASIC
* has been observed to never complete the TX - an unbounded spin here
* then freezes the entire main loop (no STP/LACP timers, no HTTP, no
* ARP) until a power cycle. Give up after ~65k polls and drop the frame:
* losing one packet is recoverable, a frozen switch is not. */
/* Bounded wait: the NIC normally consumes the frame in microseconds, and
* an unbounded spin here would freeze the main loop for good if it ever
* did not. Dropping one frame is recoverable, a frozen switch is not. */
{
uint16_t tx_guard = 0;
do { } while (SFR_NIC_CTRL != 0 && ++tx_guard != 0);