浏览代码

[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 15 年前
父节点
当前提交
8e984f35e0
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3
    1
      src/arch/i386/drivers/net/undinet.c

+ 3
- 1
src/arch/i386/drivers/net/undinet.c 查看文件

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",

正在加载...
取消
保存