mirror of https://github.com/openwrt/openwrt.git
kernel: bump 6.6 to 6.6.91
Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.91 Removed upstreamed: generic/pending-6.6/730-net-ethernet-mtk_eth_soc-reset-all-TX-queues-on-DMA-.patch[1] All other patches automatically rebased. 1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.91&id=68f29bb97a0e0519156664cdc23e8b1f129e3254 Build system: x86/64 Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3 Signed-off-by: John Audia <therealgraysky@proton.me> Link: https://github.com/openwrt/openwrt/pull/18835 Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
This commit is contained in:
parent
3d6e1a3c9d
commit
ecac1d8abd
|
@ -323,7 +323,7 @@ SVN-Revision: 35130
|
||||||
SKB_DROP_REASON_IP_INHDR);
|
SKB_DROP_REASON_IP_INHDR);
|
||||||
--- a/include/linux/types.h
|
--- a/include/linux/types.h
|
||||||
+++ b/include/linux/types.h
|
+++ b/include/linux/types.h
|
||||||
@@ -244,5 +244,11 @@ typedef void (*swap_func_t)(void *a, voi
|
@@ -245,5 +245,11 @@ typedef void (*swap_func_t)(void *a, voi
|
||||||
typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
|
typedef int (*cmp_r_func_t)(const void *a, const void *b, const void *priv);
|
||||||
typedef int (*cmp_func_t)(const void *a, const void *b);
|
typedef int (*cmp_func_t)(const void *a, const void *b);
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ Cc: linux-kernel@vger.kernel.org
|
||||||
|
|
||||||
--- a/include/linux/cpu.h
|
--- a/include/linux/cpu.h
|
||||||
+++ b/include/linux/cpu.h
|
+++ b/include/linux/cpu.h
|
||||||
@@ -109,7 +109,7 @@ void notify_cpu_starting(unsigned int cp
|
@@ -111,7 +111,7 @@ void notify_cpu_starting(unsigned int cp
|
||||||
extern void cpu_maps_update_begin(void);
|
extern void cpu_maps_update_begin(void);
|
||||||
extern void cpu_maps_update_done(void);
|
extern void cpu_maps_update_done(void);
|
||||||
int bringup_hibernate_cpu(unsigned int sleep_cpu);
|
int bringup_hibernate_cpu(unsigned int sleep_cpu);
|
||||||
|
|
|
@ -37,7 +37,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
|
|
||||||
--- a/include/linux/netdevice.h
|
--- a/include/linux/netdevice.h
|
||||||
+++ b/include/linux/netdevice.h
|
+++ b/include/linux/netdevice.h
|
||||||
@@ -4569,6 +4569,9 @@ static inline void netif_addr_unlock_bh(
|
@@ -4580,6 +4580,9 @@ static inline void netif_addr_unlock_bh(
|
||||||
|
|
||||||
void ether_setup(struct net_device *dev);
|
void ether_setup(struct net_device *dev);
|
||||||
|
|
||||||
|
|
|
@ -280,8 +280,8 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
ring->dma, ring->phys);
|
ring->dma, ring->phys);
|
||||||
ring->dma = NULL;
|
ring->dma = NULL;
|
||||||
}
|
}
|
||||||
@@ -3124,7 +3124,7 @@ static void mtk_dma_free(struct mtk_eth
|
@@ -3132,7 +3132,7 @@ static void mtk_dma_free(struct mtk_eth
|
||||||
netdev_reset_queue(eth->netdev[i]);
|
|
||||||
if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) {
|
if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) {
|
||||||
dma_free_coherent(eth->dma_dev,
|
dma_free_coherent(eth->dma_dev,
|
||||||
- MTK_QDMA_RING_SIZE * soc->txrx.txd_size,
|
- MTK_QDMA_RING_SIZE * soc->txrx.txd_size,
|
||||||
|
@ -289,7 +289,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
eth->scratch_ring, eth->phy_scratch_ring);
|
eth->scratch_ring, eth->phy_scratch_ring);
|
||||||
eth->scratch_ring = NULL;
|
eth->scratch_ring = NULL;
|
||||||
eth->phy_scratch_ring = 0;
|
eth->phy_scratch_ring = 0;
|
||||||
@@ -3174,7 +3174,7 @@ static irqreturn_t mtk_handle_irq_rx(int
|
@@ -3182,7 +3182,7 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||||
|
|
||||||
eth->rx_events++;
|
eth->rx_events++;
|
||||||
if (likely(napi_schedule_prep(ð->rx_napi))) {
|
if (likely(napi_schedule_prep(ð->rx_napi))) {
|
||||||
|
@ -298,7 +298,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
__napi_schedule(ð->rx_napi);
|
__napi_schedule(ð->rx_napi);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3200,9 +3200,9 @@ static irqreturn_t mtk_handle_irq(int ir
|
@@ -3208,9 +3208,9 @@ static irqreturn_t mtk_handle_irq(int ir
|
||||||
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
|
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
|
||||||
|
|
||||||
if (mtk_r32(eth, reg_map->pdma.irq_mask) &
|
if (mtk_r32(eth, reg_map->pdma.irq_mask) &
|
||||||
|
@ -310,7 +310,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
mtk_handle_irq_rx(irq, _eth);
|
mtk_handle_irq_rx(irq, _eth);
|
||||||
}
|
}
|
||||||
if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
|
if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
|
||||||
@@ -3220,10 +3220,10 @@ static void mtk_poll_controller(struct n
|
@@ -3228,10 +3228,10 @@ static void mtk_poll_controller(struct n
|
||||||
struct mtk_eth *eth = mac->hw;
|
struct mtk_eth *eth = mac->hw;
|
||||||
|
|
||||||
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
||||||
|
@ -323,7 +323,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -3387,7 +3387,7 @@ static int mtk_open(struct net_device *d
|
@@ -3395,7 +3395,7 @@ static int mtk_open(struct net_device *d
|
||||||
napi_enable(ð->tx_napi);
|
napi_enable(ð->tx_napi);
|
||||||
napi_enable(ð->rx_napi);
|
napi_enable(ð->rx_napi);
|
||||||
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
|
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
|
||||||
|
@ -332,7 +332,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
refcount_set(ð->dma_refcnt, 1);
|
refcount_set(ð->dma_refcnt, 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -3471,7 +3471,7 @@ static int mtk_stop(struct net_device *d
|
@@ -3479,7 +3479,7 @@ static int mtk_stop(struct net_device *d
|
||||||
mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
|
mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
|
||||||
|
|
||||||
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
||||||
|
@ -341,7 +341,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
napi_disable(ð->tx_napi);
|
napi_disable(ð->tx_napi);
|
||||||
napi_disable(ð->rx_napi);
|
napi_disable(ð->rx_napi);
|
||||||
|
|
||||||
@@ -3947,9 +3947,9 @@ static int mtk_hw_init(struct mtk_eth *e
|
@@ -3955,9 +3955,9 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||||
|
|
||||||
/* FE int grouping */
|
/* FE int grouping */
|
||||||
mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
|
mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
|
||||||
|
@ -353,7 +353,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
|
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
|
||||||
|
|
||||||
if (mtk_is_netsys_v3_or_greater(eth)) {
|
if (mtk_is_netsys_v3_or_greater(eth)) {
|
||||||
@@ -5057,11 +5057,15 @@ static const struct mtk_soc_data mt2701_
|
@@ -5065,11 +5065,15 @@ static const struct mtk_soc_data mt2701_
|
||||||
.required_clks = MT7623_CLKS_BITMAP,
|
.required_clks = MT7623_CLKS_BITMAP,
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.version = 1,
|
.version = 1,
|
||||||
|
@ -374,7 +374,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5077,11 +5081,15 @@ static const struct mtk_soc_data mt7621_
|
@@ -5085,11 +5089,15 @@ static const struct mtk_soc_data mt7621_
|
||||||
.offload_version = 1,
|
.offload_version = 1,
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
||||||
|
@ -395,7 +395,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5099,11 +5107,15 @@ static const struct mtk_soc_data mt7622_
|
@@ -5107,11 +5115,15 @@ static const struct mtk_soc_data mt7622_
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
||||||
|
@ -416,7 +416,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5120,11 +5132,15 @@ static const struct mtk_soc_data mt7623_
|
@@ -5128,11 +5140,15 @@ static const struct mtk_soc_data mt7623_
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
||||||
.disable_pll_modes = true,
|
.disable_pll_modes = true,
|
||||||
|
@ -437,7 +437,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5139,11 +5155,15 @@ static const struct mtk_soc_data mt7629_
|
@@ -5147,11 +5163,15 @@ static const struct mtk_soc_data mt7629_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.version = 1,
|
.version = 1,
|
||||||
|
@ -458,7 +458,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5161,11 +5181,15 @@ static const struct mtk_soc_data mt7981_
|
@@ -5169,11 +5189,15 @@ static const struct mtk_soc_data mt7981_
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
||||||
|
@ -479,7 +479,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
},
|
},
|
||||||
@@ -5183,11 +5207,15 @@ static const struct mtk_soc_data mt7986_
|
@@ -5191,11 +5215,15 @@ static const struct mtk_soc_data mt7986_
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
||||||
|
@ -500,7 +500,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
},
|
},
|
||||||
@@ -5205,11 +5233,15 @@ static const struct mtk_soc_data mt7988_
|
@@ -5213,11 +5241,15 @@ static const struct mtk_soc_data mt7988_
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V3_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V3_SIZE,
|
||||||
|
@ -521,7 +521,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
},
|
},
|
||||||
@@ -5222,11 +5254,15 @@ static const struct mtk_soc_data rt5350_
|
@@ -5230,11 +5262,15 @@ static const struct mtk_soc_data rt5350_
|
||||||
.required_clks = MT7628_CLKS_BITMAP,
|
.required_clks = MT7628_CLKS_BITMAP,
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.version = 1,
|
.version = 1,
|
||||||
|
|
|
@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
rxd->rxd5 = 0;
|
rxd->rxd5 = 0;
|
||||||
rxd->rxd6 = 0;
|
rxd->rxd6 = 0;
|
||||||
rxd->rxd7 = 0;
|
rxd->rxd7 = 0;
|
||||||
@@ -3893,7 +3893,7 @@ static int mtk_hw_init(struct mtk_eth *e
|
@@ -3901,7 +3901,7 @@ static int mtk_hw_init(struct mtk_eth *e
|
||||||
else
|
else
|
||||||
mtk_hw_reset(eth);
|
mtk_hw_reset(eth);
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
/* Set FE to PDMAv2 if necessary */
|
/* Set FE to PDMAv2 if necessary */
|
||||||
val = mtk_r32(eth, MTK_FE_GLO_MISC);
|
val = mtk_r32(eth, MTK_FE_GLO_MISC);
|
||||||
mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC);
|
mtk_w32(eth, val | BIT(4), MTK_FE_GLO_MISC);
|
||||||
@@ -5187,11 +5187,11 @@ static const struct mtk_soc_data mt7981_
|
@@ -5195,11 +5195,11 @@ static const struct mtk_soc_data mt7981_
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
},
|
},
|
||||||
.rx = {
|
.rx = {
|
||||||
|
@ -110,7 +110,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5213,11 +5213,11 @@ static const struct mtk_soc_data mt7986_
|
@@ -5221,11 +5221,11 @@ static const struct mtk_soc_data mt7986_
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
},
|
},
|
||||||
.rx = {
|
.rx = {
|
||||||
|
|
|
@ -169,7 +169,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
}
|
}
|
||||||
|
|
||||||
ring->frag_size = mtk_max_frag_size(rx_data_len);
|
ring->frag_size = mtk_max_frag_size(rx_data_len);
|
||||||
@@ -3143,7 +3150,10 @@ static void mtk_dma_free(struct mtk_eth
|
@@ -3151,7 +3158,10 @@ static void mtk_dma_free(struct mtk_eth
|
||||||
mtk_rx_clean(eth, ð->rx_ring[i], false);
|
mtk_rx_clean(eth, ð->rx_ring[i], false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool mtk_hw_reset_check(struct mtk_eth *eth)
|
static bool mtk_hw_reset_check(struct mtk_eth *eth)
|
||||||
@@ -5065,11 +5075,14 @@ static const struct mtk_soc_data mt2701_
|
@@ -5073,11 +5083,14 @@ static const struct mtk_soc_data mt2701_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma),
|
.desc_size = sizeof(struct mtk_tx_dma),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -196,7 +196,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5089,11 +5102,14 @@ static const struct mtk_soc_data mt7621_
|
@@ -5097,11 +5110,14 @@ static const struct mtk_soc_data mt7621_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma),
|
.desc_size = sizeof(struct mtk_tx_dma),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -211,7 +211,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5115,11 +5131,14 @@ static const struct mtk_soc_data mt7622_
|
@@ -5123,11 +5139,14 @@ static const struct mtk_soc_data mt7622_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma),
|
.desc_size = sizeof(struct mtk_tx_dma),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -226,7 +226,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5140,11 +5159,14 @@ static const struct mtk_soc_data mt7623_
|
@@ -5148,11 +5167,14 @@ static const struct mtk_soc_data mt7623_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma),
|
.desc_size = sizeof(struct mtk_tx_dma),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -241,7 +241,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5163,11 +5185,14 @@ static const struct mtk_soc_data mt7629_
|
@@ -5171,11 +5193,14 @@ static const struct mtk_soc_data mt7629_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma),
|
.desc_size = sizeof(struct mtk_tx_dma),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -256,7 +256,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
},
|
},
|
||||||
@@ -5189,6 +5214,8 @@ static const struct mtk_soc_data mt7981_
|
@@ -5197,6 +5222,8 @@ static const struct mtk_soc_data mt7981_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma_v2),
|
.desc_size = sizeof(struct mtk_tx_dma_v2),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
|
@ -265,7 +265,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
.rx = {
|
.rx = {
|
||||||
.desc_size = sizeof(struct mtk_rx_dma),
|
.desc_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -5196,6 +5223,7 @@ static const struct mtk_soc_data mt7981_
|
@@ -5204,6 +5231,7 @@ static const struct mtk_soc_data mt7981_
|
||||||
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -273,7 +273,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5215,6 +5243,8 @@ static const struct mtk_soc_data mt7986_
|
@@ -5223,6 +5251,8 @@ static const struct mtk_soc_data mt7986_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma_v2),
|
.desc_size = sizeof(struct mtk_tx_dma_v2),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
|
@ -282,7 +282,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
.rx = {
|
.rx = {
|
||||||
.desc_size = sizeof(struct mtk_rx_dma),
|
.desc_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -5222,6 +5252,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -5230,6 +5260,7 @@ static const struct mtk_soc_data mt7986_
|
||||||
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -290,7 +290,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5241,6 +5272,8 @@ static const struct mtk_soc_data mt7988_
|
@@ -5249,6 +5280,8 @@ static const struct mtk_soc_data mt7988_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma_v2),
|
.desc_size = sizeof(struct mtk_tx_dma_v2),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
|
@ -299,7 +299,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
.rx = {
|
.rx = {
|
||||||
.desc_size = sizeof(struct mtk_rx_dma_v2),
|
.desc_size = sizeof(struct mtk_rx_dma_v2),
|
||||||
@@ -5248,6 +5281,7 @@ static const struct mtk_soc_data mt7988_
|
@@ -5256,6 +5289,7 @@ static const struct mtk_soc_data mt7988_
|
||||||
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
.dma_l4_valid = RX_DMA_L4_VALID_V2,
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
|
||||||
.dma_len_offset = 8,
|
.dma_len_offset = 8,
|
||||||
|
@ -307,7 +307,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -5262,6 +5296,7 @@ static const struct mtk_soc_data rt5350_
|
@@ -5270,6 +5304,7 @@ static const struct mtk_soc_data rt5350_
|
||||||
.desc_size = sizeof(struct mtk_tx_dma),
|
.desc_size = sizeof(struct mtk_tx_dma),
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
@ -315,7 +315,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
|
||||||
},
|
},
|
||||||
.rx = {
|
.rx = {
|
||||||
.desc_size = sizeof(struct mtk_rx_dma),
|
.desc_size = sizeof(struct mtk_rx_dma),
|
||||||
@@ -5269,6 +5304,7 @@ static const struct mtk_soc_data rt5350_
|
@@ -5277,6 +5312,7 @@ static const struct mtk_soc_data rt5350_
|
||||||
.dma_l4_valid = RX_DMA_L4_VALID_PDMA,
|
.dma_l4_valid = RX_DMA_L4_VALID_PDMA,
|
||||||
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
.dma_max_len = MTK_TX_DMA_BUF_LEN,
|
||||||
.dma_len_offset = 16,
|
.dma_len_offset = 16,
|
||||||
|
|
|
@ -85,7 +85,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
skb_record_rx_queue(skb, 0);
|
skb_record_rx_queue(skb, 0);
|
||||||
napi_gro_receive(napi, skb);
|
napi_gro_receive(napi, skb);
|
||||||
@@ -3280,37 +3291,27 @@ static int mtk_start_dma(struct mtk_eth
|
@@ -3288,37 +3299,27 @@ static int mtk_start_dma(struct mtk_eth
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -134,7 +134,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -3370,7 +3371,10 @@ static int mtk_open(struct net_device *d
|
@@ -3378,7 +3379,10 @@ static int mtk_open(struct net_device *d
|
||||||
{
|
{
|
||||||
struct mtk_mac *mac = netdev_priv(dev);
|
struct mtk_mac *mac = netdev_priv(dev);
|
||||||
struct mtk_eth *eth = mac->hw;
|
struct mtk_eth *eth = mac->hw;
|
||||||
|
@ -146,7 +146,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
|
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -3394,18 +3398,38 @@ static int mtk_open(struct net_device *d
|
@@ -3402,18 +3406,38 @@ static int mtk_open(struct net_device *d
|
||||||
for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
|
for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
|
||||||
mtk_ppe_start(eth->ppe[i]);
|
mtk_ppe_start(eth->ppe[i]);
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
phylink_start(mac->phylink);
|
phylink_start(mac->phylink);
|
||||||
netif_tx_start_all_queues(dev);
|
netif_tx_start_all_queues(dev);
|
||||||
@@ -3482,7 +3506,8 @@ static int mtk_stop(struct net_device *d
|
@@ -3490,7 +3514,8 @@ static int mtk_stop(struct net_device *d
|
||||||
if (!refcount_dec_and_test(ð->dma_refcnt))
|
if (!refcount_dec_and_test(ð->dma_refcnt))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
|
||||||
mtk_rx_irq_disable(eth, eth->soc->rx.irq_done_mask);
|
mtk_rx_irq_disable(eth, eth->soc->rx.irq_done_mask);
|
||||||
@@ -4977,23 +5002,24 @@ static int mtk_probe(struct platform_dev
|
@@ -4985,23 +5010,24 @@ static int mtk_probe(struct platform_dev
|
||||||
}
|
}
|
||||||
|
|
||||||
if (eth->soc->offload_version) {
|
if (eth->soc->offload_version) {
|
||||||
|
@ -233,7 +233,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < MTK_MAX_DEVS; i++) {
|
for (i = 0; i < MTK_MAX_DEVS; i++) {
|
||||||
@@ -5096,6 +5122,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -5104,6 +5130,7 @@ static const struct mtk_soc_data mt7621_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.version = 1,
|
.version = 1,
|
||||||
.offload_version = 1,
|
.offload_version = 1,
|
||||||
|
@ -241,7 +241,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
||||||
.tx = {
|
.tx = {
|
||||||
@@ -5124,6 +5151,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -5132,6 +5159,7 @@ static const struct mtk_soc_data mt7622_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.version = 1,
|
.version = 1,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -249,7 +249,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
||||||
@@ -5152,6 +5180,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -5160,6 +5188,7 @@ static const struct mtk_soc_data mt7623_
|
||||||
.required_pctl = true,
|
.required_pctl = true,
|
||||||
.version = 1,
|
.version = 1,
|
||||||
.offload_version = 1,
|
.offload_version = 1,
|
||||||
|
@ -257,7 +257,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.hash_offset = 2,
|
.hash_offset = 2,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
|
||||||
.disable_pll_modes = true,
|
.disable_pll_modes = true,
|
||||||
@@ -5207,6 +5236,7 @@ static const struct mtk_soc_data mt7981_
|
@@ -5215,6 +5244,7 @@ static const struct mtk_soc_data mt7981_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.version = 2,
|
.version = 2,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -265,7 +265,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
||||||
@@ -5236,6 +5266,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -5244,6 +5274,7 @@ static const struct mtk_soc_data mt7986_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.version = 2,
|
.version = 2,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
@ -273,7 +273,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
.hash_offset = 4,
|
.hash_offset = 4,
|
||||||
.has_accounting = true,
|
.has_accounting = true,
|
||||||
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
|
||||||
@@ -5265,6 +5296,7 @@ static const struct mtk_soc_data mt7988_
|
@@ -5273,6 +5304,7 @@ static const struct mtk_soc_data mt7988_
|
||||||
.required_pctl = false,
|
.required_pctl = false,
|
||||||
.version = 3,
|
.version = 3,
|
||||||
.offload_version = 2,
|
.offload_version = 2,
|
||||||
|
|
|
@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -3400,7 +3400,7 @@ static int mtk_open(struct net_device *d
|
@@ -3408,7 +3408,7 @@ static int mtk_open(struct net_device *d
|
||||||
|
|
||||||
for (i = 0; i < MTK_MAX_DEVS; i++) {
|
for (i = 0; i < MTK_MAX_DEVS; i++) {
|
||||||
if (!eth->netdev[i])
|
if (!eth->netdev[i])
|
||||||
|
|
|
@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -4482,6 +4482,20 @@ static int mtk_set_rxnfc(struct net_devi
|
@@ -4490,6 +4490,20 @@ static int mtk_set_rxnfc(struct net_devi
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
|
static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||||
struct net_device *sb_dev)
|
struct net_device *sb_dev)
|
||||||
{
|
{
|
||||||
@@ -4510,8 +4524,10 @@ static const struct ethtool_ops mtk_etht
|
@@ -4518,8 +4532,10 @@ static const struct ethtool_ops mtk_etht
|
||||||
.get_strings = mtk_get_strings,
|
.get_strings = mtk_get_strings,
|
||||||
.get_sset_count = mtk_get_sset_count,
|
.get_sset_count = mtk_get_sset_count,
|
||||||
.get_ethtool_stats = mtk_get_ethtool_stats,
|
.get_ethtool_stats = mtk_get_ethtool_stats,
|
||||||
|
|
|
@ -39,7 +39,7 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||||
mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK;
|
mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK;
|
||||||
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
|
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
|
||||||
}
|
}
|
||||||
@@ -4496,6 +4506,61 @@ static int mtk_set_pauseparam(struct net
|
@@ -4504,6 +4514,61 @@ static int mtk_set_pauseparam(struct net
|
||||||
return phylink_ethtool_set_pauseparam(mac->phylink, pause);
|
return phylink_ethtool_set_pauseparam(mac->phylink, pause);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||||
static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
|
static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
|
||||||
struct net_device *sb_dev)
|
struct net_device *sb_dev)
|
||||||
{
|
{
|
||||||
@@ -4528,6 +4593,8 @@ static const struct ethtool_ops mtk_etht
|
@@ -4536,6 +4601,8 @@ static const struct ethtool_ops mtk_etht
|
||||||
.set_pauseparam = mtk_set_pauseparam,
|
.set_pauseparam = mtk_set_pauseparam,
|
||||||
.get_rxnfc = mtk_get_rxnfc,
|
.get_rxnfc = mtk_get_rxnfc,
|
||||||
.set_rxnfc = mtk_set_rxnfc,
|
.set_rxnfc = mtk_set_rxnfc,
|
||||||
|
@ -110,7 +110,7 @@ Signed-off-by: Qingfang Deng <dqfext@gmail.com>
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct net_device_ops mtk_netdev_ops = {
|
static const struct net_device_ops mtk_netdev_ops = {
|
||||||
@@ -4588,6 +4655,8 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4596,6 +4663,8 @@ static int mtk_add_mac(struct mtk_eth *e
|
||||||
}
|
}
|
||||||
mac = netdev_priv(eth->netdev[id]);
|
mac = netdev_priv(eth->netdev[id]);
|
||||||
eth->mac[id] = mac;
|
eth->mac[id] = mac;
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
LINUX_VERSION-6.6 = .90
|
LINUX_VERSION-6.6 = .91
|
||||||
LINUX_KERNEL_HASH-6.6.90 = ff856748671629c1fefef219099e0b4b81131c2d325e768cb0806e204157014e
|
LINUX_KERNEL_HASH-6.6.91 = d08d3d175407a52cd0b25fc95e149bbd2fd6922cd37816c8fcfad18f95e254f4
|
||||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -5125,6 +5125,8 @@ static int mtk_probe(struct platform_dev
|
@@ -5133,6 +5133,8 @@ static int mtk_probe(struct platform_dev
|
||||||
* for NAPI to work
|
* for NAPI to work
|
||||||
*/
|
*/
|
||||||
init_dummy_netdev(ð->dummy_dev);
|
init_dummy_netdev(ð->dummy_dev);
|
||||||
|
|
|
@ -1,49 +0,0 @@
|
||||||
From 7d41a5a8e9c91cc6bb011dd953570738583dd091 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Golle <daniel@makrotopia.org>
|
|
||||||
Date: Wed, 18 Sep 2024 02:01:01 +0100
|
|
||||||
Subject: [PATCH] net: ethernet: mtk_eth_soc: reset all TX queues on DMA free
|
|
||||||
|
|
||||||
The purpose of resetting the TX queue is to reset the
|
|
||||||
byte and packet count as well as to clear the software
|
|
||||||
flow control XOFF bit.
|
|
||||||
|
|
||||||
MediaTek developers pointed out that netdev_reset_queue would only
|
|
||||||
resets queue 0 of the network device.
|
|
||||||
Queues that are not reset may cause unexpected issues.
|
|
||||||
|
|
||||||
Packets may stop being sent after reset and "transmit timeout" log may
|
|
||||||
be displayed.
|
|
||||||
|
|
||||||
Import fix from MediaTek's SDK to resolve this issue.
|
|
||||||
|
|
||||||
Signed-off-by: Daniel Golle <daniel@makrotopia.org>
|
|
||||||
---
|
|
||||||
drivers/net/ethernet/mediatek/mtk_eth_soc.c | 18 ++++++++++++++----
|
|
||||||
1 file changed, 14 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
|
||||||
@@ -3149,11 +3149,19 @@ static int mtk_dma_init(struct mtk_eth *
|
|
||||||
static void mtk_dma_free(struct mtk_eth *eth)
|
|
||||||
{
|
|
||||||
const struct mtk_soc_data *soc = eth->soc;
|
|
||||||
- int i;
|
|
||||||
+ int i, j, txqs = 1;
|
|
||||||
+
|
|
||||||
+ if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
|
|
||||||
+ txqs = MTK_QDMA_NUM_QUEUES;
|
|
||||||
+
|
|
||||||
+ for (i = 0; i < MTK_MAX_DEVS; i++) {
|
|
||||||
+ if (!eth->netdev[i])
|
|
||||||
+ continue;
|
|
||||||
+
|
|
||||||
+ for (j = 0; j < txqs; j++)
|
|
||||||
+ netdev_tx_reset_queue(netdev_get_tx_queue(eth->netdev[i], j));
|
|
||||||
+ }
|
|
||||||
|
|
||||||
- for (i = 0; i < MTK_MAX_DEVS; i++)
|
|
||||||
- if (eth->netdev[i])
|
|
||||||
- netdev_reset_queue(eth->netdev[i]);
|
|
||||||
if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) {
|
|
||||||
dma_free_coherent(eth->dma_dev,
|
|
||||||
MTK_QDMA_RING_SIZE * soc->tx.desc_size,
|
|
Loading…
Reference in New Issue