aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/backport-5.15
diff options
context:
space:
mode:
authorRui Salvaterra <rsalvaterra@gmail.com>2022-06-20 10:50:45 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2022-06-27 00:57:16 +0200
commitb55efebb1fe99bae953adb8bd7743a61ffc40fb9 (patch)
treeab4b0ed6496aa7c1af5b18508618e67ad4bfa918 /target/linux/generic/backport-5.15
parent251a382c28854ea68bd46483a58990eafbf671ca (diff)
downloadupstream-b55efebb1fe99bae953adb8bd7743a61ffc40fb9.tar.gz
upstream-b55efebb1fe99bae953adb8bd7743a61ffc40fb9.tar.bz2
upstream-b55efebb1fe99bae953adb8bd7743a61ffc40fb9.zip
kernel: bump 5.15 to 5.15.47
Deleted (upstreamed): generic/backport-5.15/702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch [01] [01] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v5.15.47&id=b24ca1cf846273361d5bd73a35de95a486a54b6d Signed-off-by: Rui Salvaterra <rsalvaterra@gmail.com> [Removed 702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch] Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'target/linux/generic/backport-5.15')
-rw-r--r--target/linux/generic/backport-5.15/401-v5.20-mtd-parsers-add-support-for-Sercomm-partitions.patch2
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch12
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch2
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch6
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch2
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch2
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-19-net-ethernet-mtk_eth_soc-add-txd_size-to-mtk_soc_dat.patch16
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-23-net-ethernet-mtk_eth_soc-add-rxd_size-to-mtk_soc_dat.patch12
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-26-net-ethernet-mtk_eth_soc-introduce-device-register-m.patch42
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-27-net-ethernet-mtk_eth_soc-introduce-MTK_NETSYS_V2-sup.patch30
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-30-net-ethernet-mtk_eth_soc-introduce-support-for-mt798.patch4
-rw-r--r--target/linux/generic/backport-5.15/702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch25
12 files changed, 65 insertions, 90 deletions
diff --git a/target/linux/generic/backport-5.15/401-v5.20-mtd-parsers-add-support-for-Sercomm-partitions.patch b/target/linux/generic/backport-5.15/401-v5.20-mtd-parsers-add-support-for-Sercomm-partitions.patch
index ffc92fe9aa..113a96ad42 100644
--- a/target/linux/generic/backport-5.15/401-v5.20-mtd-parsers-add-support-for-Sercomm-partitions.patch
+++ b/target/linux/generic/backport-5.15/401-v5.20-mtd-parsers-add-support-for-Sercomm-partitions.patch
@@ -41,7 +41,7 @@ Link: https://lore.kernel.org/linux-mtd/20220529110714.189732-1-csharper2005@gma
+ number and location of bad blocks on NAND.
--- a/drivers/mtd/parsers/Makefile
+++ b/drivers/mtd/parsers/Makefile
-@@ -10,6 +10,7 @@ ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)+= ofpart_linksys_ns.o
+@@ -10,6 +10,7 @@ ofpart-$(CONFIG_MTD_OF_PARTS_LINKSYS_NS)
obj-$(CONFIG_MTD_PARSER_IMAGETAG) += parser_imagetag.o
obj-$(CONFIG_MTD_AFS_PARTS) += afs.o
obj-$(CONFIG_MTD_PARSER_TRX) += parser_trx.o
diff --git a/target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch b/target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
index ebecbfb067..eff0ffbe2c 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-00-net-ethernet-mtk_eth_soc-add-support-for-coherent-DM.patch
@@ -196,7 +196,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
ring->dma_size * sizeof(*ring->dma),
ring->dma,
ring->phys);
-@@ -2141,7 +2142,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -2144,7 +2145,7 @@ static void mtk_dma_free(struct mtk_eth
if (eth->netdev[i])
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
@@ -205,7 +205,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
eth->scratch_ring,
eth->phy_scratch_ring);
-@@ -2491,6 +2492,8 @@ static void mtk_dim_tx(struct work_struc
+@@ -2494,6 +2495,8 @@ static void mtk_dim_tx(struct work_struc
static int mtk_hw_init(struct mtk_eth *eth)
{
@@ -214,7 +214,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state))
-@@ -2503,6 +2506,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2506,6 +2509,10 @@ static int mtk_hw_init(struct mtk_eth *e
if (ret)
goto err_disable_pm;
@@ -225,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev);
if (ret) {
-@@ -3056,6 +3063,35 @@ free_netdev:
+@@ -3059,6 +3066,35 @@ free_netdev:
return err;
}
@@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_probe(struct platform_device *pdev)
{
struct device_node *mac_np;
-@@ -3069,6 +3105,7 @@ static int mtk_probe(struct platform_dev
+@@ -3072,6 +3108,7 @@ static int mtk_probe(struct platform_dev
eth->soc = of_device_get_match_data(&pdev->dev);
eth->dev = &pdev->dev;
@@ -269,7 +269,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
eth->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
-@@ -3117,6 +3154,16 @@ static int mtk_probe(struct platform_dev
+@@ -3120,6 +3157,16 @@ static int mtk_probe(struct platform_dev
}
}
diff --git a/target/linux/generic/backport-5.15/702-v5.19-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch b/target/linux/generic/backport-5.15/702-v5.19-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch
index 84642ff146..a15eee6a54 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-02-net-ethernet-mtk_eth_soc-add-support-for-Wireless-Et.patch
@@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_msg_level = -1;
module_param_named(msg_level, mtk_msg_level, int, 0);
-@@ -3186,6 +3187,22 @@ static int mtk_probe(struct platform_dev
+@@ -3189,6 +3190,22 @@ static int mtk_probe(struct platform_dev
}
}
diff --git a/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch b/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch
index 7dbf7a2a26..77205c95ee 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-07-net-ethernet-mtk_eth_soc-allocate-struct-mtk_ppe-sep.patch
@@ -10,7 +10,7 @@ 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
-@@ -2312,7 +2312,7 @@ static int mtk_open(struct net_device *d
+@@ -2315,7 +2315,7 @@ static int mtk_open(struct net_device *d
if (err)
return err;
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
gdm_config = MTK_GDMA_TO_PPE;
mtk_gdm_config(eth, gdm_config);
-@@ -2386,7 +2386,7 @@ static int mtk_stop(struct net_device *d
+@@ -2389,7 +2389,7 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth);
if (eth->soc->offload_version)
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0;
}
-@@ -3278,10 +3278,11 @@ static int mtk_probe(struct platform_dev
+@@ -3281,10 +3281,11 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {
diff --git a/target/linux/generic/backport-5.15/702-v5.19-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch b/target/linux/generic/backport-5.15/702-v5.19-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch
index 4e20525fc9..1e851b347a 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-08-net-ethernet-mtk_eth_soc-rework-hardware-flow-table-.patch
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
(trxd.rxd2 & RX_DMA_VTAG))
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
-@@ -3278,7 +3284,7 @@ static int mtk_probe(struct platform_dev
+@@ -3281,7 +3287,7 @@ static int mtk_probe(struct platform_dev
}
if (eth->soc->offload_version) {
diff --git a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
index 285430d033..dced3eda65 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-13-net-ethernet-mtk_eth_soc-use-standard-property-for-c.patch
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mediatek,hifsys = <&hifsys>;
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3165,7 +3165,7 @@ static int mtk_probe(struct platform_dev
+@@ -3168,7 +3168,7 @@ static int mtk_probe(struct platform_dev
struct regmap *cci;
cci = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
diff --git a/target/linux/generic/backport-5.15/702-v5.19-19-net-ethernet-mtk_eth_soc-add-txd_size-to-mtk_soc_dat.patch b/target/linux/generic/backport-5.15/702-v5.19-19-net-ethernet-mtk_eth_soc-add-txd_size-to-mtk_soc_dat.patch
index d40d177638..b7b5e7c5bb 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-19-net-ethernet-mtk_eth_soc-add-txd_size-to-mtk_soc_dat.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-19-net-ethernet-mtk_eth_soc-add-txd_size-to-mtk_soc_dat.patch
@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
mtk_w32(eth, eth->phy_scratch_ring, MTK_QDMA_FQ_HEAD);
-@@ -2149,6 +2152,7 @@ static int mtk_dma_init(struct mtk_eth *
+@@ -2152,6 +2155,7 @@ static int mtk_dma_init(struct mtk_eth *
static void mtk_dma_free(struct mtk_eth *eth)
{
@@ -73,7 +73,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i;
for (i = 0; i < MTK_MAC_COUNT; i++)
-@@ -2156,9 +2160,8 @@ static void mtk_dma_free(struct mtk_eth
+@@ -2159,9 +2163,8 @@ static void mtk_dma_free(struct mtk_eth
netdev_reset_queue(eth->netdev[i]);
if (eth->scratch_ring) {
dma_free_coherent(eth->dma_dev,
@@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
eth->scratch_ring = NULL;
eth->phy_scratch_ring = 0;
}
-@@ -3368,6 +3371,9 @@ static const struct mtk_soc_data mt2701_
+@@ -3371,6 +3374,9 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true,
@@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7621_data = {
-@@ -3376,6 +3382,9 @@ static const struct mtk_soc_data mt7621_
+@@ -3379,6 +3385,9 @@ static const struct mtk_soc_data mt7621_
.required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false,
.offload_version = 2,
@@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7622_data = {
-@@ -3385,6 +3394,9 @@ static const struct mtk_soc_data mt7622_
+@@ -3388,6 +3397,9 @@ static const struct mtk_soc_data mt7622_
.required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false,
.offload_version = 2,
@@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7623_data = {
-@@ -3393,6 +3405,9 @@ static const struct mtk_soc_data mt7623_
+@@ -3396,6 +3408,9 @@ static const struct mtk_soc_data mt7623_
.required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true,
.offload_version = 2,
@@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data mt7629_data = {
-@@ -3401,6 +3416,9 @@ static const struct mtk_soc_data mt7629_
+@@ -3404,6 +3419,9 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false,
@@ -135,7 +135,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
static const struct mtk_soc_data rt5350_data = {
-@@ -3408,6 +3426,9 @@ static const struct mtk_soc_data rt5350_
+@@ -3411,6 +3429,9 @@ static const struct mtk_soc_data rt5350_
.hw_features = MTK_HW_FEATURES_MT7628,
.required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false,
diff --git a/target/linux/generic/backport-5.15/702-v5.19-23-net-ethernet-mtk_eth_soc-add-rxd_size-to-mtk_soc_dat.patch b/target/linux/generic/backport-5.15/702-v5.19-23-net-ethernet-mtk_eth_soc-add-rxd_size-to-mtk_soc_dat.patch
index 72c14d67b7..2622b2cedc 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-23-net-ethernet-mtk_eth_soc-add-rxd_size-to-mtk_soc_dat.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-23-net-ethernet-mtk_eth_soc-add-rxd_size-to-mtk_soc_dat.patch
@@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ring->dma = NULL;
}
}
-@@ -3383,6 +3382,7 @@ static const struct mtk_soc_data mt2701_
+@@ -3386,6 +3385,7 @@ static const struct mtk_soc_data mt2701_
.required_pctl = true,
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
@@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3394,6 +3394,7 @@ static const struct mtk_soc_data mt7621_
+@@ -3397,6 +3397,7 @@ static const struct mtk_soc_data mt7621_
.offload_version = 2,
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
@@ -50,7 +50,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3406,6 +3407,7 @@ static const struct mtk_soc_data mt7622_
+@@ -3409,6 +3410,7 @@ static const struct mtk_soc_data mt7622_
.offload_version = 2,
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
@@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3417,6 +3419,7 @@ static const struct mtk_soc_data mt7623_
+@@ -3420,6 +3422,7 @@ static const struct mtk_soc_data mt7623_
.offload_version = 2,
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3428,6 +3431,7 @@ static const struct mtk_soc_data mt7629_
+@@ -3431,6 +3434,7 @@ static const struct mtk_soc_data mt7629_
.required_pctl = false,
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
@@ -74,7 +74,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3438,6 +3442,7 @@ static const struct mtk_soc_data rt5350_
+@@ -3441,6 +3445,7 @@ static const struct mtk_soc_data rt5350_
.required_pctl = false,
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
diff --git a/target/linux/generic/backport-5.15/702-v5.19-26-net-ethernet-mtk_eth_soc-introduce-device-register-m.patch b/target/linux/generic/backport-5.15/702-v5.19-26-net-ethernet-mtk_eth_soc-introduce-device-register-m.patch
index 95562328fe..1771d48f61 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-26-net-ethernet-mtk_eth_soc-introduce-device-register-m.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-26-net-ethernet-mtk_eth_soc-introduce-device-register-m.patch
@@ -345,7 +345,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
-@@ -2105,9 +2164,9 @@ static int mtk_dma_busy_wait(struct mtk_
+@@ -2108,9 +2167,9 @@ static int mtk_dma_busy_wait(struct mtk_
u32 val;
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
@@ -357,7 +357,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ret = readx_poll_timeout_atomic(__raw_readl, eth->base + reg, val,
!(val & (MTK_RX_DMA_BUSY | MTK_TX_DMA_BUSY)),
-@@ -2165,8 +2224,8 @@ static int mtk_dma_init(struct mtk_eth *
+@@ -2168,8 +2227,8 @@ static int mtk_dma_init(struct mtk_eth *
* automatically
*/
mtk_w32(eth, FC_THRES_DROP_MODE | FC_THRES_DROP_EN |
@@ -368,7 +368,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
-@@ -2240,13 +2299,14 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -2243,13 +2302,14 @@ static irqreturn_t mtk_handle_irq_tx(int
static irqreturn_t mtk_handle_irq(int irq, void *_eth)
{
struct mtk_eth *eth = _eth;
@@ -387,7 +387,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_handle_irq_tx(irq, _eth);
}
-@@ -2270,6 +2330,7 @@ static void mtk_poll_controller(struct n
+@@ -2273,6 +2333,7 @@ static void mtk_poll_controller(struct n
static int mtk_start_dma(struct mtk_eth *eth)
{
u32 rx_2b_offset = (NET_IP_ALIGN == 2) ? MTK_RX_2B_OFFSET : 0;
@@ -395,7 +395,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int err;
err = mtk_dma_init(eth);
-@@ -2284,16 +2345,15 @@ static int mtk_start_dma(struct mtk_eth
+@@ -2287,16 +2348,15 @@ static int mtk_start_dma(struct mtk_eth
MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
MTK_RX_DMA_EN | MTK_RX_2B_OFFSET |
MTK_RX_BT_32DWORDS,
@@ -415,7 +415,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return 0;
-@@ -2417,8 +2477,8 @@ static int mtk_stop(struct net_device *d
+@@ -2420,8 +2480,8 @@ static int mtk_stop(struct net_device *d
cancel_work_sync(&eth->tx_dim.work);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA))
@@ -426,7 +426,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_dma_free(eth);
-@@ -2472,6 +2532,7 @@ static void mtk_dim_rx(struct work_struc
+@@ -2475,6 +2535,7 @@ static void mtk_dim_rx(struct work_struc
{
struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim);
@@ -434,7 +434,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct dim_cq_moder cur_profile;
u32 val, cur;
-@@ -2479,7 +2540,7 @@ static void mtk_dim_rx(struct work_struc
+@@ -2482,7 +2543,7 @@ static void mtk_dim_rx(struct work_struc
dim->profile_ix);
spin_lock_bh(&eth->dim_lock);
@@ -443,7 +443,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val &= MTK_PDMA_DELAY_TX_MASK;
val |= MTK_PDMA_DELAY_RX_EN;
-@@ -2489,9 +2550,9 @@ static void mtk_dim_rx(struct work_struc
+@@ -2492,9 +2553,9 @@ static void mtk_dim_rx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_RX_PINT_SHIFT;
@@ -455,7 +455,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
spin_unlock_bh(&eth->dim_lock);
-@@ -2502,6 +2563,7 @@ static void mtk_dim_tx(struct work_struc
+@@ -2505,6 +2566,7 @@ static void mtk_dim_tx(struct work_struc
{
struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim);
@@ -463,7 +463,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct dim_cq_moder cur_profile;
u32 val, cur;
-@@ -2509,7 +2571,7 @@ static void mtk_dim_tx(struct work_struc
+@@ -2512,7 +2574,7 @@ static void mtk_dim_tx(struct work_struc
dim->profile_ix);
spin_lock_bh(&eth->dim_lock);
@@ -472,7 +472,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
val &= MTK_PDMA_DELAY_RX_MASK;
val |= MTK_PDMA_DELAY_TX_EN;
-@@ -2519,9 +2581,9 @@ static void mtk_dim_tx(struct work_struc
+@@ -2522,9 +2584,9 @@ static void mtk_dim_tx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_TX_PINT_SHIFT;
@@ -484,7 +484,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
spin_unlock_bh(&eth->dim_lock);
-@@ -2532,6 +2594,7 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2535,6 +2597,7 @@ static int mtk_hw_init(struct mtk_eth *e
{
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE;
@@ -492,7 +492,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state))
-@@ -2606,10 +2669,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2609,10 +2672,10 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_rx_irq_disable(eth, ~0);
/* FE int grouping */
@@ -507,7 +507,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
return 0;
-@@ -3148,14 +3211,6 @@ static int mtk_probe(struct platform_dev
+@@ -3151,14 +3214,6 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
@@ -522,7 +522,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
eth->ip_align = NET_IP_ALIGN;
-@@ -3389,6 +3444,7 @@ static int mtk_remove(struct platform_de
+@@ -3392,6 +3447,7 @@ static int mtk_remove(struct platform_de
}
static const struct mtk_soc_data mt2701_data = {
@@ -530,7 +530,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
-@@ -3400,6 +3456,7 @@ static const struct mtk_soc_data mt2701_
+@@ -3403,6 +3459,7 @@ static const struct mtk_soc_data mt2701_
};
static const struct mtk_soc_data mt7621_data = {
@@ -538,7 +538,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7621_CAPS,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP,
-@@ -3412,6 +3469,7 @@ static const struct mtk_soc_data mt7621_
+@@ -3415,6 +3472,7 @@ static const struct mtk_soc_data mt7621_
};
static const struct mtk_soc_data mt7622_data = {
@@ -546,7 +546,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x2028,
.caps = MT7622_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
-@@ -3425,6 +3483,7 @@ static const struct mtk_soc_data mt7622_
+@@ -3428,6 +3486,7 @@ static const struct mtk_soc_data mt7622_
};
static const struct mtk_soc_data mt7623_data = {
@@ -554,7 +554,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP,
-@@ -3437,6 +3496,7 @@ static const struct mtk_soc_data mt7623_
+@@ -3440,6 +3499,7 @@ static const struct mtk_soc_data mt7623_
};
static const struct mtk_soc_data mt7629_data = {
@@ -562,7 +562,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x128,
.caps = MT7629_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES,
-@@ -3449,6 +3509,7 @@ static const struct mtk_soc_data mt7629_
+@@ -3452,6 +3512,7 @@ static const struct mtk_soc_data mt7629_
};
static const struct mtk_soc_data rt5350_data = {
diff --git a/target/linux/generic/backport-5.15/702-v5.19-27-net-ethernet-mtk_eth_soc-introduce-MTK_NETSYS_V2-sup.patch b/target/linux/generic/backport-5.15/702-v5.19-27-net-ethernet-mtk_eth_soc-introduce-MTK_NETSYS_V2-sup.patch
index 5780ee9029..ebc9fee9e4 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-27-net-ethernet-mtk_eth_soc-introduce-MTK_NETSYS_V2-sup.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-27-net-ethernet-mtk_eth_soc-introduce-MTK_NETSYS_V2-sup.patch
@@ -403,7 +403,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
}
-@@ -2277,7 +2385,7 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -2280,7 +2388,7 @@ static irqreturn_t mtk_handle_irq_rx(int
eth->rx_events++;
if (likely(napi_schedule_prep(&eth->rx_napi))) {
__napi_schedule(&eth->rx_napi);
@@ -412,7 +412,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}
return IRQ_HANDLED;
-@@ -2301,8 +2409,10 @@ static irqreturn_t mtk_handle_irq(int ir
+@@ -2304,8 +2412,10 @@ static irqreturn_t mtk_handle_irq(int ir
struct mtk_eth *eth = _eth;
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
@@ -425,7 +425,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_handle_irq_rx(irq, _eth);
}
if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
-@@ -2320,16 +2430,16 @@ static void mtk_poll_controller(struct n
+@@ -2323,16 +2433,16 @@ static void mtk_poll_controller(struct n
struct mtk_eth *eth = mac->hw;
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -445,7 +445,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
const struct mtk_reg_map *reg_map = eth->soc->reg_map;
int err;
-@@ -2340,12 +2450,19 @@ static int mtk_start_dma(struct mtk_eth
+@@ -2343,12 +2453,19 @@ static int mtk_start_dma(struct mtk_eth
}
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) {
@@ -471,7 +471,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth,
MTK_RX_DMA_EN | rx_2b_offset |
MTK_RX_BT_32DWORDS | MTK_MULTI_EN,
-@@ -2417,7 +2534,7 @@ static int mtk_open(struct net_device *d
+@@ -2420,7 +2537,7 @@ static int mtk_open(struct net_device *d
napi_enable(&eth->tx_napi);
napi_enable(&eth->rx_napi);
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
@@ -480,7 +480,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
refcount_set(&eth->dma_refcnt, 1);
}
else
-@@ -2469,7 +2586,7 @@ static int mtk_stop(struct net_device *d
+@@ -2472,7 +2589,7 @@ static int mtk_stop(struct net_device *d
mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
napi_disable(&eth->tx_napi);
napi_disable(&eth->rx_napi);
-@@ -2629,9 +2746,25 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2632,9 +2749,25 @@ static int mtk_hw_init(struct mtk_eth *e
return 0;
}
@@ -518,7 +518,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (eth->pctl) {
/* Set GE2 driving and slew rate */
-@@ -2670,11 +2803,47 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -2673,11 +2806,47 @@ static int mtk_hw_init(struct mtk_eth *e
/* FE int grouping */
mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
@@ -568,7 +568,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0;
err_disable_pm:
-@@ -3211,12 +3380,8 @@ static int mtk_probe(struct platform_dev
+@@ -3214,12 +3383,8 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base))
return PTR_ERR(eth->base);
@@ -582,7 +582,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
spin_lock_init(&eth->page_lock);
spin_lock_init(&eth->tx_irq_lock);
-@@ -3452,6 +3617,10 @@ static const struct mtk_soc_data mt2701_
+@@ -3455,6 +3620,10 @@ static const struct mtk_soc_data mt2701_
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -593,7 +593,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3465,6 +3634,10 @@ static const struct mtk_soc_data mt7621_
+@@ -3468,6 +3637,10 @@ static const struct mtk_soc_data mt7621_
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -604,7 +604,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3479,6 +3652,10 @@ static const struct mtk_soc_data mt7622_
+@@ -3482,6 +3655,10 @@ static const struct mtk_soc_data mt7622_
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -615,7 +615,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3492,6 +3669,10 @@ static const struct mtk_soc_data mt7623_
+@@ -3495,6 +3672,10 @@ static const struct mtk_soc_data mt7623_
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -626,7 +626,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3505,6 +3686,10 @@ static const struct mtk_soc_data mt7629_
+@@ -3508,6 +3689,10 @@ static const struct mtk_soc_data mt7629_
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
@@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
},
};
-@@ -3517,6 +3702,10 @@ static const struct mtk_soc_data rt5350_
+@@ -3520,6 +3705,10 @@ static const struct mtk_soc_data rt5350_
.txrx = {
.txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma),
diff --git a/target/linux/generic/backport-5.15/702-v5.19-30-net-ethernet-mtk_eth_soc-introduce-support-for-mt798.patch b/target/linux/generic/backport-5.15/702-v5.19-30-net-ethernet-mtk_eth_soc-introduce-support-for-mt798.patch
index ed4b7abb2c..c9eb133f13 100644
--- a/target/linux/generic/backport-5.15/702-v5.19-30-net-ethernet-mtk_eth_soc-introduce-support-for-mt798.patch
+++ b/target/linux/generic/backport-5.15/702-v5.19-30-net-ethernet-mtk_eth_soc-introduce-support-for-mt798.patch
@@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
};
void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
-@@ -3689,6 +3726,21 @@ static const struct mtk_soc_data mt7629_
+@@ -3692,6 +3729,21 @@ static const struct mtk_soc_data mt7629_
},
};
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static const struct mtk_soc_data rt5350_data = {
.reg_map = &mt7628_reg_map,
.caps = MT7628_CAPS,
-@@ -3711,6 +3763,7 @@ const struct of_device_id of_mtk_match[]
+@@ -3714,6 +3766,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
diff --git a/target/linux/generic/backport-5.15/702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch b/target/linux/generic/backport-5.15/702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch
deleted file mode 100644
index e3250e9284..0000000000
--- a/target/linux/generic/backport-5.15/702-v5.19-32-net-ethernet-mtk_eth_soc-out-of-bounds-read-in-mtk_h.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Dan Carpenter <dan.carpenter@oracle.com>
-Date: Thu, 26 May 2022 11:02:42 +0300
-Subject: [PATCH] net: ethernet: mtk_eth_soc: out of bounds read in
- mtk_hwlro_get_fdir_entry()
-
-The "fsp->location" variable comes from user via ethtool_get_rxnfc().
-Check that it is valid to prevent an out of bounds read.
-
-Fixes: 7aab747e5563 ("net: ethernet: mediatek: add ethtool functions to configure RX flows of HW LRO")
-Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
----
-
---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2230,6 +2230,9 @@ static int mtk_hwlro_get_fdir_entry(stru
- struct ethtool_rx_flow_spec *fsp =
- (struct ethtool_rx_flow_spec *)&cmd->fs;
-
-+ if (fsp->location >= ARRAY_SIZE(mac->hwlro_ip))
-+ return -EINVAL;
-+
- /* only tcp dst ipv4 is meaningful, others are meaningless */
- fsp->flow_type = TCP_V4_FLOW;
- fsp->h_u.tcp_ip4_spec.ip4dst = ntohl(mac->hwlro_ip[fsp->location]);