diff options
author | Michael Brown | 2011-04-23 00:31:25 +0200 |
---|---|---|
committer | Michael Brown | 2011-04-23 00:31:25 +0200 |
commit | 8e984f35e0f8ae8576c68b56b231199f58cbea22 (patch) | |
tree | 6f2412c014348942d72c61d8ee544fc33a3f47f7 /src/arch/i386/drivers/net/undinet.c | |
parent | [build] Run parserom.pl only on potential driver files (diff) | |
download | ipxe-8e984f35e0f8ae8576c68b56b231199f58cbea22.tar.gz ipxe-8e984f35e0f8ae8576c68b56b231199f58cbea22.tar.xz ipxe-8e984f35e0f8ae8576c68b56b231199f58cbea22.zip |
[undi] Assume that interrupts are not supported if IRQ=0
Some PXE stacks (notably old Etherboot/gPXE stacks) will claim to use
the timer interrupt, rather than reporting that interrupts are not
supported. Since using the timer interrupt is equivalent to polling
anyway, we may as well genuinely poll these stacks.
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/arch/i386/drivers/net/undinet.c')
-rw-r--r-- | src/arch/i386/drivers/net/undinet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/arch/i386/drivers/net/undinet.c b/src/arch/i386/drivers/net/undinet.c index 56bd6288..5cfceda7 100644 --- a/src/arch/i386/drivers/net/undinet.c +++ b/src/arch/i386/drivers/net/undinet.c @@ -558,8 +558,10 @@ int undinet_probe ( struct undi_device *undi ) { DBGC ( undinic, "UNDINIC %p has type %s, speed %d, flags %08x\n", undinic, undi_iface.IfaceType, undi_iface.LinkSpeed, undi_iface.ServiceFlags ); - if ( undi_iface.ServiceFlags & SUPPORTED_IRQ ) + if ( ( undi_iface.ServiceFlags & SUPPORTED_IRQ ) && + ( undinic->irq != 0 ) ) { undinic->irq_supported = 1; + } DBGC ( undinic, "UNDINIC %p using %s mode\n", undinic, ( undinic->irq_supported ? "interrupt" : "polling" ) ); if ( strncmp ( ( ( char * ) undi_iface.IfaceType ), "Etherboot", |