[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5b3e33f4-86a0-4f6e-a250-e7443bc5c6f5@gmail.com>
Date: Thu, 16 May 2024 22:31:50 +0100
From: Ken Milmore <ken.milmore@...il.com>
To: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
Heiner Kallweit <hkallweit1@...il.com>
Cc: Realtek linux nic maintainers <nic_swsd@...ltek.com>
Subject: Re: [PATCH net] Revert "r8169: don't try to disable interrupts if
NAPI is, scheduled already"
On 16/05/2024 22:10, Ken Milmore wrote:
> To test this hypothesis, I tried the code below, which never disables
> interrupts but instead clears out the status register on every interrupt:
>
> index 2ce4bff..dbda9ef 100644
> --- linux-source-6.1~/drivers/net/ethernet/realtek/r8169_main.c
> +++ linux-source-6.1/drivers/net/ethernet/realtek/r8169_main.c
> @@ -4610,7 +4610,7 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
> rtl_irq_disable(tp);
> napi_schedule(&tp->napi);
> out:
> - rtl_ack_events(tp, status);
> + rtl_ack_events(tp, tp->irq_mask);
>
> return IRQ_HANDLED;
> }
>
> This passed my iperf3 test perfectly! It is likely to cause other problems
> though: Specifically it opens the possibility that we will miss a SYSErr,
> LinkChg or RxFIFOOver interrupt. Hence the rationale for achieving the required
> (status & mask) == 0 condition by clearing the mask register instead.
Sorry, that patch should have been:
diff --git linux-source-6.1~/drivers/net/ethernet/realtek/r8169_main.c linux-source-6.1/drivers/net/ethernet/realtek/r8169_main.c
index 2ce4bff..e9757ff 100644
--- linux-source-6.1~/drivers/net/ethernet/realtek/r8169_main.c
+++ linux-source-6.1/drivers/net/ethernet/realtek/r8169_main.c
@@ -4607,10 +4607,9 @@ static irqreturn_t rtl8169_interrupt(int irq, void *dev_instance)
rtl_schedule_task(tp, RTL_FLAG_TASK_RESET_PENDING);
}
- rtl_irq_disable(tp);
napi_schedule(&tp->napi);
out:
- rtl_ack_events(tp, status);
+ rtl_ack_events(tp, tp->irq_mask);
return IRQ_HANDLED;
}
Powered by blists - more mailing lists