aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorSergey Ryazanov <ryazanov.s.a@gmail.com>2017-06-07 01:25:31 +0300
committerJohn Crispin <john@phrozen.org>2017-06-07 11:06:12 +0200
commit913b2290caad437bb523d6f1ee5a70707f7f7ef4 (patch)
tree7acf08a297ddcda8832204ab2e71bf905cfd7695 /target/linux
parentcc722bec9736c443b7217109bd74a3d65f383a47 (diff)
downloadupstream-913b2290caad437bb523d6f1ee5a70707f7f7ef4.tar.gz
upstream-913b2290caad437bb523d6f1ee5a70707f7f7ef4.tar.bz2
upstream-913b2290caad437bb523d6f1ee5a70707f7f7ef4.zip
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@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/generic/files/drivers/net/phy/mvswitch.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/mvswitch.c b/target/linux/generic/files/drivers/net/phy/mvswitch.c
index a20fce342e..043978feb9 100644
--- a/target/linux/generic/files/drivers/net/phy/mvswitch.c
+++ b/target/linux/generic/files/drivers/net/phy/mvswitch.c
@@ -346,6 +346,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;
@@ -417,6 +423,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,
};