summaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch
diff options
context:
space:
mode:
authorMartin Schiller <ms@dev.tdt.de>2024-05-13 08:42:32 +0200
committerMartin Schiller <ms@dev.tdt.de>2024-05-15 08:54:58 +0200
commitb704c537cfb96e77b4462442681a803b448c91f1 (patch)
treeecef925b30d6814ebb8a1ea69cb6e5a346da290f /target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch
parent2196815961a8fe664c65e5274ef8f9caf0fb2792 (diff)
downloadopenwrt-b704c537cfb96e77b4462442681a803b448c91f1.tar.gz
openwrt-b704c537cfb96e77b4462442681a803b448c91f1.tar.bz2
openwrt-b704c537cfb96e77b4462442681a803b448c91f1.zip
kernel/lantiq: Restore kernel files for v5.15
This is an automatically generated commit which aids following Kernel patch history, as git will see the move and copy as a rename thus defeating the purpose. For the original discussion see: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html Signed-off-by: Martin Schiller <ms@dev.tdt.de>
Diffstat (limited to 'target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch')
-rw-r--r--target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch47
1 files changed, 47 insertions, 0 deletions
diff --git a/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch b/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch
new file mode 100644
index 0000000000..7e49b47e02
--- /dev/null
+++ b/target/linux/lantiq/patches-5.15/0701-NET-lantiq-etop-of-mido.patch
@@ -0,0 +1,47 @@
+From 870ed9cae083ff8a60a739ef7e74c5a1800533be Mon Sep 17 00:00:00 2001
+From: Johann Neuhauser <johann@it-neuhauser.de>
+Date: Thu, 17 May 2018 19:12:35 +0200
+Subject: [PATCH] net: lantiq_etop: of mdio
+
+Signed-off-by: Johann Neuhauser <johann@it-neuhauser.de>
+---
+ drivers/net/ethernet/lantiq_etop.c | 555 +++++++++++++++++++++++++-----------
+ 1 file changed, 389 insertions(+), 166 deletions(-)
+
+--- a/drivers/net/ethernet/lantiq_etop.c
++++ b/drivers/net/ethernet/lantiq_etop.c
+@@ -30,6 +30,7 @@
+ #include <linux/of_net.h>
+ #include <linux/of_irq.h>
+ #include <linux/of_platform.h>
++#include <linux/of_mdio.h>
+
+ #include <asm/checksum.h>
+
+@@ -553,7 +554,8 @@ static int
+ ltq_etop_mdio_init(struct net_device *dev)
+ {
+ struct ltq_etop_priv *priv = netdev_priv(dev);
+- int err;
++ struct device_node *mdio_np = NULL;
++ int err, ret;
+
+ priv->mii_bus = mdiobus_alloc();
+ if (!priv->mii_bus) {
+@@ -573,7 +575,15 @@ ltq_etop_mdio_init(struct net_device *de
+ priv->mii_bus->name = "ltq_mii";
+ snprintf(priv->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
+ priv->pdev->name, priv->pdev->id);
+- if (mdiobus_register(priv->mii_bus)) {
++
++ mdio_np = of_get_child_by_name(priv->pdev->dev.of_node, "mdio-bus");
++
++ if (mdio_np)
++ ret = of_mdiobus_register(priv->mii_bus, mdio_np);
++ else
++ ret = mdiobus_register(priv->mii_bus);
++
++ if (ret) {
+ err = -ENXIO;
+ goto err_out_free_mdiobus;
+ }