DM09x0 Ethernet now supports CONFIG_NET_NOINTS

This commit is contained in:
Gregory Nutt 2016-12-03 11:42:15 -06:00
parent 41e35c88bf
commit 43459fe75e
13 changed files with 650 additions and 223 deletions

2
TODO
View File

@ -1063,7 +1063,7 @@ o Network (net/, drivers/net)
Kinetis YES YES (not tested) Kinetis YES YES (not tested)
LPC17xx YES YES (not tested) LPC17xx YES YES (not tested)
LPC43xx YES YES (not tested) LPC43xx YES YES (not tested)
DMxxx NIC NO NO DMxxx NIC YES NO
PIC32 YES NO PIC32 YES NO
SAM3/4 YES YES SAM3/4 YES YES
SAMA5D ----------------------- ------ SAMA5D ----------------------- ------

View File

@ -1140,7 +1140,7 @@ static int tiva_interrupt(int irq, void *context)
/* Cancel any pending poll work */ /* Cancel any pending poll work */
work_cancel(HPWORK, &priv->ld_work); work_cancel(ETHWORK, &priv->ld_work);
/* Schedule to perform the interrupt processing on the worker thread. */ /* Schedule to perform the interrupt processing on the worker thread. */

View File

@ -81,6 +81,8 @@
*/ */
#if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK) #if defined(CONFIG_NET_NOINTS) && !defined(CONFIG_SCHED_HPWORK)
/* REVISIT: The low priority work queue would be preferred if it is avaiable */
# error High priority work queue support is required # error High priority work queue support is required
#endif #endif

View File

@ -1634,6 +1634,7 @@ static void ez80emac_txinterrupt_work(FAR void *arg)
static int ez80emac_txinterrupt(int irq, FAR void *context) static int ez80emac_txinterrupt(int irq, FAR void *context)
{ {
FAR struct ez80emac_driver_s *priv = &g_emac; FAR struct ez80emac_driver_s *priv = &g_emac;
uint8_t istat;
#ifdef CONFIG_NET_NOINTS #ifdef CONFIG_NET_NOINTS
/* Disable further Ethernet Tx interrupts. Because Ethernet interrupts are /* Disable further Ethernet Tx interrupts. Because Ethernet interrupts are
@ -1643,8 +1644,10 @@ static int ez80emac_txinterrupt(int irq, FAR void *context)
up_disable_irq(EZ80_EMACTX_IRQ); up_disable_irq(EZ80_EMACTX_IRQ);
/* TODO: Determine if a TX transfer just completed */ /* Determine if a TX transfer just completed */
istat = inp(EZ80_EMAC_ISTAT);
if ((istat & EMAC_ISTAT_TXDONE) != 0)
{ {
/* If a TX transfer just completed, then cancel the TX timeout so /* If a TX transfer just completed, then cancel the TX timeout so
* there will be no race condition between any subsequent timeout * there will be no race condition between any subsequent timeout
@ -1955,7 +1958,7 @@ static int ez80emac_sysinterrupt(int irq, FAR void *context)
/* Cancel any pending poll work */ /* Cancel any pending poll work */
work_cancel(HPWORK, &priv->syswork); work_cancel(ETHWORK, &priv->syswork);
/* Schedule to perform the interrupt processing on the worker thread. */ /* Schedule to perform the interrupt processing on the worker thread. */

View File

@ -289,6 +289,7 @@ CONFIG_NAME_MAX=32
# CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set # CONFIG_SCHED_ONEXIT is not set
# CONFIG_SIG_EVTHREAD is not set
# #
# Signal Numbers # Signal Numbers
@ -296,13 +297,17 @@ CONFIG_NAME_MAX=32
CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGWORK=17
# CONFIG_MODULE is not set # CONFIG_MODULE is not set
# #
# Work queue support # Work queue support
# #
# CONFIG_SCHED_WORKQUEUE is not set CONFIG_SCHED_WORKQUEUE=y
# CONFIG_SCHED_HPWORK is not set CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=224
CONFIG_SCHED_HPWORKPERIOD=50000
CONFIG_SCHED_HPWORKSTACKSIZE=2048
# CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_LPWORK is not set
# #
@ -404,9 +409,9 @@ CONFIG_DM9X_MODE_AUTO=y
# CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_10MFD is not set
# CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MHD is not set
# CONFIG_DM9X_MODE_100MFD is not set # CONFIG_DM9X_MODE_100MFD is not set
CONFIG_DM9X_HPWORK=y
# CONFIG_ENC28J60 is not set # CONFIG_ENC28J60 is not set
# CONFIG_ENCX24J600 is not set # CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set # CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_FTMAC100 is not set
# CONFIG_PIPES is not set # CONFIG_PIPES is not set
@ -504,7 +509,7 @@ CONFIG_SYSLOG_CONSOLE=y
CONFIG_ARCH_HAVE_NET=y CONFIG_ARCH_HAVE_NET=y
# CONFIG_ARCH_HAVE_PHY is not set # CONFIG_ARCH_HAVE_PHY is not set
CONFIG_NET=y CONFIG_NET=y
# CONFIG_NET_NOINTS is not set CONFIG_NET_NOINTS=y
# CONFIG_NET_PROMISCUOUS is not set # CONFIG_NET_PROMISCUOUS is not set
# #

View File

@ -295,6 +295,7 @@ CONFIG_NAME_MAX=32
# CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set # CONFIG_SCHED_ONEXIT is not set
# CONFIG_SIG_EVTHREAD is not set
# #
# Signal Numbers # Signal Numbers
@ -303,13 +304,17 @@ CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGCONDTIMEDOUT=16 CONFIG_SIG_SIGCONDTIMEDOUT=16
CONFIG_SIG_SIGWORK=17
# CONFIG_MODULE is not set # CONFIG_MODULE is not set
# #
# Work queue support # Work queue support
# #
# CONFIG_SCHED_WORKQUEUE is not set CONFIG_SCHED_WORKQUEUE=y
# CONFIG_SCHED_HPWORK is not set CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=224
CONFIG_SCHED_HPWORKPERIOD=50000
CONFIG_SCHED_HPWORKSTACKSIZE=2048
# CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_LPWORK is not set
# #
@ -420,9 +425,9 @@ CONFIG_DM9X_MODE_AUTO=y
# CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_10MFD is not set
# CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MHD is not set
# CONFIG_DM9X_MODE_100MFD is not set # CONFIG_DM9X_MODE_100MFD is not set
CONFIG_DM9X_HPWORK=y
# CONFIG_ENC28J60 is not set # CONFIG_ENC28J60 is not set
# CONFIG_ENCX24J600 is not set # CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set # CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_FTMAC100 is not set
# CONFIG_PIPES is not set # CONFIG_PIPES is not set
@ -520,7 +525,7 @@ CONFIG_SYSLOG_CONSOLE=y
CONFIG_ARCH_HAVE_NET=y CONFIG_ARCH_HAVE_NET=y
# CONFIG_ARCH_HAVE_PHY is not set # CONFIG_ARCH_HAVE_PHY is not set
CONFIG_NET=y CONFIG_NET=y
# CONFIG_NET_NOINTS is not set CONFIG_NET_NOINTS=y
# CONFIG_NET_PROMISCUOUS is not set # CONFIG_NET_PROMISCUOUS is not set
# #

View File

@ -295,6 +295,7 @@ CONFIG_NAME_MAX=32
# CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set # CONFIG_SCHED_ONEXIT is not set
# CONFIG_SIG_EVTHREAD is not set
# #
# Signal Numbers # Signal Numbers
@ -303,13 +304,17 @@ CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGCONDTIMEDOUT=16 CONFIG_SIG_SIGCONDTIMEDOUT=16
CONFIG_SIG_SIGWORK=17
# CONFIG_MODULE is not set # CONFIG_MODULE is not set
# #
# Work queue support # Work queue support
# #
# CONFIG_SCHED_WORKQUEUE is not set CONFIG_SCHED_WORKQUEUE=y
# CONFIG_SCHED_HPWORK is not set CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=224
CONFIG_SCHED_HPWORKPERIOD=50000
CONFIG_SCHED_HPWORKSTACKSIZE=2048
# CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_LPWORK is not set
# #
@ -411,9 +416,9 @@ CONFIG_DM9X_MODE_AUTO=y
# CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_10MFD is not set
# CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MHD is not set
# CONFIG_DM9X_MODE_100MFD is not set # CONFIG_DM9X_MODE_100MFD is not set
CONFIG_DM9X_HPWORK=y
# CONFIG_ENC28J60 is not set # CONFIG_ENC28J60 is not set
# CONFIG_ENCX24J600 is not set # CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set # CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_FTMAC100 is not set
CONFIG_PIPES=y CONFIG_PIPES=y
@ -515,7 +520,7 @@ CONFIG_SYSLOG_CONSOLE=y
CONFIG_ARCH_HAVE_NET=y CONFIG_ARCH_HAVE_NET=y
# CONFIG_ARCH_HAVE_PHY is not set # CONFIG_ARCH_HAVE_PHY is not set
CONFIG_NET=y CONFIG_NET=y
# CONFIG_NET_NOINTS is not set CONFIG_NET_NOINTS=y
# CONFIG_NET_PROMISCUOUS is not set # CONFIG_NET_PROMISCUOUS is not set
# #

View File

@ -289,6 +289,7 @@ CONFIG_NAME_MAX=32
# CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set # CONFIG_SCHED_ONEXIT is not set
# CONFIG_SIG_EVTHREAD is not set
# #
# Signal Numbers # Signal Numbers
@ -296,13 +297,17 @@ CONFIG_NAME_MAX=32
CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGWORK=17
# CONFIG_MODULE is not set # CONFIG_MODULE is not set
# #
# Work queue support # Work queue support
# #
# CONFIG_SCHED_WORKQUEUE is not set CONFIG_SCHED_WORKQUEUE=y
# CONFIG_SCHED_HPWORK is not set CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=224
CONFIG_SCHED_HPWORKPERIOD=50000
CONFIG_SCHED_HPWORKSTACKSIZE=2048
# CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_LPWORK is not set
# #
@ -404,9 +409,9 @@ CONFIG_DM9X_MODE_AUTO=y
# CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_10MFD is not set
# CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MHD is not set
# CONFIG_DM9X_MODE_100MFD is not set # CONFIG_DM9X_MODE_100MFD is not set
CONFIG_DM9X_HPWORK=y
# CONFIG_ENC28J60 is not set # CONFIG_ENC28J60 is not set
# CONFIG_ENCX24J600 is not set # CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set # CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_FTMAC100 is not set
CONFIG_PIPES=y CONFIG_PIPES=y
@ -508,7 +513,7 @@ CONFIG_SYSLOG_CONSOLE=y
CONFIG_ARCH_HAVE_NET=y CONFIG_ARCH_HAVE_NET=y
# CONFIG_ARCH_HAVE_PHY is not set # CONFIG_ARCH_HAVE_PHY is not set
CONFIG_NET=y CONFIG_NET=y
# CONFIG_NET_NOINTS is not set CONFIG_NET_NOINTS=y
# CONFIG_NET_PROMISCUOUS is not set # CONFIG_NET_PROMISCUOUS is not set
# #

View File

@ -289,6 +289,7 @@ CONFIG_NAME_MAX=32
# CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set # CONFIG_SCHED_ONEXIT is not set
# CONFIG_SIG_EVTHREAD is not set
# #
# Signal Numbers # Signal Numbers
@ -296,13 +297,17 @@ CONFIG_NAME_MAX=32
CONFIG_SIG_SIGUSR1=1 CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGWORK=17
# CONFIG_MODULE is not set # CONFIG_MODULE is not set
# #
# Work queue support # Work queue support
# #
# CONFIG_SCHED_WORKQUEUE is not set CONFIG_SCHED_WORKQUEUE=y
# CONFIG_SCHED_HPWORK is not set CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=224
CONFIG_SCHED_HPWORKPERIOD=50000
CONFIG_SCHED_HPWORKSTACKSIZE=2048
# CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_LPWORK is not set
# #
@ -403,9 +408,9 @@ CONFIG_DM9X_MODE_AUTO=y
# CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_10MFD is not set
# CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MHD is not set
# CONFIG_DM9X_MODE_100MFD is not set # CONFIG_DM9X_MODE_100MFD is not set
CONFIG_DM9X_HPWORK=y
# CONFIG_ENC28J60 is not set # CONFIG_ENC28J60 is not set
# CONFIG_ENCX24J600 is not set # CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set # CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_FTMAC100 is not set
# CONFIG_PIPES is not set # CONFIG_PIPES is not set
@ -503,7 +508,7 @@ CONFIG_SYSLOG_CONSOLE=y
CONFIG_ARCH_HAVE_NET=y CONFIG_ARCH_HAVE_NET=y
# CONFIG_ARCH_HAVE_PHY is not set # CONFIG_ARCH_HAVE_PHY is not set
CONFIG_NET=y CONFIG_NET=y
# CONFIG_NET_NOINTS is not set CONFIG_NET_NOINTS=y
# CONFIG_NET_PROMISCUOUS is not set # CONFIG_NET_PROMISCUOUS is not set
# #

View File

@ -295,6 +295,7 @@ CONFIG_NAME_MAX=32
# CONFIG_SCHED_STARTHOOK is not set # CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set # CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set # CONFIG_SCHED_ONEXIT is not set
# CONFIG_SIG_EVTHREAD is not set
# #
# Signal Numbers # Signal Numbers
@ -303,13 +304,17 @@ CONFIG_SIG_SIGUSR1=1
CONFIG_SIG_SIGUSR2=2 CONFIG_SIG_SIGUSR2=2
CONFIG_SIG_SIGALARM=3 CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGCONDTIMEDOUT=16 CONFIG_SIG_SIGCONDTIMEDOUT=16
CONFIG_SIG_SIGWORK=17
# CONFIG_MODULE is not set # CONFIG_MODULE is not set
# #
# Work queue support # Work queue support
# #
# CONFIG_SCHED_WORKQUEUE is not set CONFIG_SCHED_WORKQUEUE=y
# CONFIG_SCHED_HPWORK is not set CONFIG_SCHED_HPWORK=y
CONFIG_SCHED_HPWORKPRIORITY=224
CONFIG_SCHED_HPWORKPERIOD=50000
CONFIG_SCHED_HPWORKSTACKSIZE=2048
# CONFIG_SCHED_LPWORK is not set # CONFIG_SCHED_LPWORK is not set
# #
@ -411,9 +416,9 @@ CONFIG_DM9X_MODE_AUTO=y
# CONFIG_DM9X_MODE_10MFD is not set # CONFIG_DM9X_MODE_10MFD is not set
# CONFIG_DM9X_MODE_100MHD is not set # CONFIG_DM9X_MODE_100MHD is not set
# CONFIG_DM9X_MODE_100MFD is not set # CONFIG_DM9X_MODE_100MFD is not set
CONFIG_DM9X_HPWORK=y
# CONFIG_ENC28J60 is not set # CONFIG_ENC28J60 is not set
# CONFIG_ENCX24J600 is not set # CONFIG_ENCX24J600 is not set
# CONFIG_NET_SLIP is not set # CONFIG_NET_SLIP is not set
# CONFIG_NET_FTMAC100 is not set # CONFIG_NET_FTMAC100 is not set
# CONFIG_PIPES is not set # CONFIG_PIPES is not set
@ -511,7 +516,7 @@ CONFIG_SYSLOG_CONSOLE=y
CONFIG_ARCH_HAVE_NET=y CONFIG_ARCH_HAVE_NET=y
# CONFIG_ARCH_HAVE_PHY is not set # CONFIG_ARCH_HAVE_PHY is not set
CONFIG_NET=y CONFIG_NET=y
# CONFIG_NET_NOINTS is not set CONFIG_NET_NOINTS=y
# CONFIG_NET_PROMISCUOUS is not set # CONFIG_NET_PROMISCUOUS is not set
# #

View File

@ -195,6 +195,26 @@ config DM9X_NINTERFACES
default 1 default 1
depends on EXPERIMENTAL depends on EXPERIMENTAL
choice
prompt "Work queue"
default DM9X_LPWORK if SCHED_LPWORK
default DM9X_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the Ethernet driver. If the
low priority work queue is available, then it should be used by the
driver.
config DM9X_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config DM9X_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endif # NET_DM90x0 endif # NET_DM90x0
config NET_CS89x0 config NET_CS89x0

File diff suppressed because it is too large Load Diff

View File

@ -622,7 +622,7 @@ static int skel_interrupt(int irq, FAR void *context)
/* Cancel any pending poll work */ /* Cancel any pending poll work */
work_cancel(HPWORK, &priv->sk_work); work_cancel(ETHWORK, &priv->sk_work);
/* Schedule to perform the interrupt processing on the worker thread. */ /* Schedule to perform the interrupt processing on the worker thread. */