[ipxe-devel] [PATCH] Always update the IRQ state in the IP layer
Martin Habets
mhabets at solarflare.com
Wed Jan 10 11:26:47 UTC 2018
Sorry, this patch has a horrible typo in it. I'll fix the
if ( ! netdev_irq_supported ( netdev ) )
to remove the negation and will resubmit it.
Martin
On 09/01/18 18:11, Martin Habets wrote:
> 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 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;
>
More information about the ipxe-devel
mailing list