Commit 5f76499f authored by Gerhard Engleder's avatar Gerhard Engleder Committed by Jakub Kicinski

tsnep: Add link down PHY loopback support

PHY loopback turns off link state change signalling. Therefore, the
loopback only works if the link is already up before the PHY loopback is
activated.

Ensure that PHY loopback works even if the link is not already up during
activation by calling netif_carrier_on() explicitly.
Signed-off-by: default avatarGerhard Engleder <gerhard@engleder-embedded.com>
Link: https://lore.kernel.org/r/20240123200151.60848-1-gerhard@engleder-embedded.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 3df18416
...@@ -229,8 +229,10 @@ static int tsnep_phy_loopback(struct tsnep_adapter *adapter, bool enable) ...@@ -229,8 +229,10 @@ static int tsnep_phy_loopback(struct tsnep_adapter *adapter, bool enable)
* would delay a working loopback anyway, let's ensure that loopback * would delay a working loopback anyway, let's ensure that loopback
* is working immediately by setting link mode directly * is working immediately by setting link mode directly
*/ */
if (!retval && enable) if (!retval && enable) {
netif_carrier_on(adapter->netdev);
tsnep_set_link_mode(adapter); tsnep_set_link_mode(adapter);
}
return retval; return retval;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment