From 61095cd78e4b12b3322bcaf994cc116e9ef26b8a Mon Sep 17 00:00:00 2001 From: Parthiban Veerasooran Date: Thu, 17 Jul 2025 12:00:41 +0530 Subject: [PATCH] drivers: ethernet: phy: microchip_t1s: always reschedule phy_monitor_work Previously, phy_monitor_work_handler() would return early without rescheduling the delayed work if the callback (cb) was not set, causing the periodic monitoring to stop. This change ensures that k_work_reschedule() is always called, even when cb is NULL, so monitoring of the PHY state continues. This prevents the monitor from being inadvertently stopped and ensures consistent behavior regardless of callback registration. This issue was observed during testing with the evb-lan8670-rmii (an external LAN8670 PHY) connected to the SAME54 Curiosity Ultra platform. Signed-off-by: Parthiban Veerasooran --- drivers/ethernet/phy/phy_microchip_t1s.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/ethernet/phy/phy_microchip_t1s.c b/drivers/ethernet/phy/phy_microchip_t1s.c index 4dc667c674f..9f7a32338fd 100644 --- a/drivers/ethernet/phy/phy_microchip_t1s.c +++ b/drivers/ethernet/phy/phy_microchip_t1s.c @@ -254,6 +254,7 @@ static void phy_monitor_work_handler(struct k_work *work) const struct device *dev = data->dev; if (!data->cb) { + k_work_reschedule(&data->phy_monitor_work, K_MSEC(CONFIG_PHY_MONITOR_PERIOD)); return; }