net: phy: Add phy loopback support in net phy framework
authorLin Yun Sheng <linyunsheng@huawei.com>
Fri, 30 Jun 2017 09:44:15 +0000 (17:44 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jul 2017 09:01:15 +0000 (02:01 -0700)
commitf0f9b4ed23381d97cde2ac64248198bc43608e6d
tree0f771555ccba033f1d5a922785ac5d0f68e53c68
parent6992c6c5dd4756e665824d4bc29f15b85c2907e0
net: phy: Add phy loopback support in net phy framework

This patch add set_loopback in phy_driver, which is used by MAC
driver to enable or disable phy loopback. it also add a generic
genphy_loopback function, which use BMCR loopback bit to enable
or disable loopback.

Signed-off-by: Lin Yun Sheng <linyunsheng@huawei.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c
drivers/net/phy/phy_device.c
include/linux/phy.h