Browse Source

[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>
tags/v1.20.1
Michael Brown 13 years ago
parent
commit
8e984f35e0
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/arch/i386/drivers/net/undinet.c

+ 3
- 1
src/arch/i386/drivers/net/undinet.c View File

558
 	DBGC ( undinic, "UNDINIC %p has type %s, speed %d, flags %08x\n",
558
 	DBGC ( undinic, "UNDINIC %p has type %s, speed %d, flags %08x\n",
559
 	       undinic, undi_iface.IfaceType, undi_iface.LinkSpeed,
559
 	       undinic, undi_iface.IfaceType, undi_iface.LinkSpeed,
560
 	       undi_iface.ServiceFlags );
560
 	       undi_iface.ServiceFlags );
561
-	if ( undi_iface.ServiceFlags & SUPPORTED_IRQ )
561
+	if ( ( undi_iface.ServiceFlags & SUPPORTED_IRQ ) &&
562
+	     ( undinic->irq != 0 ) ) {
562
 		undinic->irq_supported = 1;
563
 		undinic->irq_supported = 1;
564
+	}
563
 	DBGC ( undinic, "UNDINIC %p using %s mode\n", undinic,
565
 	DBGC ( undinic, "UNDINIC %p using %s mode\n", undinic,
564
 	       ( undinic->irq_supported ? "interrupt" : "polling" ) );
566
 	       ( undinic->irq_supported ? "interrupt" : "polling" ) );
565
 	if ( strncmp ( ( ( char * ) undi_iface.IfaceType ), "Etherboot",
567
 	if ( strncmp ( ( ( char * ) undi_iface.IfaceType ), "Etherboot",

Loading…
Cancel
Save