]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.16-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Mar 2022 22:53:47 +0000 (23:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 5 Mar 2022 22:53:47 +0000 (23:53 +0100)
added patches:
net-stmmac-perserve-tx-and-rx-coalesce-value-during-xdp-setup.patch

queue-5.16/net-stmmac-perserve-tx-and-rx-coalesce-value-during-xdp-setup.patch [new file with mode: 0644]
queue-5.16/series

diff --git a/queue-5.16/net-stmmac-perserve-tx-and-rx-coalesce-value-during-xdp-setup.patch b/queue-5.16/net-stmmac-perserve-tx-and-rx-coalesce-value-during-xdp-setup.patch
new file mode 100644 (file)
index 0000000..171388f
--- /dev/null
@@ -0,0 +1,45 @@
+From 61da6ac715700bcfeef50d187e15c6cc7c9d079b Mon Sep 17 00:00:00 2001
+From: Ong Boon Leong <boon.leong.ong@intel.com>
+Date: Wed, 24 Nov 2021 19:40:19 +0800
+Subject: net: stmmac: perserve TX and RX coalesce value during XDP setup
+
+From: Ong Boon Leong <boon.leong.ong@intel.com>
+
+commit 61da6ac715700bcfeef50d187e15c6cc7c9d079b upstream.
+
+When XDP program is loaded, it is desirable that the previous TX and RX
+coalesce values are not re-inited to its default value. This prevents
+unnecessary re-configurig the coalesce values that were working fine
+before.
+
+Fixes: ac746c8520d9 ("net: stmmac: enhance XDP ZC driver level switching performance")
+Signed-off-by: Ong Boon Leong <boon.leong.ong@intel.com>
+Tested-by: Kurt Kanzenbach <kurt@linutronix.de>
+Link: https://lore.kernel.org/r/20211124114019.3949125-1-boon.leong.ong@intel.com
+Signed-off-by: Jakub Kicinski <kuba@kernel.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c |    5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
++++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+@@ -6596,6 +6596,9 @@ int stmmac_xdp_open(struct net_device *d
+               tx_q->tx_tail_addr = tx_q->dma_tx_phy;
+               stmmac_set_tx_tail_ptr(priv, priv->ioaddr,
+                                      tx_q->tx_tail_addr, chan);
++
++              hrtimer_init(&tx_q->txtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL);
++              tx_q->txtimer.function = stmmac_tx_timer;
+       }
+       /* Enable the MAC Rx/Tx */
+@@ -6604,8 +6607,6 @@ int stmmac_xdp_open(struct net_device *d
+       /* Start Rx & Tx DMA Channels */
+       stmmac_start_all_dma(priv);
+-      stmmac_init_coalesce(priv);
+-
+       ret = stmmac_request_irq(dev);
+       if (ret)
+               goto irq_error;
index c8ab3b8bd1af886530910f2cae983a00c25b517b..1d46c4afb162e6699c7fdfa3464a0ead3482061f 100644 (file)
@@ -162,3 +162,4 @@ ptp-ocp-add-ptp_ocp_adjtime_coarse-for-large-adjustm.patch
 drm-amdgpu-fix-suspend-resume-hang-regression.patch
 net-dcb-disable-softirqs-in-dcbnl_flush_dev.patch
 selftests-mlxsw-resource_scale-fix-return-value.patch
+net-stmmac-perserve-tx-and-rx-coalesce-value-during-xdp-setup.patch