[net-next,v1,1/1] net: stmmac: Introduce set_rx_ic() for enabling RX interrupt-on-completion
Jakub Kicinski
kuba at kernel.org
Fri Aug 16 11:09:28 PDT 2024
On Wed, 14 Aug 2024 17:24:38 +0800 ende.tan at starfivetech.com wrote:
> From: Tan En De <ende.tan at starfivetech.com>
>
> Currently, some set_rx_owner() callbacks set interrupt-on-completion bit
> in addition to OWN bit, without inserting a dma_wmb() barrier. This
> might cause missed interrupt if the DMA sees the OWN bit before the
> interrupt-on-completion bit is set.
>
> Thus, let's introduce set_rx_ic() for enabling interrupt-on-completion,
> and call it before dma_wmb() and set_rx_owner() in the main driver,
> ensuring proper ordering and preventing missed interrupt.
Having multiple indirect function calls to write a single descriptor
is really not great. Looks like it's always bit 31, can't this be coded
up as common handler which sets bit 31 in the appropriate word (word
offset specified per platform)?
More information about the linux-arm-kernel
mailing list