* [PATCH net] net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring
@ 2026-10-25 18:20 David Yang
2026-10-27 23:10 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: David Yang @ 2026-10-25 18:20 UTC (permalink / raw)
To: netdev
Cc: David Yang, stable, Jian Shen, Jijie Shao, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Dongpo Li, Jiancheng Xue, linux-kernel
hisi_femac_net_close() frees the receive ring while the RX address queue
still holds every address that was pushed to IQ_ADDR.
A port that keeps receiving then DMAs arrived frames into buffers that
other slab caches have already taken back; on an EC6108V9C (hi3798mv100)
the queue still held all 52 armed addresses right after the interface
was closed, and had dropped to 43 after 15 s of broadcast traffic.
Reset the port before the buffers are released, so that the receiver no
longer holds any of their addresses.
Fixes: 542ae60af24f ("net: hisilicon: Add Fast Ethernet MAC driver")
Cc: stable@vger.kernel.org
Signed-off-by: David Yang <mmyangfl@gmail.com>
---
drivers/net/ethernet/hisilicon/hisi_femac.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c
index 016605e86f0b..a44ea0a2b1ee 100644
--- a/drivers/net/ethernet/hisilicon/hisi_femac.c
+++ b/drivers/net/ethernet/hisilicon/hisi_femac.c
@@ -491,6 +491,7 @@ static int hisi_femac_net_close(struct net_device *dev)
netif_stop_queue(dev);
napi_disable(&priv->napi);
+ hisi_femac_port_reset(priv);
hisi_femac_free_skb_rings(priv);
return 0;
--
2.53.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH net] net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring
2026-10-25 18:20 [PATCH net] net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring David Yang
@ 2026-10-27 23:10 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-10-27 23:10 UTC (permalink / raw)
To: David Yang
Cc: netdev, stable, shenjian15, shaojijie, andrew+netdev, davem,
edumazet, kuba, pabeni, lidongpo, xuejiancheng, linux-kernel
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Mon, 26 Oct 2026 02:20:18 +0800 you wrote:
> hisi_femac_net_close() frees the receive ring while the RX address queue
> still holds every address that was pushed to IQ_ADDR.
>
> A port that keeps receiving then DMAs arrived frames into buffers that
> other slab caches have already taken back; on an EC6108V9C (hi3798mv100)
> the queue still held all 52 armed addresses right after the interface
> was closed, and had dropped to 43 after 15 s of broadcast traffic.
>
> [...]
Here is the summary with links:
- [net] net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring
https://git.kernel.org/netdev/net/c/d54b21d82430
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:[~2026-10-27 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-25 18:20 [PATCH net] net: hisilicon: hisi_femac: Stop the receiver before releasing the RX ring David Yang
2026-10-27 23:10 ` 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
all inboxes | Powered by JetHome®