]> www.infradead.org Git - users/jedix/linux-maple.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Jul 2015 16:49:31 +0000 (09:49 -0700)
commit6c10c84170c40bf3d4a9953ae5a2ffe59ad736d4
tree5ce9644918052bd67869b726c2a07f00aacef86b
parent62a9ad17a245002cc611fc4667c2919ef422d8ee
net: phy: fix phy link up when limiting speed via device tree

[ Upstream commit eb686231fce3770299760f24fdcf5ad041f44153 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/phy/phy_device.c