Kaynağa Gözat

[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 yıl önce
ebeveyn
işleme
8e984f35e0
1 değiştirilmiş dosya ile 3 ekleme ve 1 silme
  1. 3
    1
      src/arch/i386/drivers/net/undinet.c

+ 3
- 1
src/arch/i386/drivers/net/undinet.c Dosyayı Görüntüle

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

Loading…
İptal
Kaydet