err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
if (err) {
netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
-@@ -3215,6 +3160,39 @@ static int mtk_open(struct net_device *d
+@@ -3215,6 +3160,35 @@ static int mtk_open(struct net_device *d
phylink_start(mac->phylink);
netif_tx_start_all_queues(dev);
+ val &= ~MTK_CDMP_STAG_EN;
+ mtk_w32(eth, val, MTK_CDMP_IG_CTRL);
+
-+ val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
-+ val &= ~MTK_CDMQ_STAG_EN;
-+ mtk_w32(eth, val, MTK_CDMQ_IG_CTRL);
-+
+ mtk_w32(eth, 0, MTK_CDMP_EG_CTRL);
+ }
+
return 0;
}
-@@ -3508,10 +3486,9 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3508,10 +3482,9 @@ static int mtk_hw_init(struct mtk_eth *e
if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
/* set interrupt delays based on current Net DIM sample */
mtk_dim_rx(ð->rx_dim.work);
-@@ -4132,7 +4109,7 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4132,7 +4105,7 @@ static int mtk_add_mac(struct mtk_eth *e
eth->netdev[id]->hw_features |= NETIF_F_LRO;
eth->netdev[id]->vlan_features = eth->soc->hw_features &
--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4021,6 +4021,7 @@ static const struct net_device_ops mtk_n
+@@ -3994,6 +3994,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;
-@@ -4149,6 +4150,9 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4122,6 +4123,9 @@ static int mtk_add_mac(struct mtk_eth *e
register_netdevice_notifier(&mac->device_notifier);
}