* [PATCH net] net: ethernet: mtk_eth_soc: Fix DIM support for MT7628/88
@ 2021-05-20 8:43 Stefan Roese
2021-05-21 20:20 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Stefan Roese @ 2021-05-20 8:43 UTC (permalink / raw)
To: netdev
Cc: Felix Fietkau, John Crispin, Ilya Lipnitskiy, Reto Schneider,
Reto Schneider, David S . Miller
When updating to latest mainline for some testing on the GARDENA smart
gateway based on the MT7628, I noticed that ethernet does not work any
more. Commit e9229ffd550b ("net: ethernet: mtk_eth_soc: implement
dynamic interrupt moderation") introduced this problem, as it missed the
RX_DIM & TX_DIM configuration for this SoC variant. This patch fixes
this by calling mtk_dim_rx() & mtk_dim_tx() in this case as well.
Signed-off-by: Stefan Roese <sr@denx.de>
Fixes: e9229ffd550b ("net: ethernet: mtk_eth_soc: implement dynamic interrupt moderation")
Cc: Felix Fietkau <nbd@nbd.name>
Cc: John Crispin <john@phrozen.org>
Cc: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com>
Cc: Reto Schneider <code@reto-schneider.ch>
Cc: Reto Schneider <reto.schneider@husqvarnagroup.com>
Cc: David S. Miller <davem@davemloft.net>
---
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
index ed4eacef17ce..d6cc06ee0caa 100644
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
@@ -2423,7 +2423,8 @@ static void mtk_dim_rx(struct work_struct *work)
val |= cur << MTK_PDMA_DELAY_RX_PINT_SHIFT;
mtk_w32(eth, val, MTK_PDMA_DELAY_INT);
- mtk_w32(eth, val, MTK_QDMA_DELAY_INT);
+ if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
+ mtk_w32(eth, val, MTK_QDMA_DELAY_INT);
spin_unlock_bh(ð->dim_lock);
@@ -2452,7 +2453,8 @@ static void mtk_dim_tx(struct work_struct *work)
val |= cur << MTK_PDMA_DELAY_TX_PINT_SHIFT;
mtk_w32(eth, val, MTK_PDMA_DELAY_INT);
- mtk_w32(eth, val, MTK_QDMA_DELAY_INT);
+ if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
+ mtk_w32(eth, val, MTK_QDMA_DELAY_INT);
spin_unlock_bh(ð->dim_lock);
@@ -2480,6 +2482,10 @@ static int mtk_hw_init(struct mtk_eth *eth)
goto err_disable_pm;
}
+ /* set interrupt delays based on current Net DIM sample */
+ mtk_dim_rx(ð->rx_dim.work);
+ mtk_dim_tx(ð->tx_dim.work);
+
/* disable delay and normal interrupt */
mtk_tx_irq_disable(eth, ~0);
mtk_rx_irq_disable(eth, ~0);
--
2.31.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: ethernet: mtk_eth_soc: Fix DIM support for MT7628/88
2021-05-20 8:43 [PATCH net] net: ethernet: mtk_eth_soc: Fix DIM support for MT7628/88 Stefan Roese
@ 2021-05-21 20:20 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-05-21 20:20 UTC (permalink / raw)
To: Stefan Roese
Cc: netdev, nbd, john, ilya.lipnitskiy, code, reto.schneider, davem
Hello:
This patch was applied to netdev/net.git (refs/heads/master):
On Thu, 20 May 2021 10:43:18 +0200 you wrote:
> When updating to latest mainline for some testing on the GARDENA smart
> gateway based on the MT7628, I noticed that ethernet does not work any
> more. Commit e9229ffd550b ("net: ethernet: mtk_eth_soc: implement
> dynamic interrupt moderation") introduced this problem, as it missed the
> RX_DIM & TX_DIM configuration for this SoC variant. This patch fixes
> this by calling mtk_dim_rx() & mtk_dim_tx() in this case as well.
>
> [...]
Here is the summary with links:
- [net] net: ethernet: mtk_eth_soc: Fix DIM support for MT7628/88
https://git.kernel.org/netdev/net/c/430bfe057612
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-05-21 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-05-20 8:43 [PATCH net] net: ethernet: mtk_eth_soc: Fix DIM support for MT7628/88 Stefan Roese
2021-05-21 20:20 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).