kernel: move accepted mtk_eth_soc patches to generic-backport
Signed-off-by: Felix Fietkau <nbd@nbd.name>
This commit is contained in:
parent
69ff678711
commit
5ef783c1b2
20 changed files with 52 additions and 52 deletions
|
@ -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
|
||||||
@@ -4431,7 +4431,7 @@ static const struct mtk_soc_data mt7621_
|
@@ -4427,7 +4427,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 = {
|
||||||
@@ -4471,7 +4471,7 @@ static const struct mtk_soc_data mt7623_
|
@@ -4466,7 +4466,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,
|
||||||
|
@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
.txrx = {
|
.txrx = {
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||||
@@ -215,6 +215,8 @@ int mtk_foe_entry_prepare(struct mtk_eth
|
@@ -175,6 +175,8 @@ int mtk_foe_entry_prepare(struct mtk_eth
|
||||||
val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT_V2, pse_port) |
|
val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT_V2, pse_port) |
|
||||||
FIELD_PREP(MTK_FOE_IB2_PORT_AG_V2, 0xf);
|
FIELD_PREP(MTK_FOE_IB2_PORT_AG_V2, 0xf);
|
||||||
} else {
|
} else {
|
||||||
|
@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
val = FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_BIND) |
|
val = FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_BIND) |
|
||||||
FIELD_PREP(MTK_FOE_IB1_PACKET_TYPE, type) |
|
FIELD_PREP(MTK_FOE_IB1_PACKET_TYPE, type) |
|
||||||
FIELD_PREP(MTK_FOE_IB1_UDP, l4proto == IPPROTO_UDP) |
|
FIELD_PREP(MTK_FOE_IB1_UDP, l4proto == IPPROTO_UDP) |
|
||||||
@@ -222,7 +224,7 @@ int mtk_foe_entry_prepare(struct mtk_eth
|
@@ -182,7 +184,7 @@ int mtk_foe_entry_prepare(struct mtk_eth
|
||||||
entry->ib1 = val;
|
entry->ib1 = val;
|
||||||
|
|
||||||
val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT, pse_port) |
|
val = FIELD_PREP(MTK_FOE_IB2_DEST_PORT, pse_port) |
|
|
@ -644,7 +644,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
} qdma;
|
} qdma;
|
||||||
u32 gdm1_cnt;
|
u32 gdm1_cnt;
|
||||||
u32 gdma_to_ppe0;
|
u32 gdma_to_ppe0;
|
||||||
@@ -1175,6 +1196,7 @@ struct mtk_mac {
|
@@ -1172,6 +1193,7 @@ struct mtk_mac {
|
||||||
__be32 hwlro_ip[MTK_MAX_LRO_IP_CNT];
|
__be32 hwlro_ip[MTK_MAX_LRO_IP_CNT];
|
||||||
int hwlro_ip_cnt;
|
int hwlro_ip_cnt;
|
||||||
unsigned int syscfg0;
|
unsigned int syscfg0;
|
|
@ -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
|
||||||
@@ -32,6 +32,8 @@ static struct sk_buff *mtk_tag_xmit(stru
|
@@ -25,6 +25,8 @@ static struct sk_buff *mtk_tag_xmit(stru
|
||||||
*/
|
u8 xmit_tpid;
|
||||||
eth_skb_pad(skb);
|
u8 *mtk_tag;
|
||||||
|
|
||||||
+ skb_set_queue_mapping(skb, dp->index);
|
+ skb_set_queue_mapping(skb, dp->index);
|
||||||
+
|
+
|
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||||
@@ -445,6 +445,24 @@ static inline bool mtk_foe_entry_usable(
|
@@ -405,6 +405,24 @@ static inline bool mtk_foe_entry_usable(
|
||||||
FIELD_GET(MTK_FOE_IB1_STATE, entry->ib1) != MTK_FOE_STATE_BIND;
|
FIELD_GET(MTK_FOE_IB1_STATE, entry->ib1) != MTK_FOE_STATE_BIND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
struct mtk_foe_entry *data)
|
struct mtk_foe_entry *data)
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.h
|
--- a/drivers/net/ethernet/mediatek/mtk_ppe.h
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.h
|
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.h
|
||||||
@@ -69,7 +69,9 @@ enum {
|
@@ -68,7 +68,9 @@ enum {
|
||||||
#define MTK_FOE_IB2_DSCP GENMASK(31, 24)
|
#define MTK_FOE_IB2_DSCP GENMASK(31, 24)
|
||||||
|
|
||||||
/* CONFIG_MEDIATEK_NETSYS_V2 */
|
/* CONFIG_MEDIATEK_NETSYS_V2 */
|
||||||
|
@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
#define MTK_FOE_IB2_DEST_PORT_V2 GENMASK(12, 9)
|
#define MTK_FOE_IB2_DEST_PORT_V2 GENMASK(12, 9)
|
||||||
#define MTK_FOE_IB2_MULTICAST_V2 BIT(13)
|
#define MTK_FOE_IB2_MULTICAST_V2 BIT(13)
|
||||||
#define MTK_FOE_IB2_WDMA_WINFO_V2 BIT(19)
|
#define MTK_FOE_IB2_WDMA_WINFO_V2 BIT(19)
|
||||||
@@ -369,6 +371,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e
|
@@ -351,6 +353,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e
|
||||||
int sid);
|
int sid);
|
||||||
int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry,
|
int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry,
|
||||||
int wdma_idx, int txq, int bss, int wcid);
|
int wdma_idx, int txq, int bss, int wcid);
|
|
@ -181,7 +181,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
/* CDMP Ingress Control Register */
|
/* CDMP Ingress Control Register */
|
||||||
#define MTK_CDMP_IG_CTRL 0x400
|
#define MTK_CDMP_IG_CTRL 0x400
|
||||||
#define MTK_CDMP_STAG_EN BIT(0)
|
#define MTK_CDMP_STAG_EN BIT(0)
|
||||||
@@ -1168,6 +1174,8 @@ struct mtk_eth {
|
@@ -1165,6 +1171,8 @@ struct mtk_eth {
|
||||||
|
|
||||||
int ip_align;
|
int ip_align;
|
||||||
|
|
|
@ -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
|
||||||
@@ -3745,9 +3745,12 @@ static int mtk_hw_init(struct mtk_eth *e
|
@@ -3711,9 +3711,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)) {
|
||||||
|
@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- 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
|
||||||
@@ -139,6 +139,7 @@
|
@@ -140,6 +140,7 @@
|
||||||
#define PSE_FQFC_CFG1 0x100
|
#define PSE_FQFC_CFG1 0x100
|
||||||
#define PSE_FQFC_CFG2 0x104
|
#define PSE_FQFC_CFG2 0x104
|
||||||
#define PSE_DROP_CFG 0x108
|
#define PSE_DROP_CFG 0x108
|
|
@ -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
|
@@ -554,6 +554,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
|
@@ -568,16 +569,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);
|
|
@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
|
||||||
@@ -601,8 +601,7 @@ mtk_foe_entry_commit_subflow(struct mtk_
|
@@ -621,8 +621,7 @@ mtk_foe_entry_commit_subflow(struct mtk_
|
||||||
u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP;
|
u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP;
|
||||||
int type;
|
int type;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni@redhat.com>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_ppe.h
|
--- a/drivers/net/ethernet/mediatek/mtk_ppe.h
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.h
|
+++ b/drivers/net/ethernet/mediatek/mtk_ppe.h
|
||||||
@@ -277,7 +277,6 @@ struct mtk_flow_entry {
|
@@ -279,7 +279,6 @@ struct mtk_flow_entry {
|
||||||
struct {
|
struct {
|
||||||
struct mtk_flow_entry *base_flow;
|
struct mtk_flow_entry *base_flow;
|
||||||
struct hlist_node list;
|
struct hlist_node list;
|
||||||
|
|
|
@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
--- 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
|
||||||
@@ -1027,11 +1027,13 @@ struct mtk_soc_data {
|
@@ -1062,11 +1062,13 @@ struct mtk_soc_data {
|
||||||
* @regmap: The register map pointing at the range used to setup
|
* @regmap: The register map pointing at the range used to setup
|
||||||
* SGMII modes
|
* SGMII modes
|
||||||
* @ana_rgc3: The offset refers to register ANA_RGC3 related to regmap
|
* @ana_rgc3: The offset refers to register ANA_RGC3 related to regmap
|
||||||
|
|
|
@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba@kernel.org>
|
||||||
|
|
||||||
--- 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
|
||||||
@@ -496,7 +496,7 @@
|
@@ -523,7 +523,7 @@
|
||||||
#define SGMII_SPEED_10 FIELD_PREP(SGMII_SPEED_MASK, 0)
|
#define SGMII_SPEED_10 FIELD_PREP(SGMII_SPEED_MASK, 0)
|
||||||
#define SGMII_SPEED_100 FIELD_PREP(SGMII_SPEED_MASK, 1)
|
#define SGMII_SPEED_100 FIELD_PREP(SGMII_SPEED_MASK, 1)
|
||||||
#define SGMII_SPEED_1000 FIELD_PREP(SGMII_SPEED_MASK, 2)
|
#define SGMII_SPEED_1000 FIELD_PREP(SGMII_SPEED_MASK, 2)
|
||||||
|
|
|
@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
|
||||||
@@ -2823,8 +2823,8 @@ static irqreturn_t mtk_handle_irq_rx(int
|
@@ -2967,8 +2967,8 @@ static irqreturn_t mtk_handle_irq_rx(int
|
||||||
|
|
||||||
eth->rx_events++;
|
eth->rx_events++;
|
||||||
if (likely(napi_schedule_prep(ð->rx_napi))) {
|
if (likely(napi_schedule_prep(ð->rx_napi))) {
|
||||||
|
@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
@@ -2836,8 +2836,8 @@ static irqreturn_t mtk_handle_irq_tx(int
|
@@ -2980,8 +2980,8 @@ static irqreturn_t mtk_handle_irq_tx(int
|
||||||
|
|
||||||
eth->tx_events++;
|
eth->tx_events++;
|
||||||
if (likely(napi_schedule_prep(ð->tx_napi))) {
|
if (likely(napi_schedule_prep(ð->tx_napi))) {
|
||||||
|
@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
@@ -4350,6 +4350,8 @@ static int mtk_probe(struct platform_dev
|
@@ -4612,6 +4612,8 @@ static int mtk_probe(struct platform_dev
|
||||||
* for NAPI to work
|
* for NAPI to work
|
||||||
*/
|
*/
|
||||||
init_dummy_netdev(ð->dummy_dev);
|
init_dummy_netdev(ð->dummy_dev);
|
||||||
|
|
|
@ -12,9 +12,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
|
||||||
@@ -25,6 +25,13 @@ static struct sk_buff *mtk_tag_xmit(stru
|
@@ -27,6 +27,13 @@ static struct sk_buff *mtk_tag_xmit(stru
|
||||||
u8 xmit_tpid;
|
|
||||||
u8 *mtk_tag;
|
skb_set_queue_mapping(skb, dp->index);
|
||||||
|
|
||||||
+ /* The Ethernet switch we are interfaced with needs packets to be at
|
+ /* The Ethernet switch we are interfaced with needs packets to be at
|
||||||
+ * least 64 bytes (including FCS) otherwise their padding might be
|
+ * least 64 bytes (including FCS) otherwise their padding might be
|
||||||
|
|
|
@ -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
|
||||||
@@ -4320,7 +4320,9 @@ static int mtk_probe(struct platform_dev
|
@@ -4582,7 +4582,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;
|
||||||
@@ -4445,6 +4447,7 @@ static const struct mtk_soc_data mt7622_
|
@@ -4707,6 +4709,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),
|
||||||
@@ -4482,6 +4485,7 @@ static const struct mtk_soc_data mt7629_
|
@@ -4744,6 +4747,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),
|
||||||
@@ -4502,6 +4506,7 @@ static const struct mtk_soc_data mt7986_
|
@@ -4764,6 +4768,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),
|
||||||
|
@ -90,7 +90,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
.rxd_size = sizeof(struct mtk_rx_dma_v2),
|
||||||
--- 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
|
||||||
@@ -1007,6 +1007,7 @@ struct mtk_soc_data {
|
@@ -1042,6 +1042,7 @@ struct mtk_soc_data {
|
||||||
u8 hash_offset;
|
u8 hash_offset;
|
||||||
u16 foe_entry_size;
|
u16 foe_entry_size;
|
||||||
netdev_features_t hw_features;
|
netdev_features_t hw_features;
|
||||||
|
@ -147,7 +147,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
static void mtk_ppe_cache_clear(struct mtk_ppe *ppe)
|
static void mtk_ppe_cache_clear(struct mtk_ppe *ppe)
|
||||||
{
|
{
|
||||||
ppe_set(ppe, MTK_PPE_CACHE_CTL, MTK_PPE_CACHE_CTL_CLEAR);
|
ppe_set(ppe, MTK_PPE_CACHE_CTL, MTK_PPE_CACHE_CTL_CLEAR);
|
||||||
@@ -444,6 +484,13 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
|
@@ -464,6 +504,13 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
|
||||||
hwe->ib1 &= ~MTK_FOE_IB1_STATE;
|
hwe->ib1 &= ~MTK_FOE_IB1_STATE;
|
||||||
hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID);
|
hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID);
|
||||||
dma_wmb();
|
dma_wmb();
|
||||||
|
@ -161,7 +161,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
}
|
}
|
||||||
entry->hash = 0xffff;
|
entry->hash = 0xffff;
|
||||||
|
|
||||||
@@ -551,6 +598,9 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
|
@@ -571,6 +618,9 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
|
||||||
wmb();
|
wmb();
|
||||||
hwe->ib1 = entry->ib1;
|
hwe->ib1 = entry->ib1;
|
||||||
|
|
||||||
|
@ -171,7 +171,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
dma_wmb();
|
dma_wmb();
|
||||||
|
|
||||||
mtk_ppe_cache_clear(ppe);
|
mtk_ppe_cache_clear(ppe);
|
||||||
@@ -742,14 +792,42 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
|
@@ -762,14 +812,42 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
|
||||||
return mtk_ppe_wait_busy(ppe);
|
return mtk_ppe_wait_busy(ppe);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
|
|
||||||
ppe = devm_kzalloc(dev, sizeof(*ppe), GFP_KERNEL);
|
ppe = devm_kzalloc(dev, sizeof(*ppe), GFP_KERNEL);
|
||||||
if (!ppe)
|
if (!ppe)
|
||||||
@@ -764,6 +842,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_
|
@@ -784,6 +862,7 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_
|
||||||
ppe->eth = eth;
|
ppe->eth = eth;
|
||||||
ppe->dev = dev;
|
ppe->dev = dev;
|
||||||
ppe->version = version;
|
ppe->version = version;
|
||||||
|
@ -223,7 +223,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
|
|
||||||
foe = dmam_alloc_coherent(ppe->dev,
|
foe = dmam_alloc_coherent(ppe->dev,
|
||||||
MTK_PPE_ENTRIES * soc->foe_entry_size,
|
MTK_PPE_ENTRIES * soc->foe_entry_size,
|
||||||
@@ -779,6 +858,25 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_
|
@@ -799,6 +878,25 @@ struct mtk_ppe *mtk_ppe_init(struct mtk_
|
||||||
if (!ppe->foe_flow)
|
if (!ppe->foe_flow)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -249,7 +249,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
mtk_ppe_debugfs_init(ppe, index);
|
mtk_ppe_debugfs_init(ppe, index);
|
||||||
|
|
||||||
return ppe;
|
return ppe;
|
||||||
@@ -893,6 +991,16 @@ void mtk_ppe_start(struct mtk_ppe *ppe)
|
@@ -913,6 +1011,16 @@ void mtk_ppe_start(struct mtk_ppe *ppe)
|
||||||
ppe_w32(ppe, MTK_PPE_DEFAULT_CPU_PORT1, 0xcb777);
|
ppe_w32(ppe, MTK_PPE_DEFAULT_CPU_PORT1, 0xcb777);
|
||||||
ppe_w32(ppe, MTK_PPE_SBW_CTRL, 0x7f);
|
ppe_w32(ppe, MTK_PPE_SBW_CTRL, 0x7f);
|
||||||
}
|
}
|
||||||
|
@ -276,7 +276,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
#define MTK_FOE_IB2_WDMA_DEVIDX BIT(16)
|
#define MTK_FOE_IB2_WDMA_DEVIDX BIT(16)
|
||||||
#define MTK_FOE_IB2_WDMA_WINFO BIT(17)
|
#define MTK_FOE_IB2_WDMA_WINFO BIT(17)
|
||||||
|
|
||||||
@@ -283,16 +284,34 @@ struct mtk_flow_entry {
|
@@ -285,16 +286,34 @@ struct mtk_flow_entry {
|
||||||
unsigned long cookie;
|
unsigned long cookie;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -311,7 +311,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
u16 foe_check_time[MTK_PPE_ENTRIES];
|
u16 foe_check_time[MTK_PPE_ENTRIES];
|
||||||
struct hlist_head *foe_flow;
|
struct hlist_head *foe_flow;
|
||||||
|
|
||||||
@@ -302,7 +321,7 @@ struct mtk_ppe {
|
@@ -304,7 +323,7 @@ struct mtk_ppe {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mtk_ppe *mtk_ppe_init(struct mtk_eth *eth, void __iomem *base,
|
struct mtk_ppe *mtk_ppe_init(struct mtk_eth *eth, void __iomem *base,
|
||||||
|
@ -320,7 +320,7 @@ v2: fix wrong variable name in return value check spotted by Denis Kirjanov
|
||||||
void mtk_ppe_start(struct mtk_ppe *ppe);
|
void mtk_ppe_start(struct mtk_ppe *ppe);
|
||||||
int mtk_ppe_stop(struct mtk_ppe *ppe);
|
int mtk_ppe_stop(struct mtk_ppe *ppe);
|
||||||
int mtk_ppe_prepare_reset(struct mtk_ppe *ppe);
|
int mtk_ppe_prepare_reset(struct mtk_ppe *ppe);
|
||||||
@@ -354,5 +373,7 @@ int mtk_foe_entry_commit(struct mtk_ppe
|
@@ -358,5 +377,7 @@ int mtk_foe_entry_commit(struct mtk_ppe
|
||||||
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
|
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
|
||||||
int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
|
int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
|
||||||
int mtk_ppe_debugfs_init(struct mtk_ppe *ppe, int index);
|
int mtk_ppe_debugfs_init(struct mtk_ppe *ppe, int index);
|
||||||
|
@ -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
|
@@ -497,6 +497,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(ð->flow_table, &f->cookie,
|
entry = rhashtable_lookup(ð->flow_table, &f->cookie,
|
||||||
@@ -501,6 +502,12 @@ mtk_flow_offload_stats(struct mtk_eth *e
|
@@ -507,6 +508,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;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,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
|
||||||
@@ -2001,29 +2001,16 @@ static int mtk_poll_rx(struct napi_struc
|
@@ -1967,29 +1967,16 @@ static int mtk_poll_rx(struct napi_struc
|
||||||
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);
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
}
|
}
|
||||||
|
|
||||||
skb_record_rx_queue(skb, 0);
|
skb_record_rx_queue(skb, 0);
|
||||||
@@ -2840,29 +2827,11 @@ static netdev_features_t mtk_fix_feature
|
@@ -2806,29 +2793,11 @@ static netdev_features_t mtk_fix_feature
|
||||||
|
|
||||||
static int mtk_set_features(struct net_device *dev, netdev_features_t features)
|
static int mtk_set_features(struct net_device *dev, netdev_features_t features)
|
||||||
{
|
{
|
||||||
|
@ -80,7 +80,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3176,30 +3145,6 @@ static int mtk_open(struct net_device *d
|
@@ -3142,30 +3111,6 @@ static int mtk_open(struct net_device *d
|
||||||
struct mtk_eth *eth = mac->hw;
|
struct mtk_eth *eth = mac->hw;
|
||||||
int i, err;
|
int i, err;
|
||||||
|
|
||||||
|
@ -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__,
|
||||||
@@ -3240,6 +3185,35 @@ static int mtk_open(struct net_device *d
|
@@ -3206,6 +3151,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3724,10 +3698,9 @@ static int mtk_hw_init(struct mtk_eth *e
|
@@ -3690,10 +3664,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(ð->rx_dim.work);
|
mtk_dim_rx(ð->rx_dim.work);
|
||||||
@@ -4365,7 +4338,7 @@ static int mtk_add_mac(struct mtk_eth *e
|
@@ -4331,7 +4304,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 &
|
||||||
|
@ -176,6 +176,6 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
NETIF_F_RXCSUM | \
|
NETIF_F_RXCSUM | \
|
||||||
NETIF_F_HW_VLAN_CTAG_TX | \
|
NETIF_F_HW_VLAN_CTAG_TX | \
|
||||||
- NETIF_F_HW_VLAN_CTAG_RX | \
|
- NETIF_F_HW_VLAN_CTAG_RX | \
|
||||||
NETIF_F_SG | NETIF_F_ALL_TSO | \
|
NETIF_F_SG | NETIF_F_TSO | \
|
||||||
|
NETIF_F_TSO6 | \
|
||||||
NETIF_F_IPV6_CSUM |\
|
NETIF_F_IPV6_CSUM |\
|
||||||
NETIF_F_HW_TC)
|
|
|
@ -9,10 +9,10 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
||||||
|
|
||||||
--- 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
|
||||||
@@ -49,8 +49,7 @@
|
@@ -48,8 +48,7 @@
|
||||||
|
#define MTK_HW_FEATURES (NETIF_F_IP_CSUM | \
|
||||||
NETIF_F_RXCSUM | \
|
NETIF_F_RXCSUM | \
|
||||||
NETIF_F_HW_VLAN_CTAG_TX | \
|
NETIF_F_HW_VLAN_CTAG_TX | \
|
||||||
NETIF_F_HW_VLAN_CTAG_RX | \
|
|
||||||
- NETIF_F_SG | NETIF_F_TSO | \
|
- NETIF_F_SG | NETIF_F_TSO | \
|
||||||
- NETIF_F_TSO6 | \
|
- NETIF_F_TSO6 | \
|
||||||
+ NETIF_F_SG | NETIF_F_ALL_TSO | \
|
+ NETIF_F_SG | NETIF_F_ALL_TSO | \
|
Loading…
Reference in a new issue