[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.3-388-g149604c
Brought to you by:
sszy
|
From: Gwenhael Goavec-M. <gwe...@us...> - 2014-08-14 14:37:32
|
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 149604c9024176b5ba3272ce82115f2419ee451a (commit)
from 5d9f505d4218302284ed719270d942f57220e4d0 (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 149604c9024176b5ba3272ce82115f2419ee451a
Author: Gwenhael Goavec-Merou <gwe...@tr...>
Date: Thu Aug 14 16:36:58 2014 +0200
[LINUX][3.16] net: phy: fix LAN8700 phy reset
-----------------------------------------------------------------------
Summary of changes:
.../0232-armadeus-net-phy-fix_smsc_reset.patch | 83 ++++++++++++++++++++
1 files changed, 83 insertions(+), 0 deletions(-)
create mode 100644 patches/linux/3.16/0232-armadeus-net-phy-fix_smsc_reset.patch
diff --git a/patches/linux/3.16/0232-armadeus-net-phy-fix_smsc_reset.patch b/patches/linux/3.16/0232-armadeus-net-phy-fix_smsc_reset.patch
new file mode 100644
index 0000000..c946277
--- /dev/null
+++ b/patches/linux/3.16/0232-armadeus-net-phy-fix_smsc_reset.patch
@@ -0,0 +1,83 @@
+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...>
+---
+--- linux-3.16/drivers/net/phy/smsc.c
++++ linux-3.16/drivers/net/phy/smsc.c
+@@ -43,6 +43,22 @@ static int smsc_phy_ack_interrupt(struct
+
+ static int smsc_phy_config_init(struct phy_device *phydev)
+ {
++ int rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
++
++ if (rc < 0)
++ return rc;
++
++ /* Enable energy detect mode for this SMSC Transceivers */
++ rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS,
++ rc | MII_LAN83C185_EDPWRDOWN);
++ if (rc < 0)
++ return rc;
++
++ return smsc_phy_ack_interrupt(phydev);
++}
++
++static int smsc_phy_reset(struct phy_device *phydev)
++{
+ int rc = phy_read(phydev, MII_LAN83C185_SPECIAL_MODES);
+ if (rc < 0)
+ return rc;
+@@ -66,18 +82,7 @@ static int smsc_phy_config_init(struct p
+ rc = phy_read(phydev, MII_BMCR);
+ } while (rc & BMCR_RESET);
+ }
+-
+- rc = phy_read(phydev, MII_LAN83C185_CTRL_STATUS);
+- if (rc < 0)
+- return rc;
+-
+- /* Enable energy detect mode for this SMSC Transceivers */
+- rc = phy_write(phydev, MII_LAN83C185_CTRL_STATUS,
+- rc | MII_LAN83C185_EDPWRDOWN);
+- if (rc < 0)
+- return rc;
+-
+- return smsc_phy_ack_interrupt (phydev);
++ return 0;
+ }
+
+ static int lan911x_config_init(struct phy_device *phydev)
+@@ -142,6 +147,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 +170,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 +193,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 +238,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,
hooks/post-receive
--
armadeus
|