[ipxe-devel] [PATCH v2] Always update the IRQ state in the IP layer

Martin Habets mhabets at solarflare.com
Wed Jan 10 15:32:34 UTC 2018


The UNDI layer uses the IP layer's idea of the IRQ state to determine
if a poll was done for our UNDI device (see pxenv_undi_isr()).
As the comment in pxenv_undi_isr() explains the check is not 100%
correct.

The SFC driver (among others) does not support interrupts, so the UNDI
call would always set PXENV_UNDI_ISR_OUT_NOT_OURS.
Some NBP's (such as lpxelinux.0) hang due to this.

With this patch we update the IRQ state in the IP layer even if the
driver does not support interrupts, so that UNDI calls will return
PXENV_UNDI_ISR_OUT_OURS for the boot device.
For other devices it will still return PXENV_UNDI_ISR_OUT_NOT_OURS
like before.

Signed-off-by: Martin Habets <mhabets at solarflare.com>
---
 src/net/netdevice.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/net/netdevice.c b/src/net/netdevice.c
index 4c211d707b96..1eda001181e9 100644
--- a/src/net/netdevice.c
+++ b/src/net/netdevice.c
@@ -874,12 +874,9 @@ void unregister_netdev ( struct net_device *netdev ) {
  */
 void netdev_irq ( struct net_device *netdev, int enable ) {
 
-	/* Do nothing if device does not support interrupts */
-	if ( ! netdev_irq_supported ( netdev ) )
-		return;
-
 	/* Enable or disable device interrupts */
-	netdev->op->irq ( netdev, enable );
+	if ( netdev_irq_supported ( netdev ) )
+		netdev->op->irq ( netdev, enable );
 
 	/* Record interrupt enabled state */
 	netdev->state &= ~NETDEV_IRQ_ENABLED;
-- 
2.13.6




More information about the ipxe-devel mailing list