mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-20 14:13:16 +00:00
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>
This commit is contained in:
parent
cc722bec97
commit
913b2290ca
@ -345,6 +345,12 @@ mvswitch_read_status(struct phy_device *pdev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
mvswitch_aneg_done(struct phy_device *phydev)
|
||||
{
|
||||
return 1; /* Return any positive value */
|
||||
}
|
||||
|
||||
static int
|
||||
mvswitch_config_aneg(struct phy_device *phydev)
|
||||
{
|
||||
@ -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,
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user