ar8216: use genphy_config_aneg also for PHY 0
authorFelix Fietkau <nbd@openwrt.org>
Wed, 19 Nov 2014 20:18:01 +0000 (20:18 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 19 Nov 2014 20:18:01 +0000 (20:18 +0000)
commit43e3e88379e688de4c2165116722d99abaeeeffe
tree8088e2fb721fba16adc8f5b3a128d890b812ede9
parent898712f43f30f464e0a31f8d3f1e9e272eafb6aa
ar8216: use genphy_config_aneg also for PHY 0

Kernel 3.14 introduced a switch reset in phy_init_hw in drivers/net/phy
causing BMCR_ANENABLE to get cleared.

Due to the fact that ar8xxx_phy_config_aneg does nothing for
PHY 0 autonegatiation support remains disabled.
This can cause ports to operate at 10MBit/half-duplex only.

Fix this by calling genphy_config_aneg for PHY 0 too as
genphy_config_aneg sets BMCR_ANENABLE if it's not yet set.
Fixes: ticket 17800
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
SVN-Revision: 43332
target/linux/generic/files/drivers/net/phy/ar8216.c