]> git.baikalelectronics.ru Git - kernel.git/commit
net: emac: fix and unify emac_mdio functions
authorChristian Lamparter <chunkeey@googlemail.com>
Wed, 7 Jun 2017 13:51:16 +0000 (15:51 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Jun 2017 14:47:21 +0000 (10:47 -0400)
commit6e78033c068c8216df6c3490de6ea2f4d9e8d2d4
tree51698df53e2c3960035b032ae383fdbbf33a1285
parenteff7f160db0ecd57fea571f43de870201f063725
net: emac: fix and unify emac_mdio functions

emac_mdio_read_link() was not copying the requested phy settings
back into the emac driver's own phy api. This has caused a link
speed mismatch issue for the AR8035 as the emac driver kept
trying to connect with 10/100MBps on a 1GBit/s link.

This patch also unifies shared code between emac_setup_aneg()
and emac_mdio_setup_forced(). And furthermore it removes
a chunk of emac_mdio_init_phy(), that was copying the same
data into itself.

Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/emac/core.c