Message ID | 20211124154731.1676949-1-yannick.vignon@oss.nxp.com (mailing list archive) |
---|---|
State | Accepted |
Commit | b270bfe697367776eca2e6759a71d700fb8d82a2 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [net,v2] net: stmmac: Disable Tx queues when reconfiguring the interface | expand |
Hello: This patch was applied to netdev/net.git (master) by Jakub Kicinski <kuba@kernel.org>: On Wed, 24 Nov 2021 16:47:31 +0100 you wrote: > From: Yannick Vignon <yannick.vignon@nxp.com> > > The Tx queues were not disabled in situations where the driver needed to > stop the interface to apply a new configuration. This could result in a > kernel panic when doing any of the 3 following actions: > * reconfiguring the number of queues (ethtool -L) > * reconfiguring the size of the ring buffers (ethtool -G) > * installing/removing an XDP program (ip l set dev ethX xdp) > > [...] Here is the summary with links: - [net,v2] net: stmmac: Disable Tx queues when reconfiguring the interface https://git.kernel.org/netdev/net/c/b270bfe69736 You are awesome, thank you!
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index f12097c8a485..748195697e5a 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3802,6 +3802,8 @@ int stmmac_release(struct net_device *dev) struct stmmac_priv *priv = netdev_priv(dev); u32 chan; + netif_tx_disable(dev); + if (device_may_wakeup(priv->device)) phylink_speed_down(priv->phylink, false); /* Stop and disconnect the PHY */