aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
diff options
context:
space:
mode:
authorMathias Kresin <dev@kresin.me>2020-12-27 10:28:08 +0100
committerMathias Kresin <dev@kresin.me>2021-04-12 23:23:09 +0200
commit0806f8fc80e602b88ac80a334dccf07e1334d416 (patch)
tree918883ea539610575b67ca38142bddc0d64608f9 /target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
parente44e454ee65bb0631fbea64ea1e30b40735ed97b (diff)
downloadupstream-0806f8fc80e602b88ac80a334dccf07e1334d416.tar.gz
upstream-0806f8fc80e602b88ac80a334dccf07e1334d416.tar.bz2
upstream-0806f8fc80e602b88ac80a334dccf07e1334d416.zip
lantiq: add Linux 5.10 support as testing kernel
Following changes are made to the Lantiq kernel patches: 0001-MIPS-lantiq-add-pcie-driver.patch The pci header isn't included by the of_pci header any longer 0024-MIPS-lantiq-revert-DSA-switch-driver-PMU-clock-chang.patch Due to the merge of grx390 and ar10 clocks, extend support to grx390 0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch The do_carrier arguments was dropped from phy_link_change. The phylib has always sets the third parameter to true so the flag is always changed anyway. of_get_phy_mode() returns an error, or 0 on success, and pass a pointer, of type phy_interface_t, where the phy mode should be stored now. So far an error wasn't considered. Print at least an error message if something unexpected happens. The stuck queue is now passed to xrx200_tx_timeout (the timeout handler) but not used so far. 0028-NET-lantiq-various-etop-fixes.patch ioremap has provided non-cached semantics by default since the Linux 2.6 days and was removed with kernel version 5.6. of_get_phy_mode() returns an error, or 0 on success, and pass a pointer, of type phy_interface_t, where the phy mode should be stored now. So far an error wasn't considered. Print at least an error message if something unexpected happens. 0042-arch-mips-increase-io_space_limit.patch Move IO space extension to laniq specific file Signed-off-by: Mathias Kresin <dev@kresin.me>
Diffstat (limited to 'target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch')
-rw-r--r--target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch31
1 files changed, 17 insertions, 14 deletions
diff --git a/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch b/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
index 6a2143e17e..d95e36caad 100644
--- a/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
+++ b/target/linux/lantiq/patches-5.10/0025-NET-MIPS-lantiq-adds-xrx200-legacy.patch
@@ -16,24 +16,24 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
--- a/drivers/net/ethernet/Kconfig
+++ b/drivers/net/ethernet/Kconfig
-@@ -108,7 +108,13 @@ config LANTIQ_ETOP
+@@ -107,7 +107,13 @@ config LANTIQ_ETOP
tristate "Lantiq SoC ETOP driver"
depends on SOC_TYPE_XWAY
- ---help---
+ help
- Support for the MII0 inside the Lantiq SoC
+ Support for the MII0 inside the Lantiq ADSL SoC
+
+config LANTIQ_XRX200_LEGACY
+ tristate "Lantiq SoC XRX200 driver"
+ depends on SOC_TYPE_XWAY
-+ ---help---
++ help
+ Support for the MII0 inside the Lantiq VDSL SoC
config LANTIQ_XRX200
tristate "Lantiq / Intel xRX200 PMAC network driver"
--- a/drivers/net/ethernet/Makefile
+++ b/drivers/net/ethernet/Makefile
-@@ -51,6 +51,7 @@ obj-$(CONFIG_JME) += jme.o
+@@ -50,6 +50,7 @@ obj-$(CONFIG_JME) += jme.o
obj-$(CONFIG_KORINA) += korina.o
obj-$(CONFIG_LANTIQ_ETOP) += lantiq_etop.o
obj-$(CONFIG_LANTIQ_XRX200) += lantiq_xrx200.o
@@ -209,7 +209,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+};
--- /dev/null
+++ b/drivers/net/ethernet/lantiq_xrx200_legacy.c
-@@ -0,0 +1,1927 @@
+@@ -0,0 +1,1930 @@
+/*
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 as published
@@ -1281,7 +1281,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+ return &priv->stats;
+}
+
-+static void xrx200_tx_timeout(struct net_device *dev)
++static void xrx200_tx_timeout(struct net_device *dev, unsigned int txqueue)
+{
+ struct xrx200_priv *priv = netdev_priv(dev);
+
@@ -1570,16 +1570,14 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+ return 0;
+}
+
-+static void xrx200_phy_link_change(struct phy_device *phydev, bool up, bool do_carrier)
++static void xrx200_phy_link_change(struct phy_device *phydev, bool up)
+{
+ struct net_device *netdev = phydev->attached_dev;
+
-+ if (do_carrier) {
-+ if (up)
-+ netif_carrier_on(netdev);
-+ else if (!xrx200_phy_has_link(netdev))
-+ netif_carrier_off(netdev);
-+ }
++ if (up)
++ netif_carrier_on(netdev);
++ else if (!xrx200_phy_has_link(netdev))
++ netif_carrier_off(netdev);
+
+ phydev->adjust_link(netdev);
+}
@@ -1897,6 +1895,7 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+{
+ const __be32 *addr, *id = of_get_property(port, "reg", NULL);
+ struct xrx200_port *p = &priv->port[priv->num_port];
++ int ret;
+
+ if (!id)
+ return;
@@ -1909,7 +1908,11 @@ Subject: NET: MIPS: lantiq: adds xrx200 ethernet and switch driver
+
+ p->num = *id;
+ p->phy_addr = *addr;
-+ p->phy_if = of_get_phy_mode(port);
++
++ ret = of_get_phy_mode(port, &p->phy_if);
++ if (ret)
++ pr_err("Can't find phy-mode for port\n");
++
+ if (p->phy_addr > 0x10)
+ p->flags = XRX200_PORT_TYPE_MAC;
+ else