2026-05-24 11:10 PM
I am currently using the distribution version:
V5、rt 6.1.82-rt patch、stm32mp257
I am using the TSN mode of the STM32MP257 switch and found that once I set the date, it reverts to the time before the setting after a period of time, and also causes a probabilistic hang during shutdown or reboot.
After investigation,this is caused by the deptp service being enabled in the TSN service.
My current application only uses the switch mode and does not require TSN. Is it appropriate to disable deptp?
What other services can be disabled to enhance system stability?
Solved! Go to Solution.
2026-05-26 4:22 AM
Hello @bugman,
Let me answer to both of your questions.
1) Do you need to keep TSN services if you only want to use switch features ?
No. You can completely remove all that touch about TSN, PTP services and so on to keep only the bare minimum modification you need to make the switch work. In detail, this is the device tree overlay to apply (or your own device tree patch) to use the switch + the Linux kernel modules that you need to compile and deploy to make the switch work as expected (these are the modules fetched under recipes-bsp/drivers folder, deip + edge).
2) The clean reboot is blocked because of TSN service, why ?
It seems to be a bug inside the source code of the edge module that is compiled within the X-LINUX-TSNSWCH Yocto layer. A reference count is not well removed from Linux framework, and the reboot cannot process because it considers that a reference on eth1 is still present in the module. To correct this, you need to patch the edge module like below:
From 931e3802044151a911242d1363efa425c1dbe588 Mon Sep 17 00:00:00 2001
From: Erwan SZYMANSKI <erwan.szymanski@st.com>
Date: Wed, 29 Apr 2026 11:22:43 +0200
Subject: [PATCH] refcount correction
---
edge_com_xmii.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/edge_com_xmii.c b/edge_com_xmii.c
index 81d21b3..08733a3 100644
--- a/edge_com_xmii.c
+++ b/edge_com_xmii.c
@@ -112,6 +112,7 @@ static void edgx_com_xmii_shutdown(struct edgx_com *com)
dev_close(xmii->net);
dev_set_promiscuity(xmii->net, -1);
netdev_rx_handler_unregister(xmii->net);
+ dev_put(xmii->net);
rtnl_unlock();
edgx_com_release(com);
kfree(xmii);
--
2.34.1
Find attached a patch you can apply directly on X-LINUX-TSNSWCH to apply this above patch inside the edge module source code.
I hope it will help you to go forward.
Kind regards,
Erwan.
2026-05-26 4:22 AM
Hello @bugman,
Let me answer to both of your questions.
1) Do you need to keep TSN services if you only want to use switch features ?
No. You can completely remove all that touch about TSN, PTP services and so on to keep only the bare minimum modification you need to make the switch work. In detail, this is the device tree overlay to apply (or your own device tree patch) to use the switch + the Linux kernel modules that you need to compile and deploy to make the switch work as expected (these are the modules fetched under recipes-bsp/drivers folder, deip + edge).
2) The clean reboot is blocked because of TSN service, why ?
It seems to be a bug inside the source code of the edge module that is compiled within the X-LINUX-TSNSWCH Yocto layer. A reference count is not well removed from Linux framework, and the reboot cannot process because it considers that a reference on eth1 is still present in the module. To correct this, you need to patch the edge module like below:
From 931e3802044151a911242d1363efa425c1dbe588 Mon Sep 17 00:00:00 2001
From: Erwan SZYMANSKI <erwan.szymanski@st.com>
Date: Wed, 29 Apr 2026 11:22:43 +0200
Subject: [PATCH] refcount correction
---
edge_com_xmii.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/edge_com_xmii.c b/edge_com_xmii.c
index 81d21b3..08733a3 100644
--- a/edge_com_xmii.c
+++ b/edge_com_xmii.c
@@ -112,6 +112,7 @@ static void edgx_com_xmii_shutdown(struct edgx_com *com)
dev_close(xmii->net);
dev_set_promiscuity(xmii->net, -1);
netdev_rx_handler_unregister(xmii->net);
+ dev_put(xmii->net);
rtnl_unlock();
edgx_com_release(com);
kfree(xmii);
--
2.34.1
Find attached a patch you can apply directly on X-LINUX-TSNSWCH to apply this above patch inside the edge module source code.
I hope it will help you to go forward.
Kind regards,
Erwan.
2026-06-01 7:52 PM
OK. I've fixed my problem by making some modifications here. Thank you!
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.