]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[undi] Treat invalid IRQ numbers as non-fatal errors
authorMichael Brown <mcb30@ipxe.org>
Wed, 21 Mar 2018 08:28:05 +0000 (10:28 +0200)
committerMichael Brown <mcb30@ipxe.org>
Wed, 21 Mar 2018 08:28:05 +0000 (10:28 +0200)
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>
src/arch/x86/drivers/net/undinet.c

index 78191181497fcb7dbc40e798eda92fd9738c25cc..e8ec772ef3752871f0bad43a49498d5044924e2c 100644 (file)
@@ -938,10 +938,9 @@ int undinet_probe ( struct undi_device *undi, struct device *dev ) {
        memcpy ( netdev->ll_addr, undi_info.CurrentNodeAddress, ETH_ALEN );
        undinic->irq = undi_info.IntNumber;
        if ( undinic->irq > IRQ_MAX ) {
-               DBGC ( undinic, "UNDINIC %p has invalid IRQ %d\n",
+               DBGC ( undinic, "UNDINIC %p ignoring invalid IRQ %d\n",
                       undinic, undinic->irq );
-               rc = -EINVAL;
-               goto err_bad_irq;
+               undinic->irq = 0;
        }
        DBGC ( undinic, "UNDINIC %p has MAC address %s and IRQ %d\n",
               undinic, eth_ntoa ( netdev->hw_addr ), undinic->irq );
@@ -984,7 +983,6 @@ int undinet_probe ( struct undi_device *undi, struct device *dev ) {
 
  err_register:
  err_undi_get_iface_info:
- err_bad_irq:
  err_undi_get_information:
  err_undi_initialize:
        /* Shut down UNDI stack */