mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK;
mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
}
-@@ -4523,6 +4533,61 @@ static int mtk_set_pauseparam(struct net
+@@ -4543,6 +4553,61 @@ static int mtk_set_pauseparam(struct net
return phylink_ethtool_set_pauseparam(mac->phylink, pause);
}
static u16 mtk_select_queue(struct net_device *dev, struct sk_buff *skb,
struct net_device *sb_dev)
{
-@@ -4555,6 +4620,8 @@ static const struct ethtool_ops mtk_etht
+@@ -4575,6 +4640,8 @@ static const struct ethtool_ops mtk_etht
.set_pauseparam = mtk_set_pauseparam,
.get_rxnfc = mtk_get_rxnfc,
.set_rxnfc = mtk_set_rxnfc,
};
static const struct net_device_ops mtk_netdev_ops = {
-@@ -4615,6 +4682,8 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4635,6 +4702,8 @@ static int mtk_add_mac(struct mtk_eth *e
}
mac = netdev_priv(eth->netdev[id]);
eth->mac[id] = mac;
.glo_cfg = 0x4604,
.rst_idx = 0x4608,
.delay_irq = 0x460c,
-@@ -4069,6 +4072,56 @@ static void mtk_set_mcr_max_rx(struct mt
+@@ -4084,6 +4087,56 @@ static void mtk_set_mcr_max_rx(struct mt
mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
}
static void mtk_hw_reset(struct mtk_eth *eth)
{
u32 val;
-@@ -4548,6 +4601,8 @@ static void mtk_pending_work(struct work
+@@ -4568,6 +4621,8 @@ static void mtk_pending_work(struct work
rtnl_lock();
set_bit(MTK_RESETTING, ð->state);
-LINUX_VERSION-6.12 = .83
-LINUX_KERNEL_HASH-6.12.83 = 39e3172cd1dfa526d353b603e6388db2ab122bbf6a08e05930559a832adcdf31
+LINUX_VERSION-6.12 = .84
+LINUX_KERNEL_HASH-6.12.84 = d56e463a7b1f5355794ae83a102453ad930a51f9cb46b295fcf24a717bff52dd
if (!net_eq(dev_net(dev), sock_net(sk)))
goto drop;
-@@ -3430,6 +3432,7 @@ static int packet_create(struct net *net
+@@ -3435,6 +3437,7 @@ static int packet_create(struct net *net
mutex_init(&po->pg_vec_lock);
po->rollover = NULL;
po->prot_hook.func = packet_rcv;
if (sock->type == SOCK_PACKET)
po->prot_hook.func = packet_rcv_spkt;
-@@ -4097,6 +4100,16 @@ packet_setsockopt(struct socket *sock, i
+@@ -4102,6 +4105,16 @@ packet_setsockopt(struct socket *sock, i
packet_sock_flag_set(po, PACKET_SOCK_QDISC_BYPASS, val);
return 0;
}
default:
return -ENOPROTOOPT;
}
-@@ -4159,6 +4172,13 @@ static int packet_getsockopt(struct sock
+@@ -4164,6 +4177,13 @@ static int packet_getsockopt(struct sock
case PACKET_COPY_THRESH:
val = READ_ONCE(pkt_sk(sk)->copy_thresh);
break;
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5157,6 +5157,8 @@ static int mtk_probe(struct platform_dev
+@@ -5177,6 +5177,8 @@ static int mtk_probe(struct platform_dev
dev_err(eth->dev, "failed to allocated dummy device\n");
goto err_unreg_netdev;
}
eth->scratch_ring, eth->phy_scratch_ring);
eth->scratch_ring = NULL;
eth->phy_scratch_ring = 0;
-@@ -5245,6 +5248,9 @@ static void mtk_remove(struct platform_d
+@@ -5265,6 +5268,9 @@ static void mtk_remove(struct platform_d
mtk_mdio_cleanup(eth);
}
static const struct mtk_soc_data mt2701_data = {
.reg_map = &mtk_reg_map,
.caps = MT7623_CAPS | MTK_HWLRO,
-@@ -5253,14 +5259,14 @@ static const struct mtk_soc_data mt2701_
+@@ -5273,14 +5279,14 @@ static const struct mtk_soc_data mt2701_
.required_pctl = true,
.version = 1,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5281,14 +5287,14 @@ static const struct mtk_soc_data mt7621_
+@@ -5301,14 +5307,14 @@ static const struct mtk_soc_data mt7621_
.hash_offset = 2,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5311,14 +5317,14 @@ static const struct mtk_soc_data mt7622_
+@@ -5331,14 +5337,14 @@ static const struct mtk_soc_data mt7622_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5340,14 +5346,14 @@ static const struct mtk_soc_data mt7623_
+@@ -5360,14 +5366,14 @@ static const struct mtk_soc_data mt7623_
.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
.disable_pll_modes = true,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5366,14 +5372,14 @@ static const struct mtk_soc_data mt7629_
+@@ -5386,14 +5392,14 @@ static const struct mtk_soc_data mt7629_
.has_accounting = true,
.version = 1,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_size = MTK_DMA_SIZE(2K),
-@@ -5396,14 +5402,14 @@ static const struct mtk_soc_data mt7981_
+@@ -5416,14 +5422,14 @@ static const struct mtk_soc_data mt7981_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
-@@ -5426,14 +5432,14 @@ static const struct mtk_soc_data mt7986_
+@@ -5446,14 +5452,14 @@ static const struct mtk_soc_data mt7986_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
-@@ -5456,14 +5462,14 @@ static const struct mtk_soc_data mt7988_
+@@ -5476,14 +5482,14 @@ static const struct mtk_soc_data mt7988_
.has_accounting = true,
.foe_entry_size = MTK_FOE_ENTRY_V3_SIZE,
.tx = {
.irq_done_mask = MTK_RX_DONE_INT_V2,
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
-@@ -5480,13 +5486,13 @@ static const struct mtk_soc_data rt5350_
+@@ -5500,13 +5506,13 @@ static const struct mtk_soc_data rt5350_
.required_pctl = false,
.version = 1,
.tx = {
};
struct mtk_mib_entry {
-@@ -348,6 +350,7 @@ void mtk_ppe_deinit(struct mtk_eth *eth)
+@@ -349,6 +351,7 @@ void mtk_ppe_update_mtu(struct mtk_ppe *
void mtk_ppe_start(struct mtk_ppe *ppe);
int mtk_ppe_stop(struct mtk_ppe *ppe);
int mtk_ppe_prepare_reset(struct mtk_ppe *ppe);
void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash);
-@@ -397,9 +400,8 @@ int mtk_foe_entry_set_queue(struct mtk_e
+@@ -398,9 +401,8 @@ int mtk_foe_entry_set_queue(struct mtk_e
unsigned int queue);
int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
.mac_finish = mtk_mac_finish,
.mac_link_down = mtk_mac_link_down,
.mac_link_up = mtk_mac_link_up,
-@@ -3591,6 +3736,9 @@ static int mtk_open(struct net_device *d
+@@ -3602,6 +3747,9 @@ static int mtk_open(struct net_device *d
ppe_num = eth->soc->ppe_num;
err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) {
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
-@@ -3738,6 +3886,9 @@ static int mtk_stop(struct net_device *d
+@@ -3753,6 +3901,9 @@ static int mtk_stop(struct net_device *d
for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
mtk_ppe_stop(eth->ppe[i]);
return 0;
}
-@@ -4837,6 +4988,7 @@ static const struct net_device_ops mtk_n
+@@ -4857,6 +5008,7 @@ static const struct net_device_ops mtk_n
static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
{
const __be32 *_id = of_get_property(np, "reg", NULL);
phy_interface_t phy_mode;
struct phylink *phylink;
struct mtk_mac *mac;
-@@ -4875,16 +5027,44 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4895,16 +5047,44 @@ static int mtk_add_mac(struct mtk_eth *e
mac->id = id;
mac->hw = eth;
mac->of_node = np;
}
memset(mac->hwlro_ip, 0, sizeof(mac->hwlro_ip));
-@@ -4967,8 +5147,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4987,8 +5167,21 @@ static int mtk_add_mac(struct mtk_eth *e
phy_interface_zero(mac->phylink_config.supported_interfaces);
__set_bit(PHY_INTERFACE_MODE_INTERNAL,
mac->phylink_config.supported_interfaces);
phylink = phylink_create(&mac->phylink_config,
of_fwnode_handle(mac->of_node),
phy_mode, &mtk_phylink_ops);
-@@ -5019,6 +5212,26 @@ free_netdev:
+@@ -5039,6 +5232,26 @@ free_netdev:
return err;
}
void mtk_eth_set_dma_device(struct mtk_eth *eth, struct device *dma_dev)
{
struct net_device *dev, *tmp;
-@@ -5165,7 +5378,8 @@ static int mtk_probe(struct platform_dev
+@@ -5185,7 +5398,8 @@ static int mtk_probe(struct platform_dev
regmap_write(cci, 0, 3);
}
err = mtk_sgmii_init(eth);
if (err)
-@@ -5276,6 +5490,24 @@ static int mtk_probe(struct platform_dev
+@@ -5296,6 +5510,24 @@ static int mtk_probe(struct platform_dev
}
}
if (MTK_HAS_CAPS(eth->soc->caps, MTK_SHARED_INT)) {
err = devm_request_irq(eth->dev, eth->irq[0],
mtk_handle_irq, 0,
-@@ -5386,6 +5618,11 @@ static void mtk_remove(struct platform_d
+@@ -5406,6 +5638,11 @@ static void mtk_remove(struct platform_d
mtk_stop(eth->netdev[i]);
mac = netdev_priv(eth->netdev[i]);
phylink_disconnect_phy(mac->phylink);
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5656,7 +5656,7 @@ static const struct mtk_soc_data mt2701_
+@@ -5676,7 +5676,7 @@ static const struct mtk_soc_data mt2701_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5684,7 +5684,7 @@ static const struct mtk_soc_data mt7621_
+@@ -5704,7 +5704,7 @@ static const struct mtk_soc_data mt7621_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5714,7 +5714,7 @@ static const struct mtk_soc_data mt7622_
+@@ -5734,7 +5734,7 @@ static const struct mtk_soc_data mt7622_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5743,7 +5743,7 @@ static const struct mtk_soc_data mt7623_
+@@ -5763,7 +5763,7 @@ static const struct mtk_soc_data mt7623_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5769,7 +5769,7 @@ static const struct mtk_soc_data mt7629_
+@@ -5789,7 +5789,7 @@ static const struct mtk_soc_data mt7629_
DESC_SIZE(struct mtk_rx_dma),
.irq_done_mask = MTK_RX_DONE_INT,
.dma_l4_valid = RX_DMA_L4_VALID,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
-@@ -5801,7 +5801,7 @@ static const struct mtk_soc_data mt7981_
+@@ -5821,7 +5821,7 @@ static const struct mtk_soc_data mt7981_
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
};
-@@ -5831,7 +5831,7 @@ static const struct mtk_soc_data mt7986_
+@@ -5851,7 +5851,7 @@ static const struct mtk_soc_data mt7986_
.dma_l4_valid = RX_DMA_L4_VALID_V2,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
},
};
-@@ -5884,7 +5884,7 @@ static const struct mtk_soc_data rt5350_
+@@ -5904,7 +5904,7 @@ static const struct mtk_soc_data rt5350_
.dma_l4_valid = RX_DMA_L4_VALID_PDMA,
.dma_max_len = MTK_TX_DMA_BUF_LEN,
.dma_len_offset = 16,
help
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4756,6 +4756,7 @@ static int mtk_get_sset_count(struct net
+@@ -4776,6 +4776,7 @@ static int mtk_get_sset_count(struct net
static void mtk_ethtool_pp_stats(struct mtk_eth *eth, u64 *data)
{
struct page_pool_stats stats = {};
int i;
-@@ -4768,6 +4769,7 @@ static void mtk_ethtool_pp_stats(struct
+@@ -4788,6 +4789,7 @@ static void mtk_ethtool_pp_stats(struct
page_pool_get_stats(ring->page_pool, &stats);
}
page_pool_ethtool_stats_get(data, &stats);