[source] mvswitch: fix autonegotiation issue
LEDE Commits
lede-commits at lists.infradead.org
Thu Dec 14 09:44:29 PST 2017
jow pushed a commit to source.git, branch lede-17.01:
https://git.lede-project.org/816fb3433b48af45a6e48bd2810950f71d27535f
commit 816fb3433b48af45a6e48bd2810950f71d27535f
Author: Sergey Ryazanov <ryazanov.s.a at gmail.com>
AuthorDate: Wed Jun 7 01:25:31 2017 +0300
mvswitch: fix autonegotiation issue
The Marvel 88E6060 switch has an MDIO interface, but does not emulate
regular PHY behavior for the host. The network core can not detect using
the generic code, whether the connection via the attached PHY can be
used or not. The PHY's state machine is stuck in a state of
auto-negotiation and does not go any further so the Ethernet interface
of the router stay forever in the not-runing state.
Fix this issue by implementing the aneg_done callback to be able to
inform the network core that the Ethernet interface link to which the
switch is connected can be marked as RUNNING.
Signed-off-by: Sergey Ryazanov <ryazanov.s.a at gmail.com>
(cherry picked from commit 913b2290caad437bb523d6f1ee5a70707f7f7ef4)
---
target/linux/generic/files/drivers/net/phy/mvswitch.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/target/linux/generic/files/drivers/net/phy/mvswitch.c b/target/linux/generic/files/drivers/net/phy/mvswitch.c
index af31d0b..b2dfe0b 100644
--- a/target/linux/generic/files/drivers/net/phy/mvswitch.c
+++ b/target/linux/generic/files/drivers/net/phy/mvswitch.c
@@ -342,6 +342,12 @@ mvswitch_read_status(struct phy_device *pdev)
}
static int
+mvswitch_aneg_done(struct phy_device *phydev)
+{
+ return 1; /* Return any positive value */
+}
+
+static int
mvswitch_config_aneg(struct phy_device *phydev)
{
return 0;
@@ -412,6 +418,7 @@ static struct phy_driver mvswitch_driver = {
.detach = &mvswitch_detach,
.config_init = &mvswitch_config_init,
.config_aneg = &mvswitch_config_aneg,
+ .aneg_done = &mvswitch_aneg_done,
.read_status = &mvswitch_read_status,
.driver = { .owner = THIS_MODULE,},
};
More information about the lede-commits
mailing list