[PATCH 1/6] net: lwip: call sys_check_timeouts and schedule on rx

Tim Harvey tharvey at gateworks.com
Thu May 29 23:49:05 CEST 2025


Call sys_check_timeouts to service lwIP timers and schedule to service
U-Boot tasks and actions during packet rx.

This resolves the issue of an active watchdog resetting the board on
long network activities.

Suggested-by: Jerome Forissier <jerome.forissier at linaro.org>
Signed-off-by: Tim Harvey <tharvey at gateworks.com>
---
 net/lwip/net-lwip.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/net/lwip/net-lwip.c b/net/lwip/net-lwip.c
index f05c4cd3f64f..e8d4cc542ed8 100644
--- a/net/lwip/net-lwip.c
+++ b/net/lwip/net-lwip.c
@@ -13,8 +13,10 @@
 #include <lwip/etharp.h>
 #include <lwip/init.h>
 #include <lwip/prot/etharp.h>
+#include <lwip/timeouts.h>
 #include <net.h>
 #include <timer.h>
+#include <u-boot/schedule.h>
 
 /* xx:xx:xx:xx:xx:xx\0 */
 #define MAC_ADDR_STRLEN 18
@@ -284,6 +286,11 @@ int net_lwip_rx(struct udevice *udev, struct netif *netif)
 	int len;
 	int i;
 
+	/* lwIP timers */
+	sys_check_timeouts();
+	/* Other tasks and actions */
+	schedule();
+
 	if (!eth_is_active(udev))
 		return -EINVAL;
 
-- 
2.25.1



More information about the U-Boot mailing list