Browse Source

[undi] Treat invalid IRQ numbers as non-fatal errors

If the underlying PXE stack reports an invalid IRQ number (above
IRQ_MAX), treat this as equivalent to an empty IRQ number and fall
back to using polling mode.

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 6 years ago
parent
commit
0600ffeb30
1 changed files with 2 additions and 4 deletions
  1. 2
    4
      src/arch/x86/drivers/net/undinet.c

+ 2
- 4
src/arch/x86/drivers/net/undinet.c View File

@@ -938,10 +938,9 @@ int undinet_probe ( struct undi_device *undi, struct device *dev ) {
938 938
 	memcpy ( netdev->ll_addr, undi_info.CurrentNodeAddress, ETH_ALEN );
939 939
 	undinic->irq = undi_info.IntNumber;
940 940
 	if ( undinic->irq > IRQ_MAX ) {
941
-		DBGC ( undinic, "UNDINIC %p has invalid IRQ %d\n",
941
+		DBGC ( undinic, "UNDINIC %p ignoring invalid IRQ %d\n",
942 942
 		       undinic, undinic->irq );
943
-		rc = -EINVAL;
944
-		goto err_bad_irq;
943
+		undinic->irq = 0;
945 944
 	}
946 945
 	DBGC ( undinic, "UNDINIC %p has MAC address %s and IRQ %d\n",
947 946
 	       undinic, eth_ntoa ( netdev->hw_addr ), undinic->irq );
@@ -984,7 +983,6 @@ int undinet_probe ( struct undi_device *undi, struct device *dev ) {
984 983
 
985 984
  err_register:
986 985
  err_undi_get_iface_info:
987
- err_bad_irq:
988 986
  err_undi_get_information:
989 987
  err_undi_initialize:
990 988
 	/* Shut down UNDI stack */

Loading…
Cancel
Save