Skip to contentSkip to conversation

tsnep: Add link down PHY loopback support

PATCH Applied Gerhard Engleder 2 participants 2 messages Jan 23, 2024 – Jan 26, 2024

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 drivers/net/ethernet/engleder/tsnep_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/engleder/tsnep_main.c +3 -1
index df40c720e7b2..0462834cf6e1 100644
@@ -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
 	 * is working immediately by setting link mode directly
 	 */
-	if (!retval && enable)
+	if (!retval && enable) {
+		netif_carrier_on(adapter->netdev);
 		tsnep_set_link_mode(adapter);
+	}
 
 	return retval;
 }
Signature · 1 line
2.39.2
#1 lore raw
This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:

Quoted 8 lines · On Tue, 23 Jan 2024 21:01:51 +0100 you wrote:

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.

[...]

Here is the summary with links:
- [net-next] tsnep: Add link down PHY loopback support

    https://git.kernel.org/netdev/net-next/c/5f76499fb541

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html