net: phy: genphy_loopback: add link speed configuration
authorOleksij Rempel <o.rempel@pengutronix.de>
Mon, 19 Apr 2021 13:01:02 +0000 (15:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 20 Apr 2021 23:08:02 +0000 (16:08 -0700)
commit014068dcb5b17dae110354c4de241833124edba1
tree3499634ec0f208cf20e67d7cb1278c552b4b46c5
parentf4f86d8d2c04bc0c90f8d944a1fcc30349ba01b3
net: phy: genphy_loopback: add link speed configuration

In case of loopback, in most cases we need to disable autoneg support
and force some speed configuration. Otherwise, depending on currently
active auto negotiated link speed, the loopback may or may not work.

This patch was tested with following PHYs: TJA1102, KSZ8081, KSZ9031,
AT8035, AR9331.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
include/linux/phy.h