mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-26 17:01:14 +00:00
f0c740650b
The following patches are dropped because they are now upstreamed: - 0002-gpio-stp-xway-Implement-get-callback.patch upstreamed with commit 5b9b2b5284f819 ("gpio: stp-xway: Implement get callback") - 0027-01-net-phy-intel-xway-add-VR9-version-number.patch upstreamed with commit 5b73d9955fb4b0 ("net: phy: intel-xway: add VR9 version number") - 0027-02-net-phy-intel-xway-add-VR9-v1.1-phy-ids.patch upstreamed with commit f452518c982e57 ("net: phy: intel-xway: add VR9 v1.1 phy ids") The following patches were updated: - 0018-MTD-nand-lots-of-xrx200-fixes.patch the mainline driver now resides in drivers/mtd/nand/raw/xway_nand.c (instead of drivers/mtd/nand/xway_nand.c) - 0025-NET-MIPS-lantiq-adds-xrx200-net.patch the DMA API now requires a valid device to be passed to all operations - 0028-NET-lantiq-various-etop-fixes.patch the DMA API now requires a valid device to be passed to all operations Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Mathias Kresin <dev@kresin.me>
38 lines
989 B
Diff
38 lines
989 B
Diff
--- a/drivers/net/ethernet/lantiq_etop.c
|
|
+++ b/drivers/net/ethernet/lantiq_etop.c
|
|
@@ -40,6 +40,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>
|
|
|
|
@@ -569,7 +570,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) {
|
|
@@ -589,7 +591,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;
|
|
}
|