]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: fix phy link up when limiting speed via device tree
authorMugunthan V N <mugunthanvnm@ti.com>
Thu, 25 Jun 2015 16:51:02 +0000 (22:21 +0530)
committerDavid S. Miller <davem@davemloft.net>
Sun, 28 Jun 2015 23:59:10 +0000 (16:59 -0700)
commitce05a2feb1787ee20e752cabd8bc3e4004ede86d
tree476376d86affe32c4f8cfba21565a966886cd756
parent78e97b402bd1e154087e050562b7892e4b75b2a9
net: phy: fix phy link up when limiting speed via device tree

When limiting phy link speed using "max-speed" to 100mbps or less on a
giga bit phy, phy never completes auto negotiation and phy state
machine is held in PHY_AN. Fixing this issue by comparing the giga
bit advertise though phydev->supported doesn't have it but phy has
BMSR_ESTATEN set. So that auto negotiation is restarted as old and
new advertise are different and link comes up fine.

Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c