The RTL8366S/RB support connecting a second mac to it and using the 5th port as an independent phy. Therefore we need to handle autonegotiation changes for phy 4 like on a single phy device.
This fixes #7980, verified on a WNDR3700. Signed-off-by: Jonas Gorski <[email protected]> --- .../generic/files/drivers/net/phy/rtl8366rb.c | 2 ++ .../linux/generic/files/drivers/net/phy/rtl8366s.c | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c index ec196f9..d3f7b90 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366rb.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366rb.c @@ -1063,6 +1063,8 @@ static int rtl8366rb_phy_config_init(struct phy_device *phydev) static int rtl8366rb_phy_config_aneg(struct phy_device *phydev) { + if (phydev->addr == 4) + return genphy_config_aneg(phydev); return 0; } diff --git a/target/linux/generic/files/drivers/net/phy/rtl8366s.c b/target/linux/generic/files/drivers/net/phy/rtl8366s.c index 66dc2db..7d3f968 100644 --- a/target/linux/generic/files/drivers/net/phy/rtl8366s.c +++ b/target/linux/generic/files/drivers/net/phy/rtl8366s.c @@ -1090,6 +1090,8 @@ static int rtl8366s_phy_config_init(struct phy_device *phydev) static int rtl8366s_phy_config_aneg(struct phy_device *phydev) { + if (phydev->addr == 4) + return genphy_config_aneg(phydev); return 0; } -- 1.5.6.5 _______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
