diff mbox series

[net-next] tsnep: Add link down PHY loopback support

Message ID 20240123200151.60848-1-gerhard@engleder-embedded.com (mailing list archive)
State Accepted
Commit 5f76499fb541c3e8ae401414bfdf702940c8c531
Delegated to: Netdev Maintainers
Headers show
Series [net-next] tsnep: Add link down PHY loopback support | expand

Checks

Context Check Description
netdev/apply success Patch already applied to net-next
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 1078 this patch: 1078
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 0 of 0 maintainers
netdev/build_clang success Errors and warnings before: 1095 this patch: 1095
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 1096 this patch: 1096
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 11 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest success net-next-2024-01-25--06-00 (tests: 521)

Commit Message

Gerhard Engleder Jan. 23, 2024, 8:01 p.m. UTC
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: Gerhard Engleder <gerhard@engleder-embedded.com>
---
 drivers/net/ethernet/engleder/tsnep_main.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Comments

patchwork-bot+netdevbpf@kernel.org Jan. 26, 2024, 2:20 a.m. UTC | #1
Hello:

This patch was applied to netdev/net-next.git (main)
by Jakub Kicinski <kuba@kernel.org>:

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!
diff mbox series

Patch

diff --git a/drivers/net/ethernet/engleder/tsnep_main.c b/drivers/net/ethernet/engleder/tsnep_main.c
index df40c720e7b2..0462834cf6e1 100644
--- a/drivers/net/ethernet/engleder/tsnep_main.c
+++ b/drivers/net/ethernet/engleder/tsnep_main.c
@@ -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;
 }