kernel: bump 5.15 to 5.15.81 (#10554)

* kernel: bump 5.15 to 5.15.81

Manually rebased:
	backport-5.15/715-v6.0-net-ethernet-mtk_eth_soc-add-the-capability-to-run-m.patch
	hack-5.15/645-netfilter-connmark-introduce-set-dscpmark.patch[1]

All other patches automatically rebased

Signed-off-by: John Audia <therealgraysky@proton.me>
Co-authored-by: John Audia <therealgraysky@proton.me>
This commit is contained in:
lovehackintosh 2022-12-06 15:01:21 +08:00 committed by GitHub
parent 456cf0c5b3
commit a653ef540f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
62 changed files with 197 additions and 199 deletions

View File

@ -1,2 +1,2 @@
LINUX_VERSION-5.15 = .80 LINUX_VERSION-5.15 = .81
LINUX_KERNEL_HASH-5.15.80 = 3b321a6466d2021f60ed8d4e33bba21db2f23efc2ddd2d9fb775393d9afdfd4d LINUX_KERNEL_HASH-5.15.81 = 8f885cdebd754d6e63b920cf6c3e5713e91bbf5f52e9d99eb0054ef7e8f096ab

View File

@ -1,7 +1,7 @@
index 85a3750..9fac9b1 100644 index 85a3750..9fac9b1 100644
--- a/defaults.c --- a/defaults.c
+++ b/defaults.c +++ b/defaults.c
@@ -46,7 +46,9 @@ const struct fw3_option fw3_flag_opts[] = { @@ -48,7 +48,9 @@ const struct fw3_option fw3_flag_opts[]
FW3_OPT("synflood_protect", bool, defaults, syn_flood), FW3_OPT("synflood_protect", bool, defaults, syn_flood),
FW3_OPT("synflood_rate", limit, defaults, syn_flood_rate), FW3_OPT("synflood_rate", limit, defaults, syn_flood_rate),
FW3_OPT("synflood_burst", int, defaults, syn_flood_rate.burst), FW3_OPT("synflood_burst", int, defaults, syn_flood_rate.burst),
@ -12,23 +12,19 @@ index 85a3750..9fac9b1 100644
FW3_OPT("tcp_syncookies", bool, defaults, tcp_syncookies), FW3_OPT("tcp_syncookies", bool, defaults, tcp_syncookies),
FW3_OPT("tcp_ecn", int, defaults, tcp_ecn), FW3_OPT("tcp_ecn", int, defaults, tcp_ecn),
FW3_OPT("tcp_window_scaling", bool, defaults, tcp_window_scaling), FW3_OPT("tcp_window_scaling", bool, defaults, tcp_window_scaling),
diff --git a/options.h b/options.h
index 6edd174..c02eb97 100644
--- a/options.h --- a/options.h
+++ b/options.h +++ b/options.h
@@ -267,6 +267,7 @@ struct fw3_defaults @@ -297,6 +297,7 @@ struct fw3_defaults
bool drop_invalid; enum fw3_reject_code any_reject_code;
bool syn_flood; bool syn_flood;
+ bool fullcone; + bool fullcone;
struct fw3_limit syn_flood_rate; struct fw3_limit syn_flood_rate;
bool tcp_syncookies; bool tcp_syncookies;
diff --git a/zones.c b/zones.c
index 2aa7473..57eead0 100644
--- a/zones.c --- a/zones.c
+++ b/zones.c +++ b/zones.c
@@ -627,6 +627,7 @@ print_zone_rule(struct fw3_ipt_handle *h @@ -670,6 +670,7 @@ print_zone_rule(struct fw3_ipt_handle *h
struct fw3_address *msrc; struct fw3_address *msrc;
struct fw3_address *mdest; struct fw3_address *mdest;
struct fw3_ipt_rule *r; struct fw3_ipt_rule *r;
@ -36,7 +32,7 @@ index 2aa7473..57eead0 100644
if (!fw3_is_family(zone, handle->family)) if (!fw3_is_family(zone, handle->family))
return; return;
@@ -712,8 +713,22 @@ print_zone_rule(struct fw3_ipt_handle *h @@ -755,8 +756,22 @@ print_zone_rule(struct fw3_ipt_handle *h
{ {
r = fw3_ipt_rule_new(handle); r = fw3_ipt_rule_new(handle);
fw3_ipt_rule_src_dest(r, msrc, mdest); fw3_ipt_rule_src_dest(r, msrc, mdest);

View File

@ -258,7 +258,7 @@ SVN-Revision: 35130
#include <linux/uaccess.h> #include <linux/uaccess.h>
#include <linux/ipv6.h> #include <linux/ipv6.h>
#include <linux/icmpv6.h> #include <linux/icmpv6.h>
@@ -941,10 +942,10 @@ static void tcp_v6_send_response(const s @@ -943,10 +944,10 @@ static void tcp_v6_send_response(const s
topt = (__be32 *)(t1 + 1); topt = (__be32 *)(t1 + 1);
if (tsecr) { if (tsecr) {

View File

@ -22,6 +22,6 @@ Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
QUIRK_FLAG_GENERIC_IMPLICIT_FB), QUIRK_FLAG_GENERIC_IMPLICIT_FB),
+ DEVICE_FLG(0x09da, 0x2695, /* A4Tech FHD 1080p webcam */ + DEVICE_FLG(0x09da, 0x2695, /* A4Tech FHD 1080p webcam */
+ QUIRK_FLAG_DISABLE_AUTOSUSPEND | QUIRK_FLAG_GET_SAMPLE_RATE), + QUIRK_FLAG_DISABLE_AUTOSUSPEND | QUIRK_FLAG_GET_SAMPLE_RATE),
DEVICE_FLG(0x0525, 0xa4ad, /* Hamedal C20 usb camero */
QUIRK_FLAG_IFACE_SKIP_CLOSE),
/* Vendor matches */
VENDOR_FLG(0x045e, /* MS Lifecam */

View File

@ -119,7 +119,7 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04
/* /*
* Determine how aggressively the anon and file LRU lists should be * Determine how aggressively the anon and file LRU lists should be
* scanned. The relative value of each set of LRU lists is determined * scanned. The relative value of each set of LRU lists is determined
@@ -3032,7 +3129,6 @@ static void shrink_node(pg_data_t *pgdat @@ -3030,7 +3127,6 @@ static void shrink_node(pg_data_t *pgdat
unsigned long nr_reclaimed, nr_scanned; unsigned long nr_reclaimed, nr_scanned;
struct lruvec *target_lruvec; struct lruvec *target_lruvec;
bool reclaimable = false; bool reclaimable = false;
@ -127,7 +127,7 @@ Change-Id: Iae734b5b4030205b7db6e8c841f747b6f6ae1a04
target_lruvec = mem_cgroup_lruvec(sc->target_mem_cgroup, pgdat); target_lruvec = mem_cgroup_lruvec(sc->target_mem_cgroup, pgdat);
@@ -3048,93 +3144,7 @@ again: @@ -3046,93 +3142,7 @@ again:
nr_reclaimed = sc->nr_reclaimed; nr_reclaimed = sc->nr_reclaimed;
nr_scanned = sc->nr_scanned; nr_scanned = sc->nr_scanned;

View File

@ -1162,7 +1162,7 @@ Change-Id: I3ae8abc3100d023cecb3a699d86020ae6fc10a45
#endif /* CONFIG_LRU_GEN */ #endif /* CONFIG_LRU_GEN */
static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
@@ -4333,6 +5276,11 @@ static void age_active_anon(struct pglis @@ -4331,6 +5274,11 @@ static void age_active_anon(struct pglis
struct mem_cgroup *memcg; struct mem_cgroup *memcg;
struct lruvec *lruvec; struct lruvec *lruvec;

View File

@ -821,8 +821,8 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc) static void shrink_lruvec(struct lruvec *lruvec, struct scan_control *sc)
@@ -4433,6 +4978,11 @@ static void shrink_lruvec(struct lruvec @@ -4433,6 +4978,11 @@ static void shrink_lruvec(struct lruvec
bool proportional_reclaim;
struct blk_plug plug; struct blk_plug plug;
bool scan_adjusted;
+ if (lru_gen_enabled()) { + if (lru_gen_enabled()) {
+ lru_gen_shrink_lruvec(lruvec, sc); + lru_gen_shrink_lruvec(lruvec, sc);
@ -832,7 +832,7 @@ Change-Id: I64c06d8f2cdb83ac7d56c7e1d07f043483956cac
get_scan_count(lruvec, sc, nr); get_scan_count(lruvec, sc, nr);
/* Record the original scan target for proportional adjustments later */ /* Record the original scan target for proportional adjustments later */
@@ -4906,6 +5456,9 @@ static void snapshot_refaults(struct mem @@ -4904,6 +5454,9 @@ static void snapshot_refaults(struct mem
struct lruvec *target_lruvec; struct lruvec *target_lruvec;
unsigned long refaults; unsigned long refaults;

View File

@ -205,7 +205,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
MTK_DMA_SIZE * sizeof(struct mtk_tx_dma), MTK_DMA_SIZE * sizeof(struct mtk_tx_dma),
eth->scratch_ring, eth->scratch_ring,
eth->phy_scratch_ring); eth->phy_scratch_ring);
@@ -2511,6 +2512,8 @@ static void mtk_dim_tx(struct work_struc @@ -2513,6 +2514,8 @@ static void mtk_dim_tx(struct work_struc
static int mtk_hw_init(struct mtk_eth *eth) 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; int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state)) if (test_and_set_bit(MTK_HW_INIT, &eth->state))
@@ -2523,6 +2526,10 @@ static int mtk_hw_init(struct mtk_eth *e @@ -2525,6 +2528,10 @@ static int mtk_hw_init(struct mtk_eth *e
if (ret) if (ret)
goto err_disable_pm; 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)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
ret = device_reset(eth->dev); ret = device_reset(eth->dev);
if (ret) { if (ret) {
@@ -3076,6 +3083,35 @@ free_netdev: @@ -3078,6 +3085,35 @@ free_netdev:
return err; return err;
} }
@ -261,7 +261,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
struct device_node *mac_np; struct device_node *mac_np;
@@ -3089,6 +3125,7 @@ static int mtk_probe(struct platform_dev @@ -3091,6 +3127,7 @@ static int mtk_probe(struct platform_dev
eth->soc = of_device_get_match_data(&pdev->dev); eth->soc = of_device_get_match_data(&pdev->dev);
eth->dev = &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); eth->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(eth->base)) if (IS_ERR(eth->base))
return PTR_ERR(eth->base); return PTR_ERR(eth->base);
@@ -3137,6 +3174,16 @@ static int mtk_probe(struct platform_dev @@ -3139,6 +3176,16 @@ static int mtk_probe(struct platform_dev
} }
} }

View File

@ -56,7 +56,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_msg_level = -1; static int mtk_msg_level = -1;
module_param_named(msg_level, mtk_msg_level, int, 0); module_param_named(msg_level, mtk_msg_level, int, 0);
@@ -3206,6 +3207,22 @@ static int mtk_probe(struct platform_dev @@ -3208,6 +3209,22 @@ static int mtk_probe(struct platform_dev
} }
} }

View File

@ -10,16 +10,16 @@ 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
@@ -2332,7 +2332,7 @@ static int mtk_open(struct net_device *d @@ -2334,7 +2334,7 @@ static int mtk_open(struct net_device *d
if (err)
return err; return err;
}
- if (eth->soc->offload_version && mtk_ppe_start(&eth->ppe) == 0) - if (eth->soc->offload_version && mtk_ppe_start(&eth->ppe) == 0)
+ if (eth->soc->offload_version && mtk_ppe_start(eth->ppe) == 0) + if (eth->soc->offload_version && mtk_ppe_start(eth->ppe) == 0)
gdm_config = MTK_GDMA_TO_PPE; gdm_config = MTK_GDMA_TO_PPE;
mtk_gdm_config(eth, gdm_config); mtk_gdm_config(eth, gdm_config);
@@ -2406,7 +2406,7 @@ static int mtk_stop(struct net_device *d @@ -2408,7 +2408,7 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth); mtk_dma_free(eth);
if (eth->soc->offload_version) if (eth->soc->offload_version)
@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3298,10 +3298,11 @@ static int mtk_probe(struct platform_dev @@ -3300,10 +3300,11 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {

View File

@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX && if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX &&
(trxd.rxd2 & RX_DMA_VTAG)) (trxd.rxd2 & RX_DMA_VTAG))
__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q), __vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
@@ -3298,7 +3304,7 @@ static int mtk_probe(struct platform_dev @@ -3300,7 +3306,7 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {

View File

@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mediatek,hifsys = <&hifsys>; mediatek,hifsys = <&hifsys>;
--- 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
@@ -3185,7 +3185,7 @@ static int mtk_probe(struct platform_dev @@ -3187,7 +3187,7 @@ static int mtk_probe(struct platform_dev
struct regmap *cci; struct regmap *cci;
cci = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, cci = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,

View File

@ -85,7 +85,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
eth->scratch_ring = NULL; eth->scratch_ring = NULL;
eth->phy_scratch_ring = 0; eth->phy_scratch_ring = 0;
} }
@@ -3388,6 +3391,9 @@ static const struct mtk_soc_data mt2701_ @@ -3390,6 +3393,9 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
@ -95,7 +95,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7621_data = { static const struct mtk_soc_data mt7621_data = {
@@ -3396,6 +3402,9 @@ static const struct mtk_soc_data mt7621_ @@ -3398,6 +3404,9 @@ static const struct mtk_soc_data mt7621_
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -105,7 +105,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7622_data = { static const struct mtk_soc_data mt7622_data = {
@@ -3405,6 +3414,9 @@ static const struct mtk_soc_data mt7622_ @@ -3407,6 +3416,9 @@ static const struct mtk_soc_data mt7622_
.required_clks = MT7622_CLKS_BITMAP, .required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -115,7 +115,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7623_data = { static const struct mtk_soc_data mt7623_data = {
@@ -3413,6 +3425,9 @@ static const struct mtk_soc_data mt7623_ @@ -3415,6 +3427,9 @@ static const struct mtk_soc_data mt7623_
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
@ -125,7 +125,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data mt7629_data = { static const struct mtk_soc_data mt7629_data = {
@@ -3421,6 +3436,9 @@ static const struct mtk_soc_data mt7629_ @@ -3423,6 +3438,9 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -135,7 +135,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
static const struct mtk_soc_data rt5350_data = { static const struct mtk_soc_data rt5350_data = {
@@ -3428,6 +3446,9 @@ static const struct mtk_soc_data rt5350_ @@ -3430,6 +3448,9 @@ static const struct mtk_soc_data rt5350_
.hw_features = MTK_HW_FEATURES_MT7628, .hw_features = MTK_HW_FEATURES_MT7628,
.required_clks = MT7628_CLKS_BITMAP, .required_clks = MT7628_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -34,7 +34,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ring->dma = NULL; ring->dma = NULL;
} }
} }
@@ -3403,6 +3402,7 @@ static const struct mtk_soc_data mt2701_ @@ -3405,6 +3404,7 @@ static const struct mtk_soc_data mt2701_
.required_pctl = true, .required_pctl = true,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3414,6 +3414,7 @@ static const struct mtk_soc_data mt7621_ @@ -3416,6 +3416,7 @@ static const struct mtk_soc_data mt7621_
.offload_version = 2, .offload_version = 2,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -50,7 +50,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3426,6 +3427,7 @@ static const struct mtk_soc_data mt7622_ @@ -3428,6 +3429,7 @@ static const struct mtk_soc_data mt7622_
.offload_version = 2, .offload_version = 2,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3437,6 +3439,7 @@ static const struct mtk_soc_data mt7623_ @@ -3439,6 +3441,7 @@ static const struct mtk_soc_data mt7623_
.offload_version = 2, .offload_version = 2,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3448,6 +3451,7 @@ static const struct mtk_soc_data mt7629_ @@ -3450,6 +3453,7 @@ static const struct mtk_soc_data mt7629_
.required_pctl = false, .required_pctl = false,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@ -74,7 +74,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3458,6 +3462,7 @@ static const struct mtk_soc_data rt5350_ @@ -3460,6 +3464,7 @@ static const struct mtk_soc_data rt5350_
.required_pctl = false, .required_pctl = false,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),

View File

@ -415,7 +415,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
return 0; return 0;
@@ -2437,8 +2497,8 @@ static int mtk_stop(struct net_device *d @@ -2439,8 +2499,8 @@ static int mtk_stop(struct net_device *d
cancel_work_sync(&eth->tx_dim.work); cancel_work_sync(&eth->tx_dim.work);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_QDMA)) 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); mtk_dma_free(eth);
@@ -2492,6 +2552,7 @@ static void mtk_dim_rx(struct work_struc @@ -2494,6 +2554,7 @@ static void mtk_dim_rx(struct work_struc
{ {
struct dim *dim = container_of(work, struct dim, work); struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, rx_dim); 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; struct dim_cq_moder cur_profile;
u32 val, cur; u32 val, cur;
@@ -2499,7 +2560,7 @@ static void mtk_dim_rx(struct work_struc @@ -2501,7 +2562,7 @@ static void mtk_dim_rx(struct work_struc
dim->profile_ix); dim->profile_ix);
spin_lock_bh(&eth->dim_lock); 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_TX_MASK;
val |= MTK_PDMA_DELAY_RX_EN; val |= MTK_PDMA_DELAY_RX_EN;
@@ -2509,9 +2570,9 @@ static void mtk_dim_rx(struct work_struc @@ -2511,9 +2572,9 @@ static void mtk_dim_rx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK); cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_RX_PINT_SHIFT; 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); spin_unlock_bh(&eth->dim_lock);
@@ -2522,6 +2583,7 @@ static void mtk_dim_tx(struct work_struc @@ -2524,6 +2585,7 @@ static void mtk_dim_tx(struct work_struc
{ {
struct dim *dim = container_of(work, struct dim, work); struct dim *dim = container_of(work, struct dim, work);
struct mtk_eth *eth = container_of(dim, struct mtk_eth, tx_dim); 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; struct dim_cq_moder cur_profile;
u32 val, cur; u32 val, cur;
@@ -2529,7 +2591,7 @@ static void mtk_dim_tx(struct work_struc @@ -2531,7 +2593,7 @@ static void mtk_dim_tx(struct work_struc
dim->profile_ix); dim->profile_ix);
spin_lock_bh(&eth->dim_lock); 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_RX_MASK;
val |= MTK_PDMA_DELAY_TX_EN; val |= MTK_PDMA_DELAY_TX_EN;
@@ -2539,9 +2601,9 @@ static void mtk_dim_tx(struct work_struc @@ -2541,9 +2603,9 @@ static void mtk_dim_tx(struct work_struc
cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK); cur = min_t(u32, cur_profile.pkts, MTK_PDMA_DELAY_PINT_MASK);
val |= cur << MTK_PDMA_DELAY_TX_PINT_SHIFT; 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); spin_unlock_bh(&eth->dim_lock);
@@ -2552,6 +2614,7 @@ static int mtk_hw_init(struct mtk_eth *e @@ -2554,6 +2616,7 @@ static int mtk_hw_init(struct mtk_eth *e
{ {
u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA | u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
ETHSYS_DMA_AG_MAP_PPE; ETHSYS_DMA_AG_MAP_PPE;
@ -492,7 +492,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
int i, val, ret; int i, val, ret;
if (test_and_set_bit(MTK_HW_INIT, &eth->state)) if (test_and_set_bit(MTK_HW_INIT, &eth->state))
@@ -2626,10 +2689,10 @@ static int mtk_hw_init(struct mtk_eth *e @@ -2628,10 +2691,10 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_rx_irq_disable(eth, ~0); mtk_rx_irq_disable(eth, ~0);
/* FE int grouping */ /* FE int grouping */
@ -507,7 +507,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
return 0; return 0;
@@ -3168,14 +3231,6 @@ static int mtk_probe(struct platform_dev @@ -3170,14 +3233,6 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base)) if (IS_ERR(eth->base))
return PTR_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)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA; eth->rx_dma_l4_valid = RX_DMA_L4_VALID_PDMA;
eth->ip_align = NET_IP_ALIGN; eth->ip_align = NET_IP_ALIGN;
@@ -3409,6 +3464,7 @@ static int mtk_remove(struct platform_de @@ -3411,6 +3466,7 @@ static int mtk_remove(struct platform_de
} }
static const struct mtk_soc_data mt2701_data = { 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, .caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
@@ -3420,6 +3476,7 @@ static const struct mtk_soc_data mt2701_ @@ -3422,6 +3478,7 @@ static const struct mtk_soc_data mt2701_
}; };
static const struct mtk_soc_data mt7621_data = { static const struct mtk_soc_data mt7621_data = {
@ -538,7 +538,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.caps = MT7621_CAPS, .caps = MT7621_CAPS,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
@@ -3432,6 +3489,7 @@ static const struct mtk_soc_data mt7621_ @@ -3434,6 +3491,7 @@ static const struct mtk_soc_data mt7621_
}; };
static const struct mtk_soc_data mt7622_data = { static const struct mtk_soc_data mt7622_data = {
@ -546,7 +546,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x2028, .ana_rgc3 = 0x2028,
.caps = MT7622_CAPS | MTK_HWLRO, .caps = MT7622_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
@@ -3445,6 +3503,7 @@ static const struct mtk_soc_data mt7622_ @@ -3447,6 +3505,7 @@ static const struct mtk_soc_data mt7622_
}; };
static const struct mtk_soc_data mt7623_data = { 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, .caps = MT7623_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
@@ -3457,6 +3516,7 @@ static const struct mtk_soc_data mt7623_ @@ -3459,6 +3518,7 @@ static const struct mtk_soc_data mt7623_
}; };
static const struct mtk_soc_data mt7629_data = { static const struct mtk_soc_data mt7629_data = {
@ -562,7 +562,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.ana_rgc3 = 0x128, .ana_rgc3 = 0x128,
.caps = MT7629_CAPS | MTK_HWLRO, .caps = MT7629_CAPS | MTK_HWLRO,
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
@@ -3469,6 +3529,7 @@ static const struct mtk_soc_data mt7629_ @@ -3471,6 +3531,7 @@ static const struct mtk_soc_data mt7629_
}; };
static const struct mtk_soc_data rt5350_data = { static const struct mtk_soc_data rt5350_data = {

View File

@ -471,7 +471,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
mtk_w32(eth, mtk_w32(eth,
MTK_RX_DMA_EN | rx_2b_offset | MTK_RX_DMA_EN | rx_2b_offset |
MTK_RX_BT_32DWORDS | MTK_MULTI_EN, MTK_RX_BT_32DWORDS | MTK_MULTI_EN,
@@ -2437,7 +2554,7 @@ static int mtk_open(struct net_device *d @@ -2439,7 +2556,7 @@ static int mtk_open(struct net_device *d
napi_enable(&eth->tx_napi); napi_enable(&eth->tx_napi);
napi_enable(&eth->rx_napi); napi_enable(&eth->rx_napi);
mtk_tx_irq_enable(eth, MTK_TX_DONE_INT); 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); refcount_set(&eth->dma_refcnt, 1);
} }
else else
@@ -2489,7 +2606,7 @@ static int mtk_stop(struct net_device *d @@ -2491,7 +2608,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);
@ -489,7 +489,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
napi_disable(&eth->tx_napi); napi_disable(&eth->tx_napi);
napi_disable(&eth->rx_napi); napi_disable(&eth->rx_napi);
@@ -2649,9 +2766,25 @@ static int mtk_hw_init(struct mtk_eth *e @@ -2651,9 +2768,25 @@ static int mtk_hw_init(struct mtk_eth *e
return 0; return 0;
} }
@ -518,7 +518,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (eth->pctl) { if (eth->pctl) {
/* Set GE2 driving and slew rate */ /* Set GE2 driving and slew rate */
@@ -2690,11 +2823,47 @@ static int mtk_hw_init(struct mtk_eth *e @@ -2692,11 +2825,47 @@ 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);
@ -568,7 +568,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return 0; return 0;
err_disable_pm: err_disable_pm:
@@ -3231,12 +3400,8 @@ static int mtk_probe(struct platform_dev @@ -3233,12 +3402,8 @@ static int mtk_probe(struct platform_dev
if (IS_ERR(eth->base)) if (IS_ERR(eth->base))
return PTR_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->page_lock);
spin_lock_init(&eth->tx_irq_lock); spin_lock_init(&eth->tx_irq_lock);
@@ -3472,6 +3637,10 @@ static const struct mtk_soc_data mt2701_ @@ -3474,6 +3639,10 @@ static const struct mtk_soc_data mt2701_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -593,7 +593,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3485,6 +3654,10 @@ static const struct mtk_soc_data mt7621_ @@ -3487,6 +3656,10 @@ static const struct mtk_soc_data mt7621_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -604,7 +604,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3499,6 +3672,10 @@ static const struct mtk_soc_data mt7622_ @@ -3501,6 +3674,10 @@ static const struct mtk_soc_data mt7622_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -615,7 +615,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3512,6 +3689,10 @@ static const struct mtk_soc_data mt7623_ @@ -3514,6 +3691,10 @@ static const struct mtk_soc_data mt7623_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -626,7 +626,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3525,6 +3706,10 @@ static const struct mtk_soc_data mt7629_ @@ -3527,6 +3708,10 @@ static const struct mtk_soc_data mt7629_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}, },
}; };
@@ -3537,6 +3722,10 @@ static const struct mtk_soc_data rt5350_ @@ -3539,6 +3724,10 @@ static const struct mtk_soc_data rt5350_
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),

View File

@ -65,7 +65,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
}; };
void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg) void mtk_w32(struct mtk_eth *eth, u32 val, unsigned reg)
@@ -3709,6 +3746,21 @@ static const struct mtk_soc_data mt7629_ @@ -3711,6 +3748,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 = { static const struct mtk_soc_data rt5350_data = {
.reg_map = &mt7628_reg_map, .reg_map = &mt7628_reg_map,
.caps = MT7628_CAPS, .caps = MT7628_CAPS,
@@ -3731,6 +3783,7 @@ const struct of_device_id of_mtk_match[] @@ -3733,6 +3785,7 @@ const struct of_device_id of_mtk_match[]
{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data}, { .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data}, { .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data}, { .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},

View File

@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
skb->ip_summed = CHECKSUM_UNNECESSARY; skb->ip_summed = CHECKSUM_UNNECESSARY;
else else
skb_checksum_none_assert(skb); skb_checksum_none_assert(skb);
@@ -3756,6 +3762,7 @@ static const struct mtk_soc_data mt7986_ @@ -3758,6 +3764,7 @@ static const struct mtk_soc_data mt7986_
.txd_size = sizeof(struct mtk_tx_dma_v2), .txd_size = sizeof(struct mtk_tx_dma_v2),
.rxd_size = sizeof(struct mtk_rx_dma_v2), .rxd_size = sizeof(struct mtk_rx_dma_v2),
.rx_irq_done_mask = MTK_RX_DONE_INT_V2, .rx_irq_done_mask = MTK_RX_DONE_INT_V2,

View File

@ -637,7 +637,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void macb_usx_pcs_link_up(struct phylink_pcs *pcs, unsigned int mode, static void macb_usx_pcs_link_up(struct phylink_pcs *pcs, unsigned int mode,
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c --- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c +++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
@@ -968,7 +968,7 @@ static void enetc_pl_mac_validate(struct @@ -965,7 +965,7 @@ static void enetc_pl_mac_validate(struct
state->interface != PHY_INTERFACE_MODE_2500BASEX && state->interface != PHY_INTERFACE_MODE_2500BASEX &&
state->interface != PHY_INTERFACE_MODE_USXGMII && state->interface != PHY_INTERFACE_MODE_USXGMII &&
!phy_interface_mode_is_rgmii(state->interface)) { !phy_interface_mode_is_rgmii(state->interface)) {
@ -646,7 +646,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return; return;
} }
@@ -991,10 +991,8 @@ static void enetc_pl_mac_validate(struct @@ -988,10 +988,8 @@ static void enetc_pl_mac_validate(struct
phylink_set(mask, 2500baseX_Full); phylink_set(mask, 2500baseX_Full);
} }

View File

@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- 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
@@ -3352,6 +3352,26 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3354,6 +3354,26 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev; mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; mac->phylink_config.type = PHYLINK_NETDEV;

View File

@ -72,7 +72,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
.mac_pcs_get_state = mtk_mac_pcs_get_state, .mac_pcs_get_state = mtk_mac_pcs_get_state,
.mac_an_restart = mtk_mac_an_restart, .mac_an_restart = mtk_mac_an_restart,
.mac_config = mtk_mac_config, .mac_config = mtk_mac_config,
@@ -3314,6 +3266,9 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3316,6 +3268,9 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev; mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; mac->phylink_config.type = PHYLINK_NETDEV;

View File

@ -16,7 +16,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
@@ -3266,6 +3266,10 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3268,6 +3268,10 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev; mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; mac->phylink_config.type = PHYLINK_NETDEV;

View File

@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- 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
@@ -3565,9 +3565,9 @@ static int mtk_probe(struct platform_dev @@ -3567,9 +3567,9 @@ static int mtk_probe(struct platform_dev
*/ */
init_dummy_netdev(&eth->dummy_dev); init_dummy_netdev(&eth->dummy_dev);
netif_napi_add(&eth->dummy_dev, &eth->tx_napi, mtk_napi_tx, netif_napi_add(&eth->dummy_dev, &eth->tx_napi, mtk_napi_tx,

View File

@ -15,7 +15,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
@@ -3261,7 +3261,6 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3263,7 +3263,6 @@ static int mtk_add_mac(struct mtk_eth *e
/* mac config is not set */ /* mac config is not set */
mac->interface = PHY_INTERFACE_MODE_NA; mac->interface = PHY_INTERFACE_MODE_NA;

View File

@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 | mcr &= ~(MAC_MCR_SPEED_100 | MAC_MCR_SPEED_1000 |
MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC | MAC_MCR_FORCE_DPX | MAC_MCR_FORCE_TX_FC |
MAC_MCR_FORCE_RX_FC); MAC_MCR_FORCE_RX_FC);
@@ -3265,9 +3275,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3267,9 +3277,7 @@ static int mtk_add_mac(struct mtk_eth *e
mac->phylink_config.dev = &eth->netdev[id]->dev; mac->phylink_config.dev = &eth->netdev[id]->dev;
mac->phylink_config.type = PHYLINK_NETDEV; mac->phylink_config.type = PHYLINK_NETDEV;

View File

@ -208,7 +208,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
struct page_pool *pp; struct page_pool *pp;
pp = mtk_create_page_pool(eth, &ring->xdp_q, ring_no, pp = mtk_create_page_pool(eth, &ring->xdp_q, ring_no,
@@ -2707,6 +2782,48 @@ static int mtk_stop(struct net_device *d @@ -2709,6 +2784,48 @@ static int mtk_stop(struct net_device *d
return 0; return 0;
} }
@ -257,7 +257,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits) static void ethsys_reset(struct mtk_eth *eth, u32 reset_bits)
{ {
regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL,
@@ -3002,6 +3119,12 @@ static int mtk_change_mtu(struct net_dev @@ -3004,6 +3121,12 @@ static int mtk_change_mtu(struct net_dev
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
u32 mcr_cur, mcr_new; u32 mcr_cur, mcr_new;
@ -270,7 +270,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) { if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628)) {
mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id)); mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK; mcr_new = mcr_cur & ~MAC_MCR_MAX_RX_MASK;
@@ -3329,6 +3452,7 @@ static const struct net_device_ops mtk_n @@ -3331,6 +3454,7 @@ static const struct net_device_ops mtk_n
.ndo_poll_controller = mtk_poll_controller, .ndo_poll_controller = mtk_poll_controller,
#endif #endif
.ndo_setup_tc = mtk_eth_setup_tc, .ndo_setup_tc = mtk_eth_setup_tc,

View File

@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
mtk_tx_unmap(eth, tx_buf, true); mtk_tx_unmap(eth, tx_buf, true);
@@ -3475,6 +3624,7 @@ static const struct net_device_ops mtk_n @@ -3477,6 +3626,7 @@ static const struct net_device_ops mtk_n
#endif #endif
.ndo_setup_tc = mtk_eth_setup_tc, .ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp, .ndo_bpf = mtk_xdp,

View File

@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
MediaTek SoC family. MediaTek SoC family.
--- 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
@@ -3485,11 +3485,18 @@ static void mtk_get_strings(struct net_d @@ -3487,11 +3487,18 @@ static void mtk_get_strings(struct net_d
int i; int i;
switch (stringset) { switch (stringset) {
@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
break; break;
} }
} }
@@ -3497,13 +3504,35 @@ static void mtk_get_strings(struct net_d @@ -3499,13 +3506,35 @@ static void mtk_get_strings(struct net_d
static int mtk_get_sset_count(struct net_device *dev, int sset) static int mtk_get_sset_count(struct net_device *dev, int sset)
{ {
switch (sset) { switch (sset) {
@ -84,7 +84,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static void mtk_get_ethtool_stats(struct net_device *dev, static void mtk_get_ethtool_stats(struct net_device *dev,
struct ethtool_stats *stats, u64 *data) struct ethtool_stats *stats, u64 *data)
{ {
@@ -3531,6 +3560,8 @@ static void mtk_get_ethtool_stats(struct @@ -3533,6 +3562,8 @@ static void mtk_get_ethtool_stats(struct
for (i = 0; i < ARRAY_SIZE(mtk_ethtool_stats); i++) for (i = 0; i < ARRAY_SIZE(mtk_ethtool_stats); i++)
*data_dst++ = *(data_src + mtk_ethtool_stats[i].offset); *data_dst++ = *(data_src + mtk_ethtool_stats[i].offset);

View File

@ -65,9 +65,9 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
u32 gdm_config = MTK_GDMA_TO_PDMA; u32 gdm_config = MTK_GDMA_TO_PDMA;
int err; int err;
@@ -2931,15 +2936,15 @@ static int mtk_open(struct net_device *d @@ -2933,15 +2938,15 @@ static int mtk_open(struct net_device *d
if (err)
return err; return err;
}
- if (eth->soc->offload_version && mtk_ppe_start(eth->ppe) == 0) - if (eth->soc->offload_version && mtk_ppe_start(eth->ppe) == 0)
- gdm_config = MTK_GDMA_TO_PPE; - gdm_config = MTK_GDMA_TO_PPE;
@ -84,7 +84,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
refcount_set(&eth->dma_refcnt, 1); refcount_set(&eth->dma_refcnt, 1);
} }
else else
@@ -4045,7 +4050,9 @@ static int mtk_probe(struct platform_dev @@ -4047,7 +4052,9 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {

View File

@ -44,7 +44,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@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
@@ -4148,6 +4148,7 @@ static const struct mtk_soc_data mt7621_ @@ -4150,6 +4150,7 @@ static const struct mtk_soc_data mt7621_
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4166,6 +4167,7 @@ static const struct mtk_soc_data mt7622_ @@ -4168,6 +4169,7 @@ static const struct mtk_soc_data mt7622_
.required_clks = MT7622_CLKS_BITMAP, .required_clks = MT7622_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
@ -60,7 +60,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4183,6 +4185,7 @@ static const struct mtk_soc_data mt7623_ @@ -4185,6 +4187,7 @@ static const struct mtk_soc_data mt7623_
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
@ -68,7 +68,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4216,6 +4219,7 @@ static const struct mtk_soc_data mt7986_ @@ -4218,6 +4221,7 @@ static const struct mtk_soc_data mt7986_
.caps = MT7986_CAPS, .caps = MT7986_CAPS,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -57,7 +57,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) { if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) {
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
@@ -2929,15 +2929,19 @@ static int mtk_open(struct net_device *d @@ -2929,7 +2929,8 @@ static int mtk_open(struct net_device *d
/* we run 2 netdevs on the same dma ring so we only bring it up once */ /* we run 2 netdevs on the same dma ring so we only bring it up once */
if (!refcount_read(&eth->dma_refcnt)) { if (!refcount_read(&eth->dma_refcnt)) {
const struct mtk_soc_data *soc = eth->soc; const struct mtk_soc_data *soc = eth->soc;
@ -67,8 +67,9 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
int err; int err;
err = mtk_start_dma(eth); err = mtk_start_dma(eth);
if (err) @@ -2938,8 +2939,11 @@ static int mtk_open(struct net_device *d
return err; return err;
}
- if (soc->offload_version && mtk_ppe_start(eth->ppe) == 0) - if (soc->offload_version && mtk_ppe_start(eth->ppe) == 0)
- gdm_config = soc->reg_map->gdma_to_ppe0; - gdm_config = soc->reg_map->gdma_to_ppe0;
@ -76,11 +77,11 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+ mtk_ppe_start(eth->ppe[i]); + mtk_ppe_start(eth->ppe[i]);
+ +
+ gdm_config = soc->offload_version ? soc->reg_map->gdma_to_ppe0 + gdm_config = soc->offload_version ? soc->reg_map->gdma_to_ppe0
+ : MTK_GDMA_TO_PDMA; + : MTK_GDMA_TO_PDMA;
mtk_gdm_config(eth, gdm_config); mtk_gdm_config(eth, gdm_config);
@@ -2982,6 +2986,7 @@ static int mtk_stop(struct net_device *d @@ -2984,6 +2988,7 @@ static int mtk_stop(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;
@ -88,7 +89,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
phylink_stop(mac->phylink); phylink_stop(mac->phylink);
@@ -3009,8 +3014,8 @@ static int mtk_stop(struct net_device *d @@ -3011,8 +3016,8 @@ static int mtk_stop(struct net_device *d
mtk_dma_free(eth); mtk_dma_free(eth);
@ -99,7 +100,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
return 0; return 0;
} }
@@ -4050,12 +4055,19 @@ static int mtk_probe(struct platform_dev @@ -4052,12 +4057,19 @@ static int mtk_probe(struct platform_dev
} }
if (eth->soc->offload_version) { if (eth->soc->offload_version) {

View File

@ -39,7 +39,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
}; };
/* strings used by ethtool */ /* strings used by ethtool */
@@ -3967,16 +3975,12 @@ static int mtk_probe(struct platform_dev @@ -3969,16 +3977,12 @@ static int mtk_probe(struct platform_dev
for (i = 0;; i++) { for (i = 0;; i++) {
struct device_node *np = of_parse_phandle(pdev->dev.of_node, struct device_node *np = of_parse_phandle(pdev->dev.of_node,
"mediatek,wed", i); "mediatek,wed", i);

View File

@ -21,7 +21,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@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
@@ -4165,6 +4165,7 @@ static const struct mtk_soc_data mt7621_ @@ -4167,6 +4167,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -29,7 +29,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4184,6 +4185,7 @@ static const struct mtk_soc_data mt7622_ @@ -4186,6 +4187,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -37,7 +37,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4202,6 +4204,7 @@ static const struct mtk_soc_data mt7623_ @@ -4204,6 +4206,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,

View File

@ -26,7 +26,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@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
@@ -3892,6 +3892,7 @@ void mtk_eth_set_dma_device(struct mtk_e @@ -3894,6 +3894,7 @@ void mtk_eth_set_dma_device(struct mtk_e
static int mtk_probe(struct platform_device *pdev) static int mtk_probe(struct platform_device *pdev)
{ {
@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
struct device_node *mac_np; struct device_node *mac_np;
struct mtk_eth *eth; struct mtk_eth *eth;
int err, i; int err, i;
@@ -3972,16 +3973,31 @@ static int mtk_probe(struct platform_dev @@ -3974,16 +3975,31 @@ static int mtk_probe(struct platform_dev
} }
} }

View File

@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED) if (reason == MTK_PPE_CPU_REASON_HIT_UNBIND_RATE_REACHED)
mtk_ppe_check_skb(eth->ppe[0], skb, hash); mtk_ppe_check_skb(eth->ppe[0], skb, hash);
@@ -4181,7 +4182,7 @@ static const struct mtk_soc_data mt7621_ @@ -4183,7 +4184,7 @@ static const struct mtk_soc_data mt7621_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -58,7 +58,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4201,7 +4202,7 @@ static const struct mtk_soc_data mt7622_ @@ -4203,7 +4204,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -67,7 +67,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4220,7 +4221,7 @@ static const struct mtk_soc_data mt7623_ @@ -4222,7 +4223,7 @@ static const struct mtk_soc_data mt7623_
.required_pctl = true, .required_pctl = true,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -76,7 +76,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4252,9 +4253,11 @@ static const struct mtk_soc_data mt7986_ @@ -4254,9 +4255,11 @@ static const struct mtk_soc_data mt7986_
.reg_map = &mt7986_reg_map, .reg_map = &mt7986_reg_map,
.ana_rgc3 = 0x128, .ana_rgc3 = 0x128,
.caps = MT7986_CAPS, .caps = MT7986_CAPS,

View File

@ -16,7 +16,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo@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
@@ -4256,6 +4256,7 @@ static const struct mtk_soc_data mt7986_ @@ -4258,6 +4258,7 @@ static const struct mtk_soc_data mt7986_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7986_CLKS_BITMAP, .required_clks = MT7986_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,

View File

@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- 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
@@ -4008,19 +4008,23 @@ static int mtk_probe(struct platform_dev @@ -4010,19 +4010,23 @@ static int mtk_probe(struct platform_dev
eth->irq[i] = platform_get_irq(pdev, i); eth->irq[i] = platform_get_irq(pdev, i);
if (eth->irq[i] < 0) { if (eth->irq[i] < 0) {
dev_err(&pdev->dev, "no IRQ%d resource found\n", i); dev_err(&pdev->dev, "no IRQ%d resource found\n", i);
@ -45,7 +45,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
} }
eth->clks[i] = NULL; eth->clks[i] = NULL;
} }
@@ -4031,7 +4035,7 @@ static int mtk_probe(struct platform_dev @@ -4033,7 +4037,7 @@ static int mtk_probe(struct platform_dev
err = mtk_hw_init(eth); err = mtk_hw_init(eth);
if (err) if (err)
@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
eth->hwlro = MTK_HAS_CAPS(eth->soc->caps, MTK_HWLRO); eth->hwlro = MTK_HAS_CAPS(eth->soc->caps, MTK_HWLRO);
@@ -4129,6 +4133,8 @@ err_free_dev: @@ -4131,6 +4135,8 @@ err_free_dev:
mtk_free_dev(eth); mtk_free_dev(eth);
err_deinit_hw: err_deinit_hw:
mtk_hw_deinit(eth); mtk_hw_deinit(eth);
@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
return err; return err;
} }
@@ -4148,6 +4154,7 @@ static int mtk_remove(struct platform_de @@ -4150,6 +4156,7 @@ static int mtk_remove(struct platform_de
phylink_disconnect_phy(mac->phylink); phylink_disconnect_phy(mac->phylink);
} }

View File

@ -13,7 +13,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/include/linux/mii.h --- a/include/linux/mii.h
+++ b/include/linux/mii.h +++ b/include/linux/mii.h
@@ -595,4 +595,39 @@ static inline u8 mii_resolve_flowctrl_fdx(u16 lcladv, u16 rmtadv) @@ -595,4 +595,39 @@ static inline u8 mii_resolve_flowctrl_fd
return cap; return cap;
} }

View File

@ -2618,6 +2618,7 @@ CONFIG_IIO_CONSUMERS_PER_TRIGGER=2
# CONFIG_INA2XX_ADC is not set # CONFIG_INA2XX_ADC is not set
# CONFIG_INDIRECT_PIO is not set # CONFIG_INDIRECT_PIO is not set
CONFIG_INET=y CONFIG_INET=y
CONFIG_INET_TABLE_PERTURB_ORDER=16
# CONFIG_INET6_AH is not set # CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set # CONFIG_INET6_ESP is not set
# CONFIG_INET6_ESPINTCP is not set # CONFIG_INET6_ESPINTCP is not set

View File

@ -109,7 +109,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
__u8 invert; __u8 invert;
--- a/net/netfilter/xt_connmark.c --- a/net/netfilter/xt_connmark.c
+++ b/net/netfilter/xt_connmark.c +++ b/net/netfilter/xt_connmark.c
@@ -24,12 +24,13 @@ MODULE_ALIAS("ipt_connmark"); @@ -24,13 +24,13 @@ MODULE_ALIAS("ipt_connmark");
MODULE_ALIAS("ip6t_connmark"); MODULE_ALIAS("ip6t_connmark");
static unsigned int static unsigned int
@ -120,20 +120,22 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
u_int32_t new_targetmark; u_int32_t new_targetmark;
struct nf_conn *ct; struct nf_conn *ct;
u_int32_t newmark; u_int32_t newmark;
- u_int32_t oldmark;
+ u_int8_t dscp; + u_int8_t dscp;
ct = nf_ct_get(skb, &ctinfo); ct = nf_ct_get(skb, &ctinfo);
if (ct == NULL) if (ct == NULL)
@@ -37,12 +38,24 @@ connmark_tg_shift(struct sk_buff *skb, c @@ -38,13 +38,24 @@ connmark_tg_shift(struct sk_buff *skb, c
switch (info->mode) { switch (info->mode) {
case XT_CONNMARK_SET: case XT_CONNMARK_SET:
- newmark = (ct->mark & ~info->ctmask) ^ info->ctmark; - oldmark = READ_ONCE(ct->mark);
- newmark = (oldmark & ~info->ctmask) ^ info->ctmark;
- if (info->shift_dir == D_SHIFT_RIGHT) - if (info->shift_dir == D_SHIFT_RIGHT)
- newmark >>= info->shift_bits; - newmark >>= info->shift_bits;
- else - else
- newmark <<= info->shift_bits; - newmark <<= info->shift_bits;
+ newmark = ct->mark; + newmark = READ_ONCE(ct->mark);
+ if (info->func & XT_CONNMARK_VALUE) { + if (info->func & XT_CONNMARK_VALUE) {
+ newmark = (newmark & ~info->ctmask) ^ info->ctmark; + newmark = (newmark & ~info->ctmask) ^ info->ctmark;
+ if (info->shift_dir == D_SHIFT_RIGHT) + if (info->shift_dir == D_SHIFT_RIGHT)
@ -151,10 +153,10 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
+ newmark = (newmark & ~info->ctmark) | + newmark = (newmark & ~info->ctmark) |
+ (info->ctmask | (dscp << info->shift_bits)); + (info->ctmask | (dscp << info->shift_bits));
+ } + }
if (ct->mark != newmark) { if (READ_ONCE(ct->mark) != newmark) {
ct->mark = newmark; WRITE_ONCE(ct->mark, newmark);
nf_conntrack_event_cache(IPCT_MARK, ct); nf_conntrack_event_cache(IPCT_MARK, ct);
@@ -81,20 +94,36 @@ static unsigned int @@ -83,20 +94,36 @@ static unsigned int
connmark_tg(struct sk_buff *skb, const struct xt_action_param *par) connmark_tg(struct sk_buff *skb, const struct xt_action_param *par)
{ {
const struct xt_connmark_tginfo1 *info = par->targinfo; const struct xt_connmark_tginfo1 *info = par->targinfo;
@ -193,7 +195,7 @@ Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
return connmark_tg_shift(skb, info); return connmark_tg_shift(skb, info);
} }
@@ -165,6 +194,16 @@ static struct xt_target connmark_tg_reg[ @@ -167,6 +194,16 @@ static struct xt_target connmark_tg_reg[
.targetsize = sizeof(struct xt_connmark_tginfo2), .targetsize = sizeof(struct xt_connmark_tginfo2),
.destroy = connmark_tg_destroy, .destroy = connmark_tg_destroy,
.me = THIS_MODULE, .me = THIS_MODULE,

View File

@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
u64 res; u64 res;
--- a/net/ipv4/Kconfig --- a/net/ipv4/Kconfig
+++ b/net/ipv4/Kconfig +++ b/net/ipv4/Kconfig
@@ -414,6 +414,7 @@ config INET_TUNNEL @@ -424,6 +424,7 @@ config INET_TUNNEL
config INET_DIAG config INET_DIAG
tristate "INET: socket monitoring interface" tristate "INET: socket monitoring interface"

View File

@ -341,7 +341,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c
@@ -3022,11 +3022,13 @@ static const struct seq_operations fib_r @@ -3024,11 +3024,13 @@ static const struct seq_operations fib_r
int __net_init fib_proc_init(struct net *net) int __net_init fib_proc_init(struct net *net)
{ {
@ -357,7 +357,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
fib_triestat_seq_show, NULL)) fib_triestat_seq_show, NULL))
goto out2; goto out2;
@@ -3037,17 +3039,21 @@ int __net_init fib_proc_init(struct net @@ -3039,17 +3041,21 @@ int __net_init fib_proc_init(struct net
return 0; return 0;
out3: out3:

View File

@ -306,7 +306,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
struct nf_conn *ct = item->ct; struct nf_conn *ct = item->ct;
struct sk_buff *skb; struct sk_buff *skb;
unsigned int type; unsigned int type;
@@ -3761,11 +3768,17 @@ static int ctnetlink_stat_exp_cpu(struct @@ -3765,11 +3772,17 @@ static int ctnetlink_stat_exp_cpu(struct
} }
#ifdef CONFIG_NF_CONNTRACK_EVENTS #ifdef CONFIG_NF_CONNTRACK_EVENTS
@ -324,7 +324,7 @@ Signed-off-by: Zhi Chen <zhichen@codeaurora.org>
static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = { static const struct nfnl_callback ctnl_cb[IPCTNL_MSG_MAX] = {
[IPCTNL_MSG_CT_NEW] = { [IPCTNL_MSG_CT_NEW] = {
@@ -3864,8 +3877,12 @@ static int __net_init ctnetlink_net_init @@ -3868,8 +3881,12 @@ static int __net_init ctnetlink_net_init
static void ctnetlink_net_pre_exit(struct net *net) static void ctnetlink_net_pre_exit(struct net *net)
{ {
#ifdef CONFIG_NF_CONNTRACK_EVENTS #ifdef CONFIG_NF_CONNTRACK_EVENTS

View File

@ -66,7 +66,7 @@ Signed-off-by: Jonas Gorski <jogo@openwrt.org>
static void rt_fibinfo_free(struct rtable __rcu **rtp) static void rt_fibinfo_free(struct rtable __rcu **rtp)
--- a/net/ipv4/fib_trie.c --- a/net/ipv4/fib_trie.c
+++ b/net/ipv4/fib_trie.c +++ b/net/ipv4/fib_trie.c
@@ -2770,6 +2770,7 @@ static const char *const rtn_type_names[ @@ -2772,6 +2772,7 @@ static const char *const rtn_type_names[
[RTN_THROW] = "THROW", [RTN_THROW] = "THROW",
[RTN_NAT] = "NAT", [RTN_NAT] = "NAT",
[RTN_XRESOLVE] = "XRESOLVE", [RTN_XRESOLVE] = "XRESOLVE",

View File

@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
} }
return IRQ_HANDLED; return IRQ_HANDLED;
@@ -4118,6 +4118,8 @@ static int mtk_probe(struct platform_dev @@ -4120,6 +4120,8 @@ static int mtk_probe(struct platform_dev
* for NAPI to work * for NAPI to work
*/ */
init_dummy_netdev(&eth->dummy_dev); init_dummy_netdev(&eth->dummy_dev);

View File

@ -53,7 +53,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
--- 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
@@ -4088,7 +4088,9 @@ static int mtk_probe(struct platform_dev @@ -4090,7 +4090,9 @@ static int mtk_probe(struct platform_dev
u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400; u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
eth->ppe[i] = mtk_ppe_init(eth, eth->base + ppe_addr, eth->ppe[i] = mtk_ppe_init(eth, eth->base + ppe_addr,
@ -64,7 +64,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
if (!eth->ppe[i]) { if (!eth->ppe[i]) {
err = -ENOMEM; err = -ENOMEM;
goto err_free_dev; goto err_free_dev;
@@ -4211,6 +4213,7 @@ static const struct mtk_soc_data mt7622_ @@ -4213,6 +4215,7 @@ static const struct mtk_soc_data mt7622_
.required_pctl = false, .required_pctl = false,
.offload_version = 2, .offload_version = 2,
.hash_offset = 2, .hash_offset = 2,
@ -72,7 +72,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
@@ -4248,6 +4251,7 @@ static const struct mtk_soc_data mt7629_ @@ -4250,6 +4253,7 @@ static const struct mtk_soc_data mt7629_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7629_CLKS_BITMAP, .required_clks = MT7629_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -80,7 +80,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
.txrx = { .txrx = {
.txd_size = sizeof(struct mtk_tx_dma), .txd_size = sizeof(struct mtk_tx_dma),
.rxd_size = sizeof(struct mtk_rx_dma), .rxd_size = sizeof(struct mtk_rx_dma),
@@ -4268,6 +4272,7 @@ static const struct mtk_soc_data mt7986_ @@ -4270,6 +4274,7 @@ static const struct mtk_soc_data mt7986_
.offload_version = 2, .offload_version = 2,
.hash_offset = 4, .hash_offset = 4,
.foe_entry_size = sizeof(struct mtk_foe_entry), .foe_entry_size = sizeof(struct mtk_foe_entry),
@ -363,7 +363,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
return 0; return 0;
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
@@ -491,6 +491,7 @@ static int @@ -494,6 +494,7 @@ static int
mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f) mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
{ {
struct mtk_flow_entry *entry; struct mtk_flow_entry *entry;
@ -371,7 +371,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
u32 idle; u32 idle;
entry = rhashtable_lookup(&eth->flow_table, &f->cookie, entry = rhashtable_lookup(&eth->flow_table, &f->cookie,
@@ -501,6 +502,12 @@ mtk_flow_offload_stats(struct mtk_eth *e @@ -504,6 +505,12 @@ mtk_flow_offload_stats(struct mtk_eth *e
idle = mtk_foe_entry_idle_time(eth->ppe[entry->ppe_index], entry); idle = mtk_foe_entry_idle_time(eth->ppe[entry->ppe_index], entry);
f->stats.lastused = jiffies - idle * HZ; f->stats.lastused = jiffies - idle * HZ;

View File

@ -12,7 +12,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
@@ -4197,7 +4197,7 @@ static const struct mtk_soc_data mt7621_ @@ -4199,7 +4199,7 @@ static const struct mtk_soc_data mt7621_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7621_CLKS_BITMAP, .required_clks = MT7621_CLKS_BITMAP,
.required_pctl = false, .required_pctl = false,
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
.hash_offset = 2, .hash_offset = 2,
.foe_entry_size = sizeof(struct mtk_foe_entry) - 16, .foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
.txrx = { .txrx = {
@@ -4237,7 +4237,7 @@ static const struct mtk_soc_data mt7623_ @@ -4239,7 +4239,7 @@ static const struct mtk_soc_data mt7623_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,

View File

@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static int mtk_open(struct net_device *dev) static int mtk_open(struct net_device *dev)
{ {
struct mtk_mac *mac = netdev_priv(dev); struct mtk_mac *mac = netdev_priv(dev);
@@ -2970,7 +3125,8 @@ static int mtk_open(struct net_device *d @@ -2972,7 +3127,8 @@ static int mtk_open(struct net_device *d
refcount_inc(&eth->dma_refcnt); refcount_inc(&eth->dma_refcnt);
phylink_start(mac->phylink); phylink_start(mac->phylink);
@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3486,8 +3642,12 @@ static int mtk_unreg_dev(struct mtk_eth @@ -3488,8 +3644,12 @@ static int mtk_unreg_dev(struct mtk_eth
int i; int i;
for (i = 0; i < MTK_MAC_COUNT; i++) { for (i = 0; i < MTK_MAC_COUNT; i++) {
@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
unregister_netdev(eth->netdev[i]); unregister_netdev(eth->netdev[i]);
} }
@@ -3703,6 +3863,23 @@ static int mtk_set_rxnfc(struct net_devi @@ -3705,6 +3865,23 @@ static int mtk_set_rxnfc(struct net_devi
return ret; return ret;
} }
@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
static const struct ethtool_ops mtk_ethtool_ops = { static const struct ethtool_ops mtk_ethtool_ops = {
.get_link_ksettings = mtk_get_link_ksettings, .get_link_ksettings = mtk_get_link_ksettings,
.set_link_ksettings = mtk_set_link_ksettings, .set_link_ksettings = mtk_set_link_ksettings,
@@ -3738,6 +3915,7 @@ static const struct net_device_ops mtk_n @@ -3740,6 +3917,7 @@ static const struct net_device_ops mtk_n
.ndo_setup_tc = mtk_eth_setup_tc, .ndo_setup_tc = mtk_eth_setup_tc,
.ndo_bpf = mtk_xdp, .ndo_bpf = mtk_xdp,
.ndo_xdp_xmit = mtk_xdp_xmit, .ndo_xdp_xmit = mtk_xdp_xmit,
@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
}; };
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
@@ -3747,6 +3925,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3749,6 +3927,7 @@ static int mtk_add_mac(struct mtk_eth *e
struct phylink *phylink; struct phylink *phylink;
struct mtk_mac *mac; struct mtk_mac *mac;
int id, err; int id, err;
@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!_id) { if (!_id) {
dev_err(eth->dev, "missing mac id\n"); dev_err(eth->dev, "missing mac id\n");
@@ -3764,7 +3943,10 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3766,7 +3945,10 @@ static int mtk_add_mac(struct mtk_eth *e
return -EINVAL; return -EINVAL;
} }
@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
if (!eth->netdev[id]) { if (!eth->netdev[id]) {
dev_err(eth->dev, "alloc_etherdev failed\n"); dev_err(eth->dev, "alloc_etherdev failed\n");
return -ENOMEM; return -ENOMEM;
@@ -3861,6 +4043,11 @@ static int mtk_add_mac(struct mtk_eth *e @@ -3863,6 +4045,11 @@ static int mtk_add_mac(struct mtk_eth *e
else else
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;

View File

@ -9,9 +9,9 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/net/dsa/tag_mtk.c --- a/net/dsa/tag_mtk.c
+++ b/net/dsa/tag_mtk.c +++ b/net/dsa/tag_mtk.c
@@ -33,6 +33,8 @@ static struct sk_buff *mtk_tag_xmit(stru @@ -25,6 +25,8 @@ static struct sk_buff *mtk_tag_xmit(stru
if (__skb_put_padto(skb, ETH_ZLEN + MTK_HDR_LEN, false)) u8 xmit_tpid;
return NULL; u8 *mtk_tag;
+ skb_set_queue_mapping(skb, dp->index); + skb_set_queue_mapping(skb, dp->index);
+ +

View File

@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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) {
@@ -3417,6 +3473,10 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3419,6 +3475,10 @@ static int mtk_hw_init(struct mtk_eth *e
*/ */
val = mtk_r32(eth, MTK_CDMQ_IG_CTRL); val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL); mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* Enable RX VLan Offloading */ /* Enable RX VLan Offloading */
mtk_w32(eth, 1, MTK_CDMP_EG_CTRL); mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
@@ -3634,6 +3694,12 @@ static int mtk_free_dev(struct mtk_eth * @@ -3636,6 +3696,12 @@ static int mtk_free_dev(struct mtk_eth *
free_netdev(eth->netdev[i]); free_netdev(eth->netdev[i]);
} }

View File

@ -11,7 +11,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
@@ -3529,9 +3529,12 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3531,9 +3531,12 @@ static int mtk_hw_init(struct mtk_eth *e
mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP); mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {

View File

@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
@@ -561,6 +561,7 @@ mtk_eth_setup_tc_block(struct net_device @@ -564,6 +564,7 @@ mtk_eth_setup_tc_block(struct net_device
struct mtk_eth *eth = mac->hw; struct mtk_eth *eth = mac->hw;
static LIST_HEAD(block_cb_list); static LIST_HEAD(block_cb_list);
struct flow_block_cb *block_cb; struct flow_block_cb *block_cb;
@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
flow_setup_cb_t *cb; flow_setup_cb_t *cb;
if (!eth->soc->offload_version) if (!eth->soc->offload_version)
@@ -575,16 +576,20 @@ mtk_eth_setup_tc_block(struct net_device @@ -578,16 +579,20 @@ mtk_eth_setup_tc_block(struct net_device
switch (f->command) { switch (f->command) {
case FLOW_BLOCK_BIND: case FLOW_BLOCK_BIND:
block_cb = flow_block_cb_lookup(f->block, cb, dev); block_cb = flow_block_cb_lookup(f->block, cb, dev);

View File

@ -111,7 +111,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
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) {
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__, netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
@@ -3215,6 +3160,35 @@ static int mtk_open(struct net_device *d @@ -3217,6 +3162,35 @@ static int mtk_open(struct net_device *d
phylink_start(mac->phylink); phylink_start(mac->phylink);
netif_tx_start_all_queues(dev); netif_tx_start_all_queues(dev);
@ -147,7 +147,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
return 0; return 0;
} }
@@ -3508,10 +3482,9 @@ static int mtk_hw_init(struct mtk_eth *e @@ -3510,10 +3484,9 @@ static int mtk_hw_init(struct mtk_eth *e
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) { if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
val = mtk_r32(eth, MTK_CDMP_IG_CTRL); val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL); mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
@ -160,7 +160,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
/* set interrupt delays based on current Net DIM sample */ /* set interrupt delays based on current Net DIM sample */
mtk_dim_rx(&eth->rx_dim.work); mtk_dim_rx(&eth->rx_dim.work);
@@ -4132,7 +4105,7 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4134,7 +4107,7 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->hw_features |= NETIF_F_LRO; eth->netdev[id]->hw_features |= NETIF_F_LRO;
eth->netdev[id]->vlan_features = eth->soc->hw_features & eth->netdev[id]->vlan_features = eth->soc->hw_features &

View File

@ -506,7 +506,7 @@
/* Caller must hold RTNL. */ /* Caller must hold RTNL. */
int fib_table_insert(struct net *net, struct fib_table *tb, int fib_table_insert(struct net *net, struct fib_table *tb,
struct fib_config *cfg, struct netlink_ext_ack *extack) struct fib_config *cfg, struct netlink_ext_ack *extack)
@@ -1396,6 +1399,9 @@ int fib_table_insert(struct net *net, st @@ -1398,6 +1401,9 @@ int fib_table_insert(struct net *net, st
rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, new_fa->tb_id, rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, new_fa->tb_id,
&cfg->fc_nlinfo, nlflags); &cfg->fc_nlinfo, nlflags);
succeeded: succeeded:
@ -516,7 +516,7 @@
return 0; return 0;
out_remove_new_fa: out_remove_new_fa:
@@ -1766,6 +1772,9 @@ int fib_table_delete(struct net *net, st @@ -1768,6 +1774,9 @@ int fib_table_delete(struct net *net, st
if (fa_to_delete->fa_state & FA_S_ACCESSED) if (fa_to_delete->fa_state & FA_S_ACCESSED)
rt_cache_flush(cfg->fc_nlinfo.nl_net); rt_cache_flush(cfg->fc_nlinfo.nl_net);
@ -526,7 +526,7 @@
fib_release_info(fa_to_delete->fa_info); fib_release_info(fa_to_delete->fa_info);
alias_free_mem_rcu(fa_to_delete); alias_free_mem_rcu(fa_to_delete);
return 0; return 0;
@@ -2394,6 +2403,20 @@ void __init fib_trie_init(void) @@ -2396,6 +2405,20 @@ void __init fib_trie_init(void)
0, SLAB_PANIC | SLAB_ACCOUNT, NULL); 0, SLAB_PANIC | SLAB_ACCOUNT, NULL);
} }

View File

@ -506,7 +506,7 @@
/* Caller must hold RTNL. */ /* Caller must hold RTNL. */
int fib_table_insert(struct net *net, struct fib_table *tb, int fib_table_insert(struct net *net, struct fib_table *tb,
struct fib_config *cfg, struct netlink_ext_ack *extack) struct fib_config *cfg, struct netlink_ext_ack *extack)
@@ -1396,6 +1399,9 @@ int fib_table_insert(struct net *net, st @@ -1398,6 +1401,9 @@ int fib_table_insert(struct net *net, st
rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, new_fa->tb_id, rtmsg_fib(RTM_NEWROUTE, htonl(key), new_fa, plen, new_fa->tb_id,
&cfg->fc_nlinfo, nlflags); &cfg->fc_nlinfo, nlflags);
succeeded: succeeded:
@ -516,7 +516,7 @@
return 0; return 0;
out_remove_new_fa: out_remove_new_fa:
@@ -1766,6 +1772,9 @@ int fib_table_delete(struct net *net, st @@ -1768,6 +1774,9 @@ int fib_table_delete(struct net *net, st
if (fa_to_delete->fa_state & FA_S_ACCESSED) if (fa_to_delete->fa_state & FA_S_ACCESSED)
rt_cache_flush(cfg->fc_nlinfo.nl_net); rt_cache_flush(cfg->fc_nlinfo.nl_net);
@ -526,7 +526,7 @@
fib_release_info(fa_to_delete->fa_info); fib_release_info(fa_to_delete->fa_info);
alias_free_mem_rcu(fa_to_delete); alias_free_mem_rcu(fa_to_delete);
return 0; return 0;
@@ -2394,6 +2403,20 @@ void __init fib_trie_init(void) @@ -2396,6 +2405,20 @@ void __init fib_trie_init(void)
0, SLAB_PANIC | SLAB_ACCOUNT, NULL); 0, SLAB_PANIC | SLAB_ACCOUNT, NULL);
} }

View File

@ -14,7 +14,7 @@ Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
--- 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
@@ -4175,6 +4175,7 @@ static const struct mtk_soc_data mt2701_ @@ -4444,6 +4444,7 @@ static const struct mtk_soc_data mt2701_
.hw_features = MTK_HW_FEATURES, .hw_features = MTK_HW_FEATURES,
.required_clks = MT7623_CLKS_BITMAP, .required_clks = MT7623_CLKS_BITMAP,
.required_pctl = true, .required_pctl = true,

View File

@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- 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
@@ -219,13 +219,35 @@ static int _mtk_mdio_write(struct mtk_et @@ -224,13 +224,35 @@ static int _mtk_mdio_write(struct mtk_et
if (ret < 0) if (ret < 0)
return ret; return ret;
@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ret = mtk_mdio_busy_wait(eth); ret = mtk_mdio_busy_wait(eth);
if (ret < 0) if (ret < 0)
@@ -242,12 +264,33 @@ static int _mtk_mdio_read(struct mtk_eth @@ -247,12 +269,33 @@ static int _mtk_mdio_read(struct mtk_eth
if (ret < 0) if (ret < 0)
return ret; return ret;
@ -103,7 +103,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
ret = mtk_mdio_busy_wait(eth); ret = mtk_mdio_busy_wait(eth);
if (ret < 0) if (ret < 0)
@@ -644,6 +687,7 @@ static int mtk_mdio_init(struct mtk_eth @@ -720,6 +763,7 @@ static int mtk_mdio_init(struct mtk_eth
eth->mii_bus->name = "mdio"; eth->mii_bus->name = "mdio";
eth->mii_bus->read = mtk_mdio_read; eth->mii_bus->read = mtk_mdio_read;
eth->mii_bus->write = mtk_mdio_write; eth->mii_bus->write = mtk_mdio_write;
@ -113,7 +113,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
@@ -330,9 +330,12 @@ @@ -355,9 +355,12 @@
#define PHY_IAC_ADDR_MASK GENMASK(24, 20) #define PHY_IAC_ADDR_MASK GENMASK(24, 20)
#define PHY_IAC_ADDR(x) FIELD_PREP(PHY_IAC_ADDR_MASK, (x)) #define PHY_IAC_ADDR(x) FIELD_PREP(PHY_IAC_ADDR_MASK, (x))
#define PHY_IAC_CMD_MASK GENMASK(19, 18) #define PHY_IAC_CMD_MASK GENMASK(19, 18)

View File

@ -14,7 +14,7 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
--- 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
@@ -3736,6 +3736,7 @@ static const struct net_device_ops mtk_n @@ -3996,6 +3996,7 @@ static const struct net_device_ops mtk_n
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np) static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
{ {
@ -22,9 +22,9 @@ Signed-off-by: René van Dorst <opensource@vdorst.com>
const __be32 *_id = of_get_property(np, "reg", NULL); const __be32 *_id = of_get_property(np, "reg", NULL);
phy_interface_t phy_mode; phy_interface_t phy_mode;
struct phylink *phylink; struct phylink *phylink;
@@ -3855,6 +3856,9 @@ static int mtk_add_mac(struct mtk_eth *e @@ -4124,6 +4125,9 @@ static int mtk_add_mac(struct mtk_eth *e
else register_netdevice_notifier(&mac->device_notifier);
eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN; }
+ if (name) + if (name)
+ strlcpy(eth->netdev[id]->name, name, IFNAMSIZ); + strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);

View File

@ -503,7 +503,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static int yt8511_read_page(struct phy_device *phydev) static int yt8511_read_page(struct phy_device *phydev)
{ {
return __phy_read(phydev, YT8511_PAGE_SELECT); return __phy_read(phydev, YT8511_PAGE_SELECT);
@@ -111,6 +548,1181 @@ static int yt8511_config_init(struct phy_device *phydev) @@ -111,6 +548,1181 @@ err_restore_page:
return phy_restore_page(phydev, oldpage, ret); return phy_restore_page(phydev, oldpage, ret);
} }
@ -1685,7 +1685,7 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
static struct phy_driver motorcomm_phy_drvs[] = { static struct phy_driver motorcomm_phy_drvs[] = {
{ {
PHY_ID_MATCH_EXACT(PHY_ID_YT8511), PHY_ID_MATCH_EXACT(PHY_ID_YT8511),
@@ -121,16 +1733,35 @@ static struct phy_driver motorcomm_phy_drvs[] = { @@ -121,16 +1733,35 @@ static struct phy_driver motorcomm_phy_d
.read_page = yt8511_read_page, .read_page = yt8511_read_page,
.write_page = yt8511_write_page, .write_page = yt8511_write_page,
}, },

View File

@ -41,12 +41,10 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
* *
* Author: Peter Geis <pgwipeout@gmail.com> * Author: Peter Geis <pgwipeout@gmail.com>
* Author: Frank <Frank.Sae@motor-comm.com> * Author: Frank <Frank.Sae@motor-comm.com>
@@ -12,9 +12,10 @@ @@ -13,8 +13,9 @@
#include <linux/phy.h>
#define PHY_ID_YT8511 0x0000010a #define PHY_ID_YT8511 0x0000010a
-#define PHY_ID_YT8521 0x0000011A #define PHY_ID_YT8521 0x0000011A
+#define PHY_ID_YT8521 0x0000011A
+#define PHY_ID_YT8531S 0x4F51E91A +#define PHY_ID_YT8531S 0x4F51E91A
-/* YT8521 Register Overview -/* YT8521 Register Overview
@ -73,11 +71,10 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
/* Extended Register end */ /* Extended Register end */
struct yt8521_priv { struct yt8521_priv {
@@ -647,6 +651,26 @@ static int yt8521_probe(struct phy_device *phydev) @@ -648,6 +652,26 @@ static int yt8521_probe(struct phy_devic
return 0;
} }
+/** /**
+ * yt8531s_probe() - read chip config then set suitable polling_mode + * yt8531s_probe() - read chip config then set suitable polling_mode
+ * @phydev: a pointer to a &struct phy_device + * @phydev: a pointer to a &struct phy_device
+ * + *
@ -97,10 +94,11 @@ Signed-off-by: David S. Miller <davem@davemloft.net>
+ return yt8521_probe(phydev); + return yt8521_probe(phydev);
+} +}
+ +
/** +/**
* ytphy_utp_read_lpa() - read LPA then setup lp_advertising for utp * ytphy_utp_read_lpa() - read LPA then setup lp_advertising for utp
* @phydev: a pointer to a &struct phy_device * @phydev: a pointer to a &struct phy_device
@@ -1750,11 +1774,28 @@ static struct phy_driver motorcomm_phy_drvs[] = { *
@@ -1750,11 +1774,28 @@ static struct phy_driver motorcomm_phy_d
.suspend = yt8521_suspend, .suspend = yt8521_suspend,
.resume = yt8521_resume, .resume = yt8521_resume,
}, },

View File

@ -25,7 +25,7 @@ Link: https://lore.kernel.org/r/20220303164522.129583-1-ulf.hansson@linaro.org
--- a/drivers/mmc/core/mmc.c --- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c
@@ -1530,13 +1530,23 @@ static int mmc_select_timing(struct mmc_card *card) @@ -1530,13 +1530,23 @@ static int mmc_select_timing(struct mmc_
if (!mmc_can_ext_csd(card)) if (!mmc_can_ext_csd(card))
goto bus_speed; goto bus_speed;

View File

@ -57,7 +57,7 @@ Signed-off-by: Frank <Frank.Sae@motor-comm.com>
/* Extended Register end */ /* Extended Register end */
struct yt8521_priv { struct yt8521_priv {
@@ -479,6 +483,77 @@ static int ytphy_set_wol(struct phy_device *phydev, struct ethtool_wolinfo *wol) @@ -479,6 +483,77 @@ err_restore_page:
return phy_restore_page(phydev, old_page, ret); return phy_restore_page(phydev, old_page, ret);
} }
@ -135,11 +135,10 @@ Signed-off-by: Frank <Frank.Sae@motor-comm.com>
static int yt8511_read_page(struct phy_device *phydev) static int yt8511_read_page(struct phy_device *phydev)
{ {
return __phy_read(phydev, YT8511_PAGE_SELECT); return __phy_read(phydev, YT8511_PAGE_SELECT);
@@ -651,6 +726,19 @@ static int yt8521_probe(struct phy_device *phydev) @@ -652,6 +727,19 @@ static int yt8521_probe(struct phy_devic
return 0;
} }
+/** /**
+ * yt8531_probe() - Now only disable SyncE clock output + * yt8531_probe() - Now only disable SyncE clock output
+ * @phydev: a pointer to a &struct phy_device + * @phydev: a pointer to a &struct phy_device
+ * + *
@ -152,14 +151,14 @@ Signed-off-by: Frank <Frank.Sae@motor-comm.com>
+ YT8531_SCR_SYNCE_ENABLE, 0); + YT8531_SCR_SYNCE_ENABLE, 0);
+} +}
+ +
/** +/**
* yt8531s_probe() - read chip config then set suitable polling_mode * yt8531s_probe() - read chip config then set suitable polling_mode
* @phydev: a pointer to a &struct phy_device * @phydev: a pointer to a &struct phy_device
@@ -1192,6 +1280,59 @@ static int yt8521_config_init(struct phy_device *phydev) *
return phy_restore_page(phydev, old_page, ret); @@ -1193,6 +1281,59 @@ err_restore_page:
} }
+/** /**
+ * yt8531_config_init() - called to initialize the PHY + * yt8531_config_init() - called to initialize the PHY
+ * @phydev: a pointer to a &struct phy_device + * @phydev: a pointer to a &struct phy_device
+ * + *
@ -212,14 +211,14 @@ Signed-off-by: Frank <Frank.Sae@motor-comm.com>
+ YT8521_CGR_RX_CLK_EN, 0); + YT8521_CGR_RX_CLK_EN, 0);
+} +}
+ +
/** +/**
* yt8521_prepare_fiber_features() - A small helper function that setup * yt8521_prepare_fiber_features() - A small helper function that setup
* fiber's features. * fiber's features.
@@ -1774,6 +1915,16 @@ static struct phy_driver motorcomm_phy_drvs[] = { * @phydev: a pointer to a &struct phy_device
.suspend = yt8521_suspend, @@ -1775,6 +1916,16 @@ static struct phy_driver motorcomm_phy_d
.resume = yt8521_resume, .resume = yt8521_resume,
}, },
+ { {
+ PHY_ID_MATCH_EXACT(PHY_ID_YT8531), + PHY_ID_MATCH_EXACT(PHY_ID_YT8531),
+ .name = "YT8531 Gigabit Ethernet", + .name = "YT8531 Gigabit Ethernet",
+ .probe = yt8531_probe, + .probe = yt8531_probe,
@ -229,10 +228,11 @@ Signed-off-by: Frank <Frank.Sae@motor-comm.com>
+ .get_wol = ytphy_get_wol, + .get_wol = ytphy_get_wol,
+ .set_wol = yt8531_set_wol, + .set_wol = yt8531_set_wol,
+ }, + },
{ + {
PHY_ID_MATCH_EXACT(PHY_ID_YT8531S), PHY_ID_MATCH_EXACT(PHY_ID_YT8531S),
.name = "YT8531S Gigabit Ethernet", .name = "YT8531S Gigabit Ethernet",
@@ -1795,7 +1946,7 @@ static struct phy_driver motorcomm_phy_drvs[] = { .get_features = yt8521_get_features,
@@ -1795,7 +1946,7 @@ static struct phy_driver motorcomm_phy_d
module_phy_driver(motorcomm_phy_drvs); module_phy_driver(motorcomm_phy_drvs);