]> git.ipfire.org Git - thirdparty/ipxe.git/commit
[undi] Ensure forward progress is made even if UNDI IRQ is stuck
authorMichael Brown <mcb30@ipxe.org>
Wed, 26 Mar 2025 13:58:22 +0000 (13:58 +0000)
committerMichael Brown <mcb30@ipxe.org>
Wed, 26 Mar 2025 14:56:20 +0000 (14:56 +0000)
commit0b606221cb0c5c62502709f9918b06b8790d61c3
tree1563ab319f850038c8b89b538e8352a2be901b75
parent4134280bcd93be43143f11ee41fcdadad90c5672
[undi] Ensure forward progress is made even if UNDI IRQ is stuck

If the UNDI interrupt remains constantly asserted (e.g. because the
BIOS has enabled interrupts for an unrelated device sharing the same
IRQ, or because of bugs in the OEM UNDI driver), then we may get stuck
in an interrupt storm.

We cannot safely chain to the previous interrupt handler (which could
plausibly handle an unrelated device interrupt) since there is no
well-defined behaviour for previous interrupt handlers.  We have
observed BIOSes to provide default interrupt handlers that variously
do nothing, send EOI, disable the IRQ, or crash the system.

Fix by disabling the UNDI interrupt whenever our handler is triggered,
and rearm it as needed when polling the network device.  This ensures
that forward progress continues to be made even if something causes
the interrupt to be constantly asserted.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/arch/x86/drivers/net/undiisr.S
src/arch/x86/drivers/net/undinet.c