From f5f173e2b794bd996fa6171bb6b18f13c4ed1e90 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Mon, 23 May 2016 11:20:20 +0200 Subject: mediatek: update patches * fixes NAND * adds latest ethernet patches Signed-off-by: John Crispin --- .../0102-net-mediatek-v4.4-backports.patch | 51 ++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 target/linux/mediatek/patches-4.4/0102-net-mediatek-v4.4-backports.patch (limited to 'target/linux/mediatek/patches-4.4/0102-net-mediatek-v4.4-backports.patch') diff --git a/target/linux/mediatek/patches-4.4/0102-net-mediatek-v4.4-backports.patch b/target/linux/mediatek/patches-4.4/0102-net-mediatek-v4.4-backports.patch new file mode 100644 index 0000000000..a6b423e6f8 --- /dev/null +++ b/target/linux/mediatek/patches-4.4/0102-net-mediatek-v4.4-backports.patch @@ -0,0 +1,51 @@ +From c1ff5519a7fd849da5d169036d8175383f807962 Mon Sep 17 00:00:00 2001 +From: John Crispin +Date: Mon, 11 Apr 2016 06:00:23 +0200 +Subject: [PATCH 102/102] net: mediatek: v4.4 backports + +--- + drivers/net/ethernet/mediatek/mtk_eth_soc.c | 13 ++++++++----- + 1 file changed, 8 insertions(+), 5 deletions(-) + +diff --git a/drivers/net/ethernet/mediatek/mtk_eth_soc.c b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +index 7788ba6..22caad3 100644 +--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c ++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c +@@ -217,7 +217,7 @@ static int mtk_phy_connect_node(struct mtk_eth *eth, struct mtk_mac *mac, + + dev_info(eth->dev, + "connected mac %d to PHY at %s [uid=%08x, driver=%s]\n", +- mac->id, phydev_name(phydev), phydev->phy_id, ++ mac->id, dev_name(&phydev->dev), phydev->phy_id, + phydev->drv->name); + + mac->phy_dev = phydev; +@@ -1396,6 +1396,7 @@ static int mtk_stop(struct net_device *dev) + struct mtk_mac *mac = netdev_priv(dev); + struct mtk_eth *eth = mac->hw; + ++ netif_carrier_off(dev); + netif_tx_disable(dev); + phy_stop(mac->phy_dev); + +@@ -1595,11 +1596,13 @@ static int mtk_set_settings(struct net_device *dev, + { + struct mtk_mac *mac = netdev_priv(dev); + +- if (cmd->phy_address != mac->phy_dev->mdio.addr) { +- mac->phy_dev = mdiobus_get_phy(mac->hw->mii_bus, +- cmd->phy_address); +- if (!mac->phy_dev) ++ if (cmd->phy_address != mac->phy_dev->addr) { ++ if (mac->hw->mii_bus->phy_map[cmd->phy_address]) { ++ mac->phy_dev = ++ mac->hw->mii_bus->phy_map[cmd->phy_address]; ++ } else { + return -ENODEV; ++ } + } + + return phy_ethtool_sset(mac->phy_dev, cmd); +-- +1.7.10.4 + -- cgit v1.2.3