Skip to content

Commit 4551232

Browse files
committed
mpfs/ethernet: Move txtimeout from HPWORK to LPWORK
- Remove useless CONFIG_MPFS_ETHMAC_LPWORK; use LPWORK by default if HPWORK is not defined - Always use LPWORK for timeouts; this makes very lengthy operations such as re-initializing PHY. Signed-off-by: Jukka Laitinen <[email protected]>
1 parent aca228e commit 4551232

File tree

2 files changed

+3
-11
lines changed

2 files changed

+3
-11
lines changed

arch/risc-v/src/mpfs/Kconfig

-7
Original file line numberDiff line numberDiff line change
@@ -907,13 +907,6 @@ config MPFS_ETHMAC_HPWORK
907907
---help---
908908
Select HPWORK workqueue for eth ISR work
909909

910-
config MPFS_ETHMAC_LPWORK
911-
bool "Use LP workqueue"
912-
default n
913-
depends on MPFS_ETHMAC
914-
---help---
915-
Select LPWORK workqueue for eth ISR work
916-
917910
config MPFS_ETHMAC_MDC_CLOCK_SOURCE_HZ
918911
int "MDC Clock Source (Hz)"
919912
default 125000000

arch/risc-v/src/mpfs/mpfs_ethernet.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,8 @@
100100

101101
# if defined(CONFIG_MPFS_ETHMAC_HPWORK)
102102
# define ETHWORK HPWORK
103-
# elif defined(CONFIG_MPFS_ETHMAC_LPWORK)
104-
# define ETHWORK LPWORK
105103
# else
106-
# define ETHWORK HPWORK
104+
# define ETHWORK LPWORK
107105
# endif
108106
#endif
109107

@@ -274,6 +272,7 @@ struct mpfs_ethmac_s
274272
struct wdog_s rxtimeout; /* RX timeout timer */
275273
struct work_s irqwork; /* For deferring interrupt work to the work queue */
276274
struct work_s pollwork; /* For deferring poll work to the work queue */
275+
struct work_s timeoutwork; /* For managing timeouts */
277276

278277
/* This holds the information visible to the NuttX network */
279278

@@ -2913,7 +2912,7 @@ static void mpfs_txtimeout_expiry(wdparm_t arg)
29132912

29142913
/* Schedule to perform the TX timeout processing on the worker thread. */
29152914

2916-
work_queue(ETHWORK, &priv->irqwork, mpfs_txtimeout_work, priv, 0);
2915+
work_queue(LPWORK, &priv->timeoutwork, mpfs_txtimeout_work, priv, 0);
29172916
}
29182917

29192918
/****************************************************************************

0 commit comments

Comments
 (0)