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
 	memcpy ( netdev->ll_addr, undi_info.CurrentNodeAddress, ETH_ALEN );
938
 	memcpy ( netdev->ll_addr, undi_info.CurrentNodeAddress, ETH_ALEN );
939
 	undinic->irq = undi_info.IntNumber;
939
 	undinic->irq = undi_info.IntNumber;
940
 	if ( undinic->irq > IRQ_MAX ) {
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
 		       undinic, undinic->irq );
942
 		       undinic, undinic->irq );
943
-		rc = -EINVAL;
944
-		goto err_bad_irq;
943
+		undinic->irq = 0;
945
 	}
944
 	}
946
 	DBGC ( undinic, "UNDINIC %p has MAC address %s and IRQ %d\n",
945
 	DBGC ( undinic, "UNDINIC %p has MAC address %s and IRQ %d\n",
947
 	       undinic, eth_ntoa ( netdev->hw_addr ), undinic->irq );
946
 	       undinic, eth_ntoa ( netdev->hw_addr ), undinic->irq );
984
 
983
 
985
  err_register:
984
  err_register:
986
  err_undi_get_iface_info:
985
  err_undi_get_iface_info:
987
- err_bad_irq:
988
  err_undi_get_information:
986
  err_undi_get_information:
989
  err_undi_initialize:
987
  err_undi_initialize:
990
 	/* Shut down UNDI stack */
988
 	/* Shut down UNDI stack */

Loading…
Cancel
Save