From: Jiawen Wu <jiawenwu@trustnetic.com>
To: netdev@vger.kernel.org
Cc: Mengyuan Lou <mengyuanlou@net-swift.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Richard Cochran <richardcochran@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Simon Horman <horms@kernel.org>,
Jacob Keller <jacob.e.keller@intel.com>,
Kees Cook <kees@kernel.org>,
Michal Kubiak <michal.kubiak@intel.com>, Joe Damato <joe@dama.to>,
Larysa Zaremba <larysa.zaremba@intel.com>,
Abdun Nihaal <abdun.nihaal@gmail.com>,
Breno Leitao <leitao@debian.org>,
Jiawen Wu <jiawenwu@trustnetic.com>
Subject: [PATCH net-next v3 7/9] net: wangxun: delete service_timer before cancel service_work
Date: Tue, 3 Mar 2026 11:03:29 +0800 [thread overview]
Message-ID: <20260303030331.24076-8-jiawenwu@trustnetic.com> (raw)
In-Reply-To: <20260303030331.24076-1-jiawenwu@trustnetic.com>
When removing the device, timer_delete_sync(&wx->service_timer) is
called in .ndo_stop() after cancel_work_sync(&wx->service_task). This
may cause new work to be queued after device down. So we should delete
service_timer first.
Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
---
drivers/net/ethernet/wangxun/libwx/wx_vf_common.c | 1 +
drivers/net/ethernet/wangxun/txgbe/txgbe_main.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
index ade2bfe563aa..5565062c7471 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_vf_common.c
@@ -48,6 +48,7 @@ void wxvf_remove(struct pci_dev *pdev)
struct wx *wx = pci_get_drvdata(pdev);
struct net_device *netdev;
+ timer_delete_sync(&wx->service_timer);
cancel_work_sync(&wx->service_task);
netdev = wx->netdev;
unregister_netdev(netdev);
diff --git a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
index ddc7cea9d7c2..01ceaf270b70 100644
--- a/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
+++ b/drivers/net/ethernet/wangxun/txgbe/txgbe_main.c
@@ -936,6 +936,7 @@ static void txgbe_remove(struct pci_dev *pdev)
struct txgbe *txgbe = wx->priv;
struct net_device *netdev;
+ timer_delete_sync(&wx->service_timer);
cancel_work_sync(&wx->service_task);
netdev = wx->netdev;
--
2.48.1
next prev parent reply other threads:[~2026-03-03 3:04 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 3:03 [PATCH net-next v3 0/9] Wangxun improvement and new support Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 1/9] net: ngbe: move the WOL functions to libwx Jiawen Wu
2026-03-03 8:40 ` Russell King (Oracle)
2026-03-03 3:03 ` [PATCH net-next v3 2/9] net: ngbe: remove redundant macros Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 3/9] net: ngbe: improve the reset flow Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 4/9] net: wangxun: move reusable PCI driver ops functions into libwx Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 5/9] net: txgbe: add power management support Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 6/9] net: wangxun: move ethtool_ops.set_channels into libwx Jiawen Wu
2026-03-03 3:03 ` Jiawen Wu [this message]
2026-03-03 3:03 ` [PATCH net-next v3 8/9] net: wangxun: add Tx timeout process Jiawen Wu
2026-03-03 3:03 ` [PATCH net-next v3 9/9] net: wangxun: implement pci_error_handlers ops Jiawen Wu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260303030331.24076-8-jiawenwu@trustnetic.com \
--to=jiawenwu@trustnetic.com \
--cc=abdun.nihaal@gmail.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jacob.e.keller@intel.com \
--cc=joe@dama.to \
--cc=kees@kernel.org \
--cc=kuba@kernel.org \
--cc=larysa.zaremba@intel.com \
--cc=leitao@debian.org \
--cc=linux@armlinux.org.uk \
--cc=mengyuanlou@net-swift.com \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox