mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 00:41:17 +00:00
4a2ff73177
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.69 Removed upstreamed: generic/backport-6.1/795-v6.3-01-r8152-add-USB-device-driver-for-config-selection.patch[1] generic/backport-6.1/795-v6.3-03-r8152-avoid-to-change-cfg-for-all-devices.patch[2] generic/backport-6.1/795-v6.3-04-r8152-remove-rtl_vendor_mode-function.patch[3] generic/backport-6.1/795-v6.4-07-r8152-fix-the-autosuspend-doesn-t-work.patch[4] generic/backport-6.1/795-v6.6-11-r8152-add-vendor-device-ID-pair-for-D-Link-DUB-E250.patch[5] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=893597cbabfbc00ee51fd5f73e2028994f49ded6 2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=1d82735f4bae954d5ba004994b96baec791f874f 3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=4c2ad8e39c62c5288ca31ebf5c30e34f3bd9d044 4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=325556d46bfd13a2fa0d304d0625be86821fd683 5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.69&id=cac1218b32d7b56832dd36f7baf82f123f305a2a Build system: x86/64 Build-tested: x86/64/AMD Cezanne Run-tested: x86/64/AMD Cezanne Signed-off-by: John Audia <therealgraysky@proton.me>
90 lines
3.1 KiB
Diff
90 lines
3.1 KiB
Diff
From fb04db35447d1e8ff557c8e57139164cecab7de5 Mon Sep 17 00:00:00 2001
|
|
From: Christian Marangi <ansuelsmth@gmail.com>
|
|
Date: Wed, 27 Sep 2023 15:38:31 +0200
|
|
Subject: [PATCH 2/4] net: stmmac: move TX timer arm after DMA enable
|
|
|
|
Move TX timer arm call after DMA interrupt is enabled again.
|
|
|
|
The TX timer arm function changed logic and now is skipped if a napi is
|
|
already scheduled. By moving the TX timer arm call after DMA is enabled,
|
|
we permit to correctly skip if a DMA interrupt has been fired and a napi
|
|
has been scheduled again.
|
|
|
|
Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
|
|
---
|
|
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 19 +++++++++++++++----
|
|
1 file changed, 15 insertions(+), 4 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
|
|
@@ -2530,7 +2530,8 @@ static void stmmac_bump_dma_threshold(st
|
|
* @queue: TX queue index
|
|
* Description: it reclaims the transmit resources after transmission completes.
|
|
*/
|
|
-static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue)
|
|
+static int stmmac_tx_clean(struct stmmac_priv *priv, int budget, u32 queue,
|
|
+ bool *pending_packets)
|
|
{
|
|
struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue];
|
|
unsigned int bytes_compl = 0, pkts_compl = 0;
|
|
@@ -2693,7 +2694,7 @@ static int stmmac_tx_clean(struct stmmac
|
|
|
|
/* We still have pending packets, let's call for a new scheduling */
|
|
if (tx_q->dirty_tx != tx_q->cur_tx)
|
|
- stmmac_tx_timer_arm(priv, queue);
|
|
+ *pending_packets = true;
|
|
|
|
__netif_tx_unlock_bh(netdev_get_tx_queue(priv->dev, queue));
|
|
|
|
@@ -5473,12 +5474,13 @@ static int stmmac_napi_poll_tx(struct na
|
|
struct stmmac_channel *ch =
|
|
container_of(napi, struct stmmac_channel, tx_napi);
|
|
struct stmmac_priv *priv = ch->priv_data;
|
|
+ bool pending_packets = false;
|
|
u32 chan = ch->index;
|
|
int work_done;
|
|
|
|
priv->xstats.napi_poll++;
|
|
|
|
- work_done = stmmac_tx_clean(priv, budget, chan);
|
|
+ work_done = stmmac_tx_clean(priv, budget, chan, &pending_packets);
|
|
work_done = min(work_done, budget);
|
|
|
|
if (work_done < budget && napi_complete_done(napi, work_done)) {
|
|
@@ -5489,6 +5491,10 @@ static int stmmac_napi_poll_tx(struct na
|
|
spin_unlock_irqrestore(&ch->lock, flags);
|
|
}
|
|
|
|
+ /* TX still have packet to handle, check if we need to arm tx timer */
|
|
+ if (pending_packets)
|
|
+ stmmac_tx_timer_arm(priv, chan);
|
|
+
|
|
return work_done;
|
|
}
|
|
|
|
@@ -5498,11 +5504,12 @@ static int stmmac_napi_poll_rxtx(struct
|
|
container_of(napi, struct stmmac_channel, rxtx_napi);
|
|
struct stmmac_priv *priv = ch->priv_data;
|
|
int rx_done, tx_done, rxtx_done;
|
|
+ bool tx_pending_packets = false;
|
|
u32 chan = ch->index;
|
|
|
|
priv->xstats.napi_poll++;
|
|
|
|
- tx_done = stmmac_tx_clean(priv, budget, chan);
|
|
+ tx_done = stmmac_tx_clean(priv, budget, chan, &tx_pending_packets);
|
|
tx_done = min(tx_done, budget);
|
|
|
|
rx_done = stmmac_rx_zc(priv, budget, chan);
|
|
@@ -5527,6 +5534,10 @@ static int stmmac_napi_poll_rxtx(struct
|
|
spin_unlock_irqrestore(&ch->lock, flags);
|
|
}
|
|
|
|
+ /* TX still have packet to handle, check if we need to arm tx timer */
|
|
+ if (tx_pending_packets)
|
|
+ stmmac_tx_timer_arm(priv, chan);
|
|
+
|
|
return min(rxtx_done, budget - 1);
|
|
}
|
|
|