mpfs/ethernet: Move txtimeout from HPWORK to LPWORK

- Use LPWORK by default if CONFIG_MPFS_ETHMAC_HPWORK is not defined
- Always use LPWORK for timeouts; this makes very lengthy operations such as re-initializing PHY.

Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
Jukka Laitinen 2025-03-11 15:01:09 +02:00 committed by Xiang Xiao
parent d9ee02bc2e
commit f3142be127
2 changed files with 9 additions and 3 deletions

View file

@ -767,6 +767,13 @@ endchoice # GMAC speed
endif # !MPFS_MAC_AUTONEG
config MPFS_ETHMAC_HPWORK
bool "Use HP workqueue"
default n
depends on MPFS_ETHMAC
---help---
Select HPWORK workqueue for eth ISR work
config MPFS_ETHMAC_MDC_CLOCK_SOURCE_HZ
int "MDC Clock Source (Hz)"
default 125000000

View file

@ -100,8 +100,6 @@
# if defined(CONFIG_MPFS_ETHMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_MPFS_ETHMAC_LPWORK)
# define ETHWORK LPWORK
# else
# define ETHWORK LPWORK
# endif
@ -272,6 +270,7 @@ struct mpfs_ethmac_s
struct wdog_s txtimeout; /* TX timeout timer */
struct work_s irqwork; /* For deferring interrupt work to the work queue */
struct work_s pollwork; /* For deferring poll work to the work queue */
struct work_s timeoutwork; /* For managing timeouts */
/* This holds the information visible to the NuttX network */
@ -2888,7 +2887,7 @@ static void mpfs_txtimeout_expiry(wdparm_t arg)
/* Schedule to perform the TX timeout processing on the worker thread. */
work_queue(ETHWORK, &priv->irqwork, mpfs_txtimeout_work, priv, 0);
work_queue(LPWORK, &priv->timeoutwork, mpfs_txtimeout_work, priv, 0);
}
/****************************************************************************