diff options
author | Gerhard Engleder <gerhard@engleder-embedded.com> | 2025-03-12 21:30:07 +0100 |
---|---|---|
committer | Paolo Abeni <pabeni@redhat.com> | 2025-03-20 08:45:08 +0100 |
commit | 0d60fd50328a96a901b09ed653704ce7f41d15ce (patch) | |
tree | 597298dd516246bde48b7ea7384d9bffaa7d7b2e /include/linux/phy.h | |
parent | 45456e38c44eda2f1285601398fd289b3cec7002 (diff) | |
download | lwn-0d60fd50328a96a901b09ed653704ce7f41d15ce.tar.gz lwn-0d60fd50328a96a901b09ed653704ce7f41d15ce.zip |
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>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r-- | include/linux/phy.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h index 1c05158e9438..60d3b8860ea2 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -1808,7 +1808,7 @@ int phy_init_hw(struct phy_device *phydev); int phy_suspend(struct phy_device *phydev); int phy_resume(struct phy_device *phydev); int __phy_resume(struct phy_device *phydev); -int phy_loopback(struct phy_device *phydev, bool enable); +int phy_loopback(struct phy_device *phydev, bool enable, int speed); int phy_sfp_connect_phy(void *upstream, struct phy_device *phy); void phy_sfp_disconnect_phy(void *upstream, struct phy_device *phy); void phy_sfp_attach(void *upstream, struct sfp_bus *bus); |