aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorSergey Ryazanov <ryazanov.s.a@gmail.com>2017-10-16 02:31:18 +0300
committerJohn Crispin <john@phrozen.org>2017-11-06 16:39:41 +0100
commit204f3f5987bacf725394dbdd6497b4972db5056e (patch)
tree3fdc29cb13dcf0c1f2bcfeb7892ae8613d08fa84 /target
parent6d2f3b1b1974d742576b0902e9c4777c9ac1ba67 (diff)
downloadupstream-204f3f5987bacf725394dbdd6497b4972db5056e.tar.gz
upstream-204f3f5987bacf725394dbdd6497b4972db5056e.tar.bz2
upstream-204f3f5987bacf725394dbdd6497b4972db5056e.zip
ixp4xx: fix non-standard phy support
The patch, which adds multiphy support, adds new path for non-standard PHYs (e.g. MV88E6060 switch IC) to avoid using kernel phy framework. All work well except the link status traking (Duplex and Speed), which is reseted as soon as PHY connection procedure is done. This leads to lost of the link status of non-standard PHY, which is configured exactly in the ixp4xx_phy_connect() function. Move the generic reset of a link state to the ixp4xx_phy_connect() function to the code path, which is intended for handling of a normal PHY. Reported-by: Nerijus Baliunas <nerijus@users.sourceforge.net> Tested-by: Nerijus Baliunas <nerijus@users.sourceforge.net> Signed-off-by: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Diffstat (limited to 'target')
-rw-r--r--target/linux/ixp4xx/patches-4.4/207-npe_driver_multiphy_support.patch28
1 files changed, 25 insertions, 3 deletions
diff --git a/target/linux/ixp4xx/patches-4.4/207-npe_driver_multiphy_support.patch b/target/linux/ixp4xx/patches-4.4/207-npe_driver_multiphy_support.patch
index 207ccc533a..33c3327ee9 100644
--- a/target/linux/ixp4xx/patches-4.4/207-npe_driver_multiphy_support.patch
+++ b/target/linux/ixp4xx/patches-4.4/207-npe_driver_multiphy_support.patch
@@ -66,7 +66,18 @@ TODO: take care of additional PHYs through the PHY abstraction layer
snprintf(phy_id, MII_BUS_ID_SIZE + 3, PHY_ID_FMT,
mdio_bus->id, plat->phy);
port->phydev = phy_connect(dev, phy_id, &ixp4xx_adjust_link,
-@@ -632,21 +663,32 @@ static void ixp4xx_phy_disconnect(struct
+@@ -625,6 +656,10 @@ static int ixp4xx_phy_connect(struct net
+
+ port->phydev->irq = PHY_POLL;
+
++ port->link = 0;
++ port->speed = 0;
++ port->duplex = -1;
++
+ return 0;
+ }
+
+@@ -632,21 +667,32 @@ static void ixp4xx_phy_disconnect(struct
{
struct port *port = netdev_priv(dev);
@@ -102,7 +113,7 @@ TODO: take care of additional PHYs through the PHY abstraction layer
}
static inline void debug_pkt(struct net_device *dev, const char *func,
-@@ -1048,6 +1090,9 @@ static int eth_ioctl(struct net_device *
+@@ -1048,6 +1094,9 @@ static int eth_ioctl(struct net_device *
return hwtstamp_get(dev, req);
}
@@ -112,7 +123,7 @@ TODO: take care of additional PHYs through the PHY abstraction layer
return phy_mii_ioctl(port->phydev, req, cmd);
}
-@@ -1068,18 +1113,30 @@ static void ixp4xx_get_drvinfo(struct ne
+@@ -1068,18 +1117,30 @@ static void ixp4xx_get_drvinfo(struct ne
static int ixp4xx_get_settings(struct net_device *dev, struct ethtool_cmd *cmd)
{
struct port *port = netdev_priv(dev);
@@ -143,3 +154,14 @@ TODO: take care of additional PHYs through the PHY abstraction layer
return phy_start_aneg(port->phydev);
}
+@@ -1529,10 +1590,6 @@ static int eth_init_one(struct platform_
+ if ((err = register_netdev(dev)))
+ goto err_phy_dis;
+
+- port->link = 0;
+- port->speed = 0;
+- port->duplex = -1;
+-
+ printk(KERN_INFO "%s: MII PHY %i on %s\n", dev->name, plat->phy,
+ npe_name(port->npe));
+