mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
Add test z8102ax kernel 6.6 support
This commit is contained in:
parent
65865c9314
commit
f70b1a24cc
82 changed files with 10630 additions and 94 deletions
|
|
@ -6824,6 +6824,7 @@ CONFIG_TEXTSEARCH=y
|
|||
# CONFIG_THERMAL_DEFAULT_GOV_FAIR_SHARE is not set
|
||||
# CONFIG_THERMAL_DEFAULT_GOV_POWER_ALLOCATOR is not set
|
||||
# CONFIG_THERMAL_DEFAULT_GOV_USER_SPACE is not set
|
||||
# CONFIG_THERMAL_DEFAULT_GOV_BANG_BANG is not set
|
||||
# CONFIG_THERMAL_EMULATION is not set
|
||||
# CONFIG_THERMAL_GOV_BANG_BANG is not set
|
||||
# CONFIG_THERMAL_GOV_FAIR_SHARE is not set
|
||||
|
|
@ -8126,3 +8127,24 @@ CONFIG_DEBUG_INFO_COMPRESSED_NONE=y
|
|||
# CONFIG_TEST_DHRY is not set
|
||||
# CONFIG_DEBUG_CGROUP_REF is not set
|
||||
# CONFIG_USER_EVENTS is not set
|
||||
# CONFIG_CHARGER_RT9467 is not set
|
||||
# CONFIG_CHARGER_RT9471 is not set
|
||||
# CONFIG_XILINX_WINDOW_WATCHDOG is not set
|
||||
# CONFIG_MFD_MAX5970 is not set
|
||||
# CONFIG_MFD_TPS65219 is not set
|
||||
# CONFIG_REGULATOR_AW37503 is not set
|
||||
# CONFIG_REGULATOR_MAX77857 is not set
|
||||
# CONFIG_REGULATOR_MAX20411 is not set
|
||||
# CONFIG_REGULATOR_RAA215300 is not set
|
||||
# CONFIG_REGULATOR_RT4803 is not set
|
||||
# CONFIG_REGULATOR_RT5739 is not set
|
||||
# CONFIG_REGULATOR_RT6190 is not set
|
||||
# CONFIG_REGULATOR_RTQ2208 is not set
|
||||
# CONFIG_REGULATOR_TPS6287X is not set
|
||||
# CONFIG_LEDS_LM3697 is not set
|
||||
# CONFIG_LEDS_GROUP_MULTICOLOR is not set
|
||||
# CONFIG_COMMON_CLK_SI521XX is not set
|
||||
# CONFIG_COMMON_CLK_VC3 is not set
|
||||
# CONFIG_CDX_BUS is not set
|
||||
# CONFIG_CRYPTO_SM4_ARM64_CE_CCM is not set
|
||||
# CONFIG_CRYPTO_SM4_ARM64_CE_GCM is not set
|
||||
|
|
|
|||
|
|
@ -1,94 +0,0 @@
|
|||
From: Felix Fietkau <nbd@nbd.name>
|
||||
Date: Thu, 3 Nov 2022 12:38:49 +0100
|
||||
Subject: [PATCH] net: ethernet: mtk_eth_soc: work around issue with sending
|
||||
small fragments
|
||||
|
||||
When lots of frames are sent with a number of very small fragments, an
|
||||
internal FIFO can overflow, causing the DMA engine to lock up lock up and
|
||||
transmit attempts time out.
|
||||
|
||||
Fix this on MT7986 by increasing the reserved FIFO space.
|
||||
Fix this on older chips by detecting the presence of small fragments and use
|
||||
skb_gso_segment + skb_linearize to deal with them.
|
||||
|
||||
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||
---
|
||||
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||
@@ -1562,12 +1562,28 @@ static void mtk_wake_queue(struct mtk_et
|
||||
}
|
||||
}
|
||||
|
||||
+static bool mtk_skb_has_small_frag(struct sk_buff *skb)
|
||||
+{
|
||||
+ int min_size = 16;
|
||||
+ int i;
|
||||
+
|
||||
+ if (skb_headlen(skb) < min_size)
|
||||
+ return true;
|
||||
+
|
||||
+ for (i = 0; i < skb_shinfo(skb)->nr_frags; i++)
|
||||
+ if (skb_frag_size(&skb_shinfo(skb)->frags[i]) < min_size)
|
||||
+ return true;
|
||||
+
|
||||
+ return false;
|
||||
+}
|
||||
+
|
||||
static netdev_tx_t mtk_start_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
{
|
||||
struct mtk_mac *mac = netdev_priv(dev);
|
||||
struct mtk_eth *eth = mac->hw;
|
||||
struct mtk_tx_ring *ring = ð->tx_ring;
|
||||
struct net_device_stats *stats = &dev->stats;
|
||||
+ struct sk_buff *segs, *next;
|
||||
bool gso = false;
|
||||
int tx_num;
|
||||
|
||||
@@ -1589,6 +1605,18 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
return NETDEV_TX_BUSY;
|
||||
}
|
||||
|
||||
+ if (mtk_is_netsys_v1(eth) &&
|
||||
+ skb_is_gso(skb) && mtk_skb_has_small_frag(skb)) {
|
||||
+ segs = skb_gso_segment(skb, dev->features & ~NETIF_F_ALL_TSO);
|
||||
+ if (IS_ERR(segs))
|
||||
+ goto drop;
|
||||
+
|
||||
+ if (segs) {
|
||||
+ consume_skb(skb);
|
||||
+ skb = segs;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/* TSO: fill MSS info in tcp checksum field */
|
||||
if (skb_is_gso(skb)) {
|
||||
if (skb_cow_head(skb, 0)) {
|
||||
@@ -1604,8 +1632,14 @@ static netdev_tx_t mtk_start_xmit(struct
|
||||
}
|
||||
}
|
||||
|
||||
- if (mtk_tx_map(skb, dev, tx_num, ring, gso) < 0)
|
||||
- goto drop;
|
||||
+ skb_list_walk_safe(skb, skb, next) {
|
||||
+ if ((mtk_is_netsys_v1(eth) &&
|
||||
+ mtk_skb_has_small_frag(skb) && skb_linearize(skb)) ||
|
||||
+ mtk_tx_map(skb, dev, tx_num, ring, gso) < 0) {
|
||||
+ stats->tx_dropped++;
|
||||
+ dev_kfree_skb_any(skb);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
|
||||
netif_tx_stop_all_queues(dev);
|
||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
|
||||
@@ -268,7 +268,7 @@
|
||||
#define MTK_CHK_DDONE_EN BIT(28)
|
||||
#define MTK_DMAD_WR_WDONE BIT(26)
|
||||
#define MTK_WCOMP_EN BIT(24)
|
||||
-#define MTK_RESV_BUF (0x40 << 16)
|
||||
+#define MTK_RESV_BUF (0x80 << 16)
|
||||
#define MTK_MUTLI_CNT (0x4 << 12)
|
||||
#define MTK_LEAKY_BUCKET_EN BIT(11)
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue