* [PATCH] net: hisilicon: hix5hd2_gmac: fix NAPI teardown order
@ 2026-07-26 6:35 Jiawen Liu
2026-07-27 22:58 ` Jakub Kicinski
0 siblings, 1 reply; 2+ messages in thread
From: Jiawen Liu @ 2026-07-26 6:35 UTC (permalink / raw)
To: Jian Shen, Andrew Lunn, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni
Cc: netdev, linux-kernel, Jiawen Liu
hix5hd2_dev_remove() deletes the NAPI instance before unregistering the
netdev.
The netdev should be unregistered first so the networking core can stop the
device while its NAPI instance is still present. Delete the NAPI instance
after unregister_netdev() has completed, matching the usual teardown order
for drivers that call netif_napi_add() during probe.
Signed-off-by: Jiawen Liu <1298662399@qq.com>
---
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
index e3e7f2270560..81d398918b1d 100644
--- a/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
+++ b/drivers/net/ethernet/hisilicon/hix5hd2_gmac.c
@@ -1282,8 +1282,8 @@ static void hix5hd2_dev_remove(struct platform_device *pdev)
struct net_device *ndev = platform_get_drvdata(pdev);
struct hix5hd2_priv *priv = netdev_priv(ndev);
- netif_napi_del(&priv->napi);
unregister_netdev(ndev);
+ netif_napi_del(&priv->napi);
mdiobus_unregister(priv->bus);
mdiobus_free(priv->bus);
--
2.34.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] net: hisilicon: hix5hd2_gmac: fix NAPI teardown order
2026-07-26 6:35 [PATCH] net: hisilicon: hix5hd2_gmac: fix NAPI teardown order Jiawen Liu
@ 2026-07-27 22:58 ` Jakub Kicinski
0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2026-07-27 22:58 UTC (permalink / raw)
To: Jiawen Liu
Cc: Jian Shen, Andrew Lunn, David S. Miller, Eric Dumazet,
Paolo Abeni, netdev, linux-kernel
On Sun, 26 Jul 2026 10:35:55 +0400 Jiawen Liu wrote:
> hix5hd2_dev_remove() deletes the NAPI instance before unregistering the
> netdev.
>
> The netdev should be unregistered first so the networking core can stop the
> device while its NAPI instance is still present. Delete the NAPI instance
> after unregister_netdev() has completed, matching the usual teardown order
> for drivers that call netif_napi_add() during probe.
Just delete that call. Unregistering deletes all the NAPIs
automatically. Also you're missing a Fixes tag
--
pw-bot: cr
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-07-27 22:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-26 6:35 [PATCH] net: hisilicon: hix5hd2_gmac: fix NAPI teardown order Jiawen Liu
2026-07-27 22:58 ` Jakub Kicinski
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.