[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-509-gd5a9f6c
Brought to you by:
sszy
|
From: Gwenhael Goavec-M. <gwe...@us...> - 2014-12-12 11:03:55
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via d5a9f6ce6bcbbf9ccd11060a5232aadffe34a326 (commit)
from 7c70b91863f01e1f9a553cbfdbcb6dfd29242c12 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d5a9f6ce6bcbbf9ccd11060a5232aadffe34a326
Author: Gwenhael Goavec-Merou <gwe...@tr...>
Date: Fri Dec 12 12:04:40 2014 +0100
[LINUX] apf27: 3.14: backport and adapt patch 0232 from 3.16
-----------------------------------------------------------------------
Summary of changes:
.../0232-armadeus-net-phy-fix_smsc_reset.patch | 116 ++++++++++++++++++++
1 files changed, 116 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/3.14/0232-armadeus-net-phy-fix_smsc_reset.patch
diff --git a/patches/linux/3.14/0232-armadeus-net-phy-fix_smsc_reset.patch b/patches/linux/3.14/0232-armadeus-net-phy-fix_smsc_reset.patch
new file mode 100644
index 0000000..ef0e5d8
--- /dev/null
+++ b/patches/linux/3.14/0232-armadeus-net-phy-fix_smsc_reset.patch
@@ -0,0 +1,116 @@
+LAN87xx needs to be wake up before reset. By default, smsc driver does not
+provides soft_reset function and it's the default reset function is used. Due
+to that, the phy initialization fails.
+
+Signed-off-by: Gwenhael Goavec-Merou <gwe...@ar...>
+---
+Index: linux-3.14.17/drivers/net/phy/phy_device.c
+===================================================================
+--- linux-3.14.17.orig/drivers/net/phy/phy_device.c
++++ linux-3.14.17/drivers/net/phy/phy_device.c
+@@ -539,17 +539,20 @@ int phy_init_hw(struct phy_device *phyde
+ if (!phydev->drv || !phydev->drv->config_init)
+ return 0;
+
+- ret = phy_write(phydev, MII_BMCR, BMCR_RESET);
+- if (ret < 0)
+- return ret;
++ if (!phydev->drv->soft_reset) {
++ ret = phy_write(phydev, MII_BMCR, BMCR_RESET);
++ if (ret < 0)
++ return ret;
+
+- ret = phy_poll_reset(phydev);
+- if (ret < 0)
+- return ret;
++ ret = phy_poll_reset(phydev);
++ if (ret < 0)
++ return ret;
+
+- ret = phy_scan_fixups(phydev);
+- if (ret < 0)
+- return ret;
++ ret = phy_scan_fixups(phydev);
++ if (ret < 0)
++ return ret;
++ } else
++ phydev->drv->soft_reset(phydev);
+
+ return phydev->drv->config_init(phydev);
+ }
+Index: linux-3.14.17/drivers/net/phy/smsc.c
+===================================================================
+--- linux-3.14.17.orig/drivers/net/phy/smsc.c
++++ linux-3.14.17/drivers/net/phy/smsc.c
+@@ -41,7 +41,8 @@ static int smsc_phy_ack_interrupt(struct
+ return rc < 0 ? rc : 0;
+ }
+
+-static int smsc_phy_config_init(struct phy_device *phydev)
++
++static int smsc_phy_reset(struct phy_device *phydev)
+ {
+ int rc = phy_read(phydev, MII_LAN83C185_SPECIAL_MODES);
+ if (rc < 0)
+@@ -67,7 +68,13 @@ static int smsc_phy_config_init(struct p
+ } while (rc & BMCR_RESET);
+ }
+
+- rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
++ return 0;
++}
++
++static int smsc_phy_config_init(struct phy_device *phydev)
++{
++
++ int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
+ if (rc < 0)
+ return rc;
+
+@@ -142,6 +149,7 @@ static struct phy_driver smsc_phy_driver
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .config_init = smsc_phy_config_init,
++ .soft_reset = smsc_phy_reset,
+
+ /* IRQ related */
+ .ack_interrupt = smsc_phy_ack_interrupt,
+@@ -164,6 +172,7 @@ static struct phy_driver smsc_phy_driver
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .config_init = smsc_phy_config_init,
++ .soft_reset = smsc_phy_reset,
+
+ /* IRQ related */
+ .ack_interrupt = smsc_phy_ack_interrupt,
+@@ -186,6 +195,7 @@ static struct phy_driver smsc_phy_driver
+ .config_aneg = genphy_config_aneg,
+ .read_status = genphy_read_status,
+ .config_init = smsc_phy_config_init,
++ .soft_reset = smsc_phy_reset,
+
+ /* IRQ related */
+ .ack_interrupt = smsc_phy_ack_interrupt,
+@@ -230,6 +240,7 @@ static struct phy_driver smsc_phy_driver
+ .config_aneg = genphy_config_aneg,
+ .read_status = lan87xx_read_status,
+ .config_init = smsc_phy_config_init,
++ .soft_reset = smsc_phy_reset,
+
+ /* IRQ related */
+ .ack_interrupt = smsc_phy_ack_interrupt,
+Index: linux-3.14.17/include/linux/phy.h
+===================================================================
+--- linux-3.14.17.orig/include/linux/phy.h
++++ linux-3.14.17/include/linux/phy.h
+@@ -399,6 +399,10 @@ struct phy_driver {
+ */
+ int (*config_init)(struct phy_device *phydev);
+
++ /* specific reset */
++ int (*soft_reset)(struct phy_device *dev);
++
++
+ /*
+ * Called during discovery. Used to set
+ * up device-specific structures, if any
hooks/post-receive
--
armadeus
|