kernel: backport two fixes for MediaTek Ethernet driver
authorDaniel Golle <daniel@makrotopia.org>
Mon, 11 Sep 2023 11:50:38 +0000 (12:50 +0100)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 11 Sep 2023 13:09:48 +0000 (14:09 +0100)
Fix PSE port assignment for 3rd GMAC on MT7988 and make sure dma_addr
is always initialized to prevent potentially accessing uninitialized
stack memory in the error path.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
15 files changed:
target/linux/generic/backport-5.15/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch [new file with mode: 0644]
target/linux/generic/backport-5.15/750-v6.5-21-net-ethernet-mtk_eth_soc-fix-pse_port-configuration-.patch [new file with mode: 0644]
target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch [new file with mode: 0644]
target/linux/generic/backport-6.1/750-v6.5-21-net-ethernet-mtk_eth_soc-fix-pse_port-configuration-.patch [new file with mode: 0644]
target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
target/linux/generic/pending-5.15/736-01-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch
target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
target/linux/generic/pending-6.1/736-01-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch
target/linux/generic/pending-6.1/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
target/linux/generic/pending-6.1/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch

diff --git a/target/linux/generic/backport-5.15/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch b/target/linux/generic/backport-5.15/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch
new file mode 100644 (file)
index 0000000..7ea0707
--- /dev/null
@@ -0,0 +1,44 @@
+From e10a35abb3da12b812cfb6fc6137926a0c81e39a Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Sun, 10 Sep 2023 22:40:30 +0100
+Subject: [PATCH] net: ethernet: mtk_eth_soc: fix uninitialized variable
+
+Variable dma_addr in function mtk_poll_rx can be uninitialized on
+some of the error paths. In practise this doesn't matter, even random
+data present in uninitialized stack memory can safely be used in the
+way it happens in the error path.
+
+However, in order to make Smatch happy make sure the variable is
+always initialized.
+
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -1941,11 +1941,11 @@ static int mtk_poll_rx(struct napi_struc
+       u8 *data, *new_data;
+       struct mtk_rx_dma_v2 *rxd, trxd;
+       int done = 0, bytes = 0;
++      dma_addr_t dma_addr = DMA_MAPPING_ERROR;
+       while (done < budget) {
+               unsigned int pktlen, *rxdcsum;
+               struct net_device *netdev;
+-              dma_addr_t dma_addr;
+               u32 hash, reason;
+               int mac = 0;
+@@ -2122,7 +2122,8 @@ release_desc:
+               else
+                       rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size);
+-              if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA))
++              if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA) &&
++                  likely(dma_addr != DMA_MAPPING_ERROR))
+                       rxd->rxd2 |= RX_DMA_PREP_ADDR64(dma_addr);
+               ring->calc_idx = idx;
diff --git a/target/linux/generic/backport-5.15/750-v6.5-21-net-ethernet-mtk_eth_soc-fix-pse_port-configuration-.patch b/target/linux/generic/backport-5.15/750-v6.5-21-net-ethernet-mtk_eth_soc-fix-pse_port-configuration-.patch
new file mode 100644 (file)
index 0000000..ac3e3a3
--- /dev/null
@@ -0,0 +1,33 @@
+From 5a124b1fd3e6cb15a943f0cdfe96aa8f6d3d2f39 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo@kernel.org>
+Date: Sat, 9 Sep 2023 20:41:56 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: fix pse_port configuration for
+ MT7988
+
+MT7988 SoC support 3 NICs. Fix pse_port configuration in
+mtk_flow_set_output_device routine if the traffic is offloaded to eth2.
+Rely on mtk_pse_port definitions.
+
+Fixes: 88efedf517e6 ("net: ethernet: mtk_eth_soc: enable nft hw flowtable_offload for MT7988 SoC")
+Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -214,9 +214,11 @@ mtk_flow_set_output_device(struct mtk_et
+       dsa_port = mtk_flow_get_dsa_port(&dev);
+       if (dev == eth->netdev[0])
+-              pse_port = 1;
++              pse_port = PSE_GDM1_PORT;
+       else if (dev == eth->netdev[1])
+-              pse_port = 2;
++              pse_port = PSE_GDM2_PORT;
++      else if (dev == eth->netdev[2])
++              pse_port = PSE_GDM3_PORT;
+       else
+               return -EOPNOTSUPP;
diff --git a/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch b/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch
new file mode 100644 (file)
index 0000000..697c2db
--- /dev/null
@@ -0,0 +1,44 @@
+From e10a35abb3da12b812cfb6fc6137926a0c81e39a Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel@makrotopia.org>
+Date: Sun, 10 Sep 2023 22:40:30 +0100
+Subject: [PATCH] net: ethernet: mtk_eth_soc: fix uninitialized variable
+
+Variable dma_addr in function mtk_poll_rx can be uninitialized on
+some of the error paths. In practise this doesn't matter, even random
+data present in uninitialized stack memory can safely be used in the
+way it happens in the error path.
+
+However, in order to make Smatch happy make sure the variable is
+always initialized.
+
+Signed-off-by: Daniel Golle <daniel@makrotopia.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -1989,11 +1989,11 @@ static int mtk_poll_rx(struct napi_struc
+       u8 *data, *new_data;
+       struct mtk_rx_dma_v2 *rxd, trxd;
+       int done = 0, bytes = 0;
++      dma_addr_t dma_addr = DMA_MAPPING_ERROR;
+       while (done < budget) {
+               unsigned int pktlen, *rxdcsum;
+               struct net_device *netdev;
+-              dma_addr_t dma_addr;
+               u32 hash, reason;
+               int mac = 0;
+@@ -2170,7 +2170,8 @@ release_desc:
+               else
+                       rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size);
+-              if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA))
++              if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA) &&
++                  likely(dma_addr != DMA_MAPPING_ERROR))
+                       rxd->rxd2 |= RX_DMA_PREP_ADDR64(dma_addr);
+               ring->calc_idx = idx;
diff --git a/target/linux/generic/backport-6.1/750-v6.5-21-net-ethernet-mtk_eth_soc-fix-pse_port-configuration-.patch b/target/linux/generic/backport-6.1/750-v6.5-21-net-ethernet-mtk_eth_soc-fix-pse_port-configuration-.patch
new file mode 100644 (file)
index 0000000..ac3e3a3
--- /dev/null
@@ -0,0 +1,33 @@
+From 5a124b1fd3e6cb15a943f0cdfe96aa8f6d3d2f39 Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo@kernel.org>
+Date: Sat, 9 Sep 2023 20:41:56 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: fix pse_port configuration for
+ MT7988
+
+MT7988 SoC support 3 NICs. Fix pse_port configuration in
+mtk_flow_set_output_device routine if the traffic is offloaded to eth2.
+Rely on mtk_pse_port definitions.
+
+Fixes: 88efedf517e6 ("net: ethernet: mtk_eth_soc: enable nft hw flowtable_offload for MT7988 SoC")
+Signed-off-by: Lorenzo Bianconi <lorenzo@kernel.org>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ drivers/net/ethernet/mediatek/mtk_ppe_offload.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -214,9 +214,11 @@ mtk_flow_set_output_device(struct mtk_et
+       dsa_port = mtk_flow_get_dsa_port(&dev);
+       if (dev == eth->netdev[0])
+-              pse_port = 1;
++              pse_port = PSE_GDM1_PORT;
+       else if (dev == eth->netdev[1])
+-              pse_port = 2;
++              pse_port = PSE_GDM2_PORT;
++      else if (dev == eth->netdev[2])
++              pse_port = PSE_GDM3_PORT;
+       else
+               return -EOPNOTSUPP;
index 9a1c26e7aeb36adb985a7b9c9dcda4475e5ba5e6..2eb6dc133cf0394da7156065c63a8aebb82f75ee 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3095,8 +3095,8 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -3096,8 +3096,8 @@ static irqreturn_t mtk_handle_irq_rx(int
  
        eth->rx_events++;
        if (likely(napi_schedule_prep(&eth->rx_napi))) {
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }
  
        return IRQ_HANDLED;
-@@ -3108,8 +3108,8 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -3109,8 +3109,8 @@ static irqreturn_t mtk_handle_irq_tx(int
  
        eth->tx_events++;
        if (likely(napi_schedule_prep(&eth->tx_napi))) {
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }
  
        return IRQ_HANDLED;
-@@ -4883,6 +4883,8 @@ static int mtk_probe(struct platform_dev
+@@ -4884,6 +4884,8 @@ static int mtk_probe(struct platform_dev
         * for NAPI to work
         */
        init_dummy_netdev(&eth->dummy_dev);
index 452e486e8969e251942ff83bd17bfa86d1980f08..305d63d5b731f80b1ad983e9571c4450c7313aeb 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        switch (speed) {
        case SPEED_2500:
        case SPEED_1000:
-@@ -3288,6 +3289,9 @@ found:
+@@ -3289,6 +3290,9 @@ found:
        if (dp->index >= MTK_QDMA_NUM_QUEUES)
                return NOTIFY_DONE;
  
index d648ba4dc7fb3c3cf04e4d66484af28ffd4b3de1..caee22d2e9ebd809e4ce6c4e4607cc7348835c08 100644 (file)
@@ -26,7 +26,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -235,7 +235,8 @@ out:
+@@ -237,7 +237,8 @@ out:
  }
  
  static int
@@ -36,7 +36,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  {
        struct flow_rule *rule = flow_cls_offload_flow_rule(f);
        struct flow_action_entry *act;
-@@ -452,6 +453,7 @@ mtk_flow_offload_replace(struct mtk_eth
+@@ -454,6 +455,7 @@ mtk_flow_offload_replace(struct mtk_eth
        entry->cookie = f->cookie;
        memcpy(&entry->data, &foe, sizeof(entry->data));
        entry->wed_index = wed_index;
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        err = mtk_foe_entry_commit(eth->ppe[entry->ppe_index], entry);
        if (err < 0)
-@@ -520,25 +522,15 @@ mtk_flow_offload_stats(struct mtk_eth *e
+@@ -522,25 +524,15 @@ mtk_flow_offload_stats(struct mtk_eth *e
  
  static DEFINE_MUTEX(mtk_flow_offload_mutex);
  
@@ -73,7 +73,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                break;
        case FLOW_CLS_DESTROY:
                err = mtk_flow_offload_destroy(eth, cls);
-@@ -556,6 +548,23 @@ mtk_eth_setup_tc_block_cb(enum tc_setup_
+@@ -558,6 +550,23 @@ mtk_eth_setup_tc_block_cb(enum tc_setup_
  }
  
  static int
index 7f04fd9fa8648ca0b745bb13ab395e3a56b134a0..983b77d60970abb36e9d2c0676eafde5a9442e30 100644 (file)
@@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                seq_printf(m, "%05x %s %7s", i,
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -499,24 +499,21 @@ static int
+@@ -501,24 +501,21 @@ static int
  mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
  {
        struct mtk_flow_entry *entry;
index 5b7591e22735c46a688c925ac6d46119d99d8117..cc5cf935fd95adcaa18f0255643501be83f48b99 100644 (file)
@@ -478,7 +478,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  static const struct phylink_mac_ops mtk_phylink_ops = {
        .validate = phylink_generic_validate,
        .mac_select_pcs = mtk_mac_select_pcs,
-@@ -4558,8 +4672,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4559,8 +4673,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);
@@ -500,7 +500,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        phylink = phylink_create(&mac->phylink_config,
                                 of_fwnode_handle(mac->of_node),
                                 phy_mode, &mtk_phylink_ops);
-@@ -4752,6 +4879,13 @@ static int mtk_probe(struct platform_dev
+@@ -4753,6 +4880,13 @@ static int mtk_probe(struct platform_dev
  
                if (err)
                        return err;
index da7389689e5eb04584d0a43a0eeacb056bd24a23..c29aa970944517667c6688aba5c99fbfe42f1613 100644 (file)
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3151,8 +3151,8 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -3152,8 +3152,8 @@ static irqreturn_t mtk_handle_irq_rx(int
  
        eth->rx_events++;
        if (likely(napi_schedule_prep(&eth->rx_napi))) {
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }
  
        return IRQ_HANDLED;
-@@ -3164,8 +3164,8 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -3165,8 +3165,8 @@ static irqreturn_t mtk_handle_irq_tx(int
  
        eth->tx_events++;
        if (likely(napi_schedule_prep(&eth->tx_napi))) {
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        }
  
        return IRQ_HANDLED;
-@@ -4937,6 +4937,8 @@ static int mtk_probe(struct platform_dev
+@@ -4938,6 +4938,8 @@ static int mtk_probe(struct platform_dev
         * for NAPI to work
         */
        init_dummy_netdev(&eth->dummy_dev);
index 6790ebd94cf34d9e9ac7c229aea7926c17598ad5..bd883502d3f543bae84d5f619793848f7e354a8e 100644 (file)
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
        switch (speed) {
        case SPEED_2500:
        case SPEED_1000:
-@@ -3344,6 +3345,9 @@ found:
+@@ -3345,6 +3346,9 @@ found:
        if (dp->index >= MTK_QDMA_NUM_QUEUES)
                return NOTIFY_DONE;
  
index c29c63bb1dae89de3daa41dec3d07e97f8f4b3ba..4b97b3d47cbdbf0f9e7b0d2b185642c34261efb7 100644 (file)
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -235,7 +235,8 @@ out:
+@@ -237,7 +237,8 @@ out:
  }
  
  static int
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  {
        struct flow_rule *rule = flow_cls_offload_flow_rule(f);
        struct flow_action_entry *act;
-@@ -452,6 +453,7 @@ mtk_flow_offload_replace(struct mtk_eth
+@@ -454,6 +455,7 @@ mtk_flow_offload_replace(struct mtk_eth
        entry->cookie = f->cookie;
        memcpy(&entry->data, &foe, sizeof(entry->data));
        entry->wed_index = wed_index;
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
  
        err = mtk_foe_entry_commit(eth->ppe[entry->ppe_index], entry);
        if (err < 0)
-@@ -520,25 +522,15 @@ mtk_flow_offload_stats(struct mtk_eth *e
+@@ -522,25 +524,15 @@ mtk_flow_offload_stats(struct mtk_eth *e
  
  static DEFINE_MUTEX(mtk_flow_offload_mutex);
  
@@ -78,7 +78,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                break;
        case FLOW_CLS_DESTROY:
                err = mtk_flow_offload_destroy(eth, cls);
-@@ -556,6 +548,23 @@ mtk_eth_setup_tc_block_cb(enum tc_setup_
+@@ -558,6 +550,23 @@ mtk_eth_setup_tc_block_cb(enum tc_setup_
  }
  
  static int
index e323baeb184a7d084099bf91816c12958f0c567d..d1c153c086b9b6d4f99bb999c56becff989e5813 100644 (file)
@@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau <nbd@nbd.name>
                seq_printf(m, "%05x %s %7s", i,
 --- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
-@@ -499,24 +499,21 @@ static int
+@@ -501,24 +501,21 @@ static int
  mtk_flow_offload_stats(struct mtk_eth *eth, struct flow_cls_offload *f)
  {
        struct mtk_flow_entry *entry;
index 4a9b0889982f12bb2b92b528df3a172f2570d460..500fb550ba8da24c6fca6e71bbf5cf19f6438e74 100644 (file)
@@ -478,7 +478,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
  static const struct phylink_mac_ops mtk_phylink_ops = {
        .validate = phylink_generic_validate,
        .mac_select_pcs = mtk_mac_select_pcs,
-@@ -4612,8 +4726,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4613,8 +4727,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);
@@ -500,7 +500,7 @@ Signed-off-by: Daniel Golle <daniel@makrotopia.org>
        phylink = phylink_create(&mac->phylink_config,
                                 of_fwnode_handle(mac->of_node),
                                 phy_mode, &mtk_phylink_ops);
-@@ -4806,6 +4933,13 @@ static int mtk_probe(struct platform_dev
+@@ -4807,6 +4934,13 @@ static int mtk_probe(struct platform_dev
  
                if (err)
                        return err;
index c458237f3902e83c2a064d78621219ed611ff7e3..632e66eab470fe7dbe228a2ac2343d296319dc91 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: RenĂ© van Dorst <opensource@vdorst.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4553,6 +4553,7 @@ static const struct net_device_ops mtk_n
+@@ -4554,6 +4554,7 @@ static const struct net_device_ops mtk_n
  
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
  {
@@ -22,7 +22,7 @@ Signed-off-by: RenĂ© van Dorst <opensource@vdorst.com>
        const __be32 *_id = of_get_property(np, "reg", NULL);
        phy_interface_t phy_mode;
        struct phylink *phylink;
-@@ -4724,6 +4725,9 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4725,6 +4726,9 @@ static int mtk_add_mac(struct mtk_eth *e
                register_netdevice_notifier(&mac->device_notifier);
        }