mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-09 03:20:05 +00:00
net: phy: Support speed selection for PHY loopback
phy_loopback() leaves it to the PHY driver to select the speed of the loopback mode. Thus, the speed of the loopback mode depends on the PHY driver in use. Add support for speed selection to phy_loopback() to enable loopback with defined speeds. Ensure that link up is signaled if speed changes as speed is not allowed to change during link up. Link down and up is necessary for a new speed. Signed-off-by: Gerhard Engleder <gerhard@engleder-embedded.com> Link: https://patch.msgid.link/20250312203010.47429-3-gerhard@engleder-embedded.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
This commit is contained in:
committed by
Paolo Abeni
parent
45456e38c4
commit
0d60fd5032
@@ -299,7 +299,7 @@ static int net_test_phy_loopback_enable(struct net_device *ndev)
|
||||
if (!ndev->phydev)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return phy_loopback(ndev->phydev, true);
|
||||
return phy_loopback(ndev->phydev, true, 0);
|
||||
}
|
||||
|
||||
static int net_test_phy_loopback_disable(struct net_device *ndev)
|
||||
@@ -307,7 +307,7 @@ static int net_test_phy_loopback_disable(struct net_device *ndev)
|
||||
if (!ndev->phydev)
|
||||
return -EOPNOTSUPP;
|
||||
|
||||
return phy_loopback(ndev->phydev, false);
|
||||
return phy_loopback(ndev->phydev, false, 0);
|
||||
}
|
||||
|
||||
static int net_test_phy_loopback_udp(struct net_device *ndev)
|
||||
|
||||
Reference in New Issue
Block a user