All network drivers! Change pre-processor logic that selects the high priority work queue or gives preferential treatment to the high priority work. All network logic must run on the low priority work queue! Or suffer the consequences.

This commit is contained in:
Gregory Nutt 2018-11-21 07:57:26 -06:00
parent b69957ef5f
commit 09f4dee6bc
46 changed files with 310 additions and 826 deletions

View File

@ -111,22 +111,3 @@ config C5471_BASET10
endchoice
choice
prompt "Ethernet work queue"
default C5471_LPWORK if SCHED_LPWORK
default C5471_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 C5471_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config C5471_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue

View File

@ -1,7 +1,8 @@
/****************************************************************************
* arch/arm/src/c5471/c5471_ethernet.c
*
* Copyright (C) 2007, 2009-2010, 2014-2015, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2007, 2009-2010, 2014-2015, 2017-2018 Gregory Nutt. All
* rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Based one a C5471 Linux driver and released under this BSD license with
@ -82,19 +83,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the low priority work queue if possible */
# if defined(CONFIG_C5471_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_C5471_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_C5471_HPWORK nor CONFIG_C5471_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* CONFIG_C5471_NET_NINTERFACES determines the number of physical interfaces
* that will be supported.
*/

View File

@ -945,26 +945,6 @@ config KINETIS_EMAC_RMIICLK1588CLKIN
bool "Use ENET_1588_CLKIN for RMII Clock"
endchoice # RMII Clock Source
choice
prompt "Work queue"
default KINETIS_EMAC_LPWORK if SCHED_LPWORK
default KINETIS_EMAC_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 KINETIS_EMAC_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config KINETIS_EMAC_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endmenu # Kinetis Ethernet Configuration
menu "Kinetis SDHC Configuration"

View File

@ -85,19 +85,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_KINETIS_EMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_KINETIS_EMAC_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_KINETIS_EMAC_HPWORK nor CONFIG_KINETIS_EMAC_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* CONFIG_KINETIS_ENETNETHIFS determines the number of physical interfaces
* that will be supported.
*/

View File

@ -724,25 +724,6 @@ config LPC17_MULTICAST
Enable receipt of multicast (and unicast) frames. Automatically set
if NET_MCASTGROUP is selected.
choice
prompt "Work queue"
default LPC17_ETHERNET_LPWORK if SCHED_LPWORK
default LPC17_ETHERNET_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 LPC17_ETHERNET_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config LPC17_ETHERNET_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endmenu
menu "LCD device driver options"

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/arm/src/lpc17xx/lpc17_ethernet.c
*
* Copyright (C) 2010-2015, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2010-2015, 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -86,19 +86,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_LPC17_ETHERNET_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_LPC17_ETHERNET_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_LPC17_ETHERNET_HPWORK nor CONFIG_LPC17_ETHERNET_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* CONFIG_LPC17_NINTERFACES determines the number of physical interfaces
* that will be supported -- unless it is more than actually supported by the
* hardware!

View File

@ -658,26 +658,6 @@ config LPC43_RMII
bool
default y if !LPC43_MII
choice
prompt "Work queue"
default LPC43_ETHERNET_LPWORK if SCHED_LPWORK
default LPC43_ETHERNET_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 LPC43_ETHERNET_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config LPC43_ETHERNET_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config LPC43_ETHERNET_REGDEBUG
bool "Register-Level Debug"
default n

View File

@ -85,19 +85,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_LPC43_ETHERNET_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_LPC43_ETHERNET_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_LPC43_ETHERNET_HPWORK nor CONFIG_LPC43_ETHERNET_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
#ifndef CONFIG_LPC43_PHYADDR
# error "CONFIG_LPC43_PHYADDR must be defined in the NuttX configuration"
#endif

View File

@ -123,6 +123,11 @@
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK

View File

@ -1376,26 +1376,6 @@ config SAM34_EMAC_ISETH0
bool
default y
choice
prompt "Work queue"
default SAM34_EMAC_LPWORK if SCHED_LPWORK
default SAM34_EMAC_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 SAM34_EMAC_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config SAM34_EMAC_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config SAM34_EMAC_REGDEBUG
bool "Register-Level Debug"
default n

View File

@ -99,19 +99,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_SAM34_EMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_SAM34_EMAC_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_SAM34_EMAC_HPWORK nor CONFIG_SAM34_EMAC_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* Number of buffer for RX */
#ifndef CONFIG_SAM34_EMAC_NRXBUFFERS

View File

@ -1448,26 +1448,6 @@ config SAMA5_GMAC_NBC
---help---
Select to disable receipt of broadcast packets.
choice
prompt "Work queue"
default SAMA5_GMAC_LPWORK if SCHED_LPWORK
default SAMA5_GMAC_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 SAMA5_GMAC_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config SAMA5_GMAC_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config SAMA5_GMAC_PHYADDR
int "PHY address"
default 1
@ -1706,26 +1686,6 @@ config SAMA5_EMACA_NBC
---help---
Select to disable receipt of broadcast packets.
choice
prompt "Work queue"
default SAMA5_EMACA_LPWORK if SCHED_LPWORK
default SAMA5_EMACA_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 SAMA5_EMACA_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config SAMA5_EMACA_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config SAMA5_EMACA_REGDEBUG
bool "Register-Level Debug"
default n
@ -2119,26 +2079,6 @@ config SAMA5_EMACB_NBC
---help---
Select to disable receipt of broadcast packets.
choice
prompt "Work queue"
default SAMA5_EMACB_LPWORK if SCHED_LPWORK
default SAMA5_EMACB_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 SAMA5_EMACB_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config SAMA5_EMACB_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config SAMA5_EMACB_DEBUG
bool "Force EMAC0/1 DEBUG"
default n

View File

@ -101,19 +101,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_SAMA5_EMACA_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_SAMA5_EMACA_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_SAMA5_EMACA_HPWORK nor CONFIG_SAMA5_EMACA_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* Number of buffers for RX */
#ifndef CONFIG_SAMA5_EMAC_NRXBUFFERS

View File

@ -8,7 +8,7 @@
* separate (mostly because the 'B' driver needs to support two EMAC blocks.
* But the 'B' driver should replace the 'A' driver someday.
*
* Copyright (C) 2014-2015, 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2014-2015, 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* This logic derives from the SAM4E Ethernet driver which, in turn, derived
@ -115,19 +115,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_SAMA5_EMACB_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_SAMA5_EMACB_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_SAMA5_EMACB_HPWORK nor CONFIG_SAMA5_EMACB_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* EMAC0 Configuration ******************************************************/
#ifdef CONFIG_SAMA5_EMAC0

View File

@ -98,19 +98,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_SAMA5_GMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_SAMA5_GMAC_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_SAMA5_GMAC_HPWORK nor CONFIG_SAMA5_GMAC_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* Number of buffer for RX */
#ifndef CONFIG_SAMA5_GMAC_NRXBUFFERS

View File

@ -2010,26 +2010,6 @@ config SAMV7_EMAC_NBC
---help---
Select to disable receipt of broadcast packets.
choice
prompt "Work queue"
default SAMV7_EMAC_LPWORK if SCHED_LPWORK
default SAMV7_EMAC_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 SAMV7_EMAC_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config SAMV7_EMAC_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config SAMV7_EMAC_DEBUG
bool "Force EMAC0/1 DEBUG"
default n

View File

@ -106,19 +106,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_SAMV7_EMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_SAMV7_EMAC_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_SAMV7_EMAC_HPWORK nor CONFIG_SAMV7_EMAC_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* EMAC0 Configuration ******************************************************/
#ifdef CONFIG_SAMV7_EMAC0

View File

@ -9097,26 +9097,6 @@ config STM32_RMII_EXTCLK
endchoice
choice
prompt "Work queue"
default STM32_ETHMAC_LPWORK if SCHED_LPWORK
default STM32_ETHMAC_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 STM32_ETHMAC_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config STM32_ETHMAC_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config STM32_ETHMAC_REGDEBUG
bool "Register-Level Debug"
default n

View File

@ -96,19 +96,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_STM32_ETHMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_STM32_ETHMAC_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_STM32_ETHMAC_HPWORK nor CONFIG_STM32_ETHMAC_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
#if !defined(CONFIG_STM32_SYSCFG) && !defined(CONFIG_STM32_CONNECTIVITYLINE)
# error "CONFIG_STM32_SYSCFG must be defined in the NuttX configuration"
#endif

View File

@ -4939,26 +4939,6 @@ config STM32F7_RMII_EXTCLK
endchoice # RMII clock configuration
choice
prompt "Work queue"
default STM32F7_ETHMAC_LPWORK if SCHED_LPWORK
default STM32F7_ETHMAC_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 STM32F7_ETHMAC_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config STM32F7_ETHMAC_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config STM32F7_ETHMAC_REGDEBUG
bool "Register-Level Debug"
default n

View File

@ -102,19 +102,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_STM32F7_ETHMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_STM32F7_ETHMAC_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_STM32F7_ETHMAC_HPWORK nor CONFIG_STM32F7_ETHMAC_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
#ifndef CONFIG_STM32F7_PHYADDR
# error "CONFIG_STM32F7_PHYADDR must be defined in the NuttX configuration"
#endif

View File

@ -932,26 +932,6 @@ config TIVA_BADCRC
---help---
Set to enable bad CRC rejection.
choice
prompt "Work queue"
default LM3S_ETHERNET_LPWORK if SCHED_LPWORK
default LM3S_ETHERNET_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 LM3S_ETHERNET_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config LM3S_ETHERNET_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config TIVA_DUMPPACKET
bool "Dump Packets"
default n
@ -1141,26 +1121,6 @@ config TIVA_EMAC_HWCHECKSUM
---help---
Use the hardware checksum capabilities of the Tiva chip
choice
prompt "Work queue"
default TIVA_ETHERNET_LPWORK if SCHED_LPWORK
default TIVA_ETHERNET_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 TIVA_ETHERNET_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config TIVA_ETHERNET_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config TIVA_ETHERNET_REGDEBUG
bool "Register-Level Debug"
default n

View File

@ -1,7 +1,8 @@
/****************************************************************************
* arch/arm/src/tiva/lm3s_ethernet.c
*
* Copyright (C) 2009-2010, 2014, 2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2014, 2016, 2018 Gregory Nutt. All rights
* reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -79,19 +80,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the low priority work queue if possible */
# if defined(CONFIG_LM3S_ETHERNET_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_LM3S_ETHERNET_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_LM3S_ETHERNET_HPWORK nor CONFIG_LM3S_ETHERNET_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* Half duplex can be forced if CONFIG_TIVA_ETHHDUPLEX is defined. */
#ifdef CONFIG_TIVA_ETHHDUPLEX

View File

@ -100,19 +100,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required
#else
/* Select work queue */
# if defined(CONFIG_TIVA_ETHERNET_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_TIVA_ETHERNET_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_TIVA_ETHERNET_HPWORK nor CONFIG_TIVA_ETHERNET_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* Are we using the internal PHY or an external PHY? */
#if defined(CONFIG_TIVA_PHY_INTERNAL)

View File

@ -1095,26 +1095,6 @@ config PIC32MX_MULTICAST
Enable receipt of multicast (and unicast) frames. Automatically set if
NET_MCASTGROUP is selected.
choice
prompt "Work queue"
default PIC32MX_ETHERNET_LPWORK if SCHED_LPWORK
default PIC32MX_ETHERNET_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 PIC32MX_ETHERNET_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config PIC32MX_ETHERNET_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config NET_REGDEBUG
bool "Register level debug"
default n

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/pic32mx/pic32mx_ethernet.c
*
* Copyright (C) 2012, 2014-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2012, 2014-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* This driver derives from the PIC32MX Ethernet Driver
@ -88,19 +88,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the low priority work queue if possible */
# if defined(CONFIG_PIC32MX_ETHERNET_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_PIC32MX_ETHERNET_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_PIC32MX_ETHERNET_HPWORK nor CONFIG_PIC32MX_ETHERNET_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* CONFIG_PIC32MX_NINTERFACES determines the number of physical interfaces
* that will be supported -- unless it is more than actually supported by the
* hardware!

View File

@ -422,26 +422,6 @@ config PIC32MZ_MULTICAST
Enable receipt of multicast (and unicast) frames. Automatically set if
NET_MCASTGROUP is selected.
choice
prompt "Work queue"
default PIC32MZ_ETHERNET_LPWORK if SCHED_LPWORK
default PIC32MZ_ETHERNET_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 PIC32MZ_ETHERNET_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config PIC32MZ_ETHERNET_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config NET_REGDEBUG
bool "Register level debug"
default n

View File

@ -1,7 +1,7 @@
/****************************************************************************
* arch/mips/src/pic32mz/pic32mz_ethernet.c
*
* Copyright (C) 2015-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2015-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* This driver derives from the PIC32MZ Ethernet Driver
@ -88,19 +88,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the low priority work queue if possible */
# if defined(CONFIG_PIC32MZ_ETHERNET_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_PIC32MZ_ETHERNET_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_PIC32MZ_ETHERNET_HPWORK nor CONFIG_PIC32MZ_ETHERNET_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* CONFIG_PIC32MZ_NINTERFACES determines the number of physical interfaces
* that will be supported -- unless it is more than actually supported by the
* hardware!

View File

@ -117,26 +117,6 @@ config ARCH_MCFILTER
---help---
Enables multicast MAC address filtering (not fully implemented)
choice
prompt "Work queue"
default EZ80_EMAC_LPWORK if SCHED_LPWORK
default EZ80_EMAC_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 EZ80_EMAC_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config EZ80_EMAC_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endif # EZ80_EMAC
config ARCH_TIMERHOOK

View File

@ -1,7 +1,8 @@
/****************************************************************************
* arch/z80/src/ez80/ez80_emac.c
*
* Copyright (C) 2009-2010, 2012, 2014-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2009-2010, 2012, 2014-2018 Gregory Nutt. All rights
* reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
@ -82,19 +83,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the low priority work queue if possible */
# if defined(CONFIG_EZ80_EMAC_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_EZ80_EMAC_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_EZ80_EMAC_HPWORK nor CONFIG_EZ80_EMAC_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
#ifndef CONFIG_EZ80_RAMADDR
# define CONFIG_EZ80_RAMADDR EZ80_EMACSRAM
#endif

View File

@ -141,26 +141,6 @@ config DM9X_NINTERFACES
default 1
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
menuconfig ENC28J60
@ -199,26 +179,6 @@ config ENC28J60_FREQUENCY
---help---
Define to use a different bus frequency
choice
prompt "Work queue"
default ENC28J60_LPWORK if SCHED_LPWORK
default ENC28J60_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the ENC28J60 driver. If the
low priority work queue is available, then it should be used by the
ENC28J60 driver.
config ENC28J60_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config ENC28J60_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config ENC28J60_HALFDUPPLEX
bool "Enable half dupplex"
default n
@ -287,26 +247,6 @@ config ENCX24J600_NRXDESCR
The ENC has a relative large packet buffer of 24kB which can
be used to buffer multiple packets simutaneously
choice
prompt "Work queue"
default ENCX24J600_LPWORK if SCHED_LPWORK
default ENCX24J600_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the ENCX24J600 driver. If the
low priority work queue is available, then it should be used by the
ENCX24J600 driver.
config ENCX24J600_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config ENCX24J600_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config ENCX24J600_DUMPPACKET
bool "Dump Packets"
default n
@ -381,26 +321,6 @@ config FTMAC100_MAC0_ENV_ADDR
hex "MAC0 address location"
default 0
choice
prompt "Work queue"
default FTMAC100_LPWORK if SCHED_LPWORK
default FTMAC100_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the FTMAC100 driver. If the
low priority work queue is available, then it should be used by the
FTMAC100 driver.
config FTMAC100_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config FTMAC100_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endif # NET_FTMAC100
menuconfig NET_LAN91C111
@ -412,27 +332,6 @@ menuconfig NET_LAN91C111
DS00002276A, 2016 Microchip Technology Inc.
if NET_LAN91C111
choice
prompt "Work queue"
default LAN91C111_LPWORK if SCHED_LPWORK
default LAN91C111_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 LAN91C111_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config LAN91C111_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endif # NET_LAN91C111
if ARCH_HAVE_PHY

View File

@ -1,7 +1,8 @@
/****************************************************************************
* drivers/net/dm90x0.c
*
* Copyright (C) 2007-2010, 2014-2016 Gregory Nutt. All rights reserved.
* Copyright (C) 2007-2010, 2014-2016, 2018 Gregory Nutt. All rights
* reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References: Davicom data sheets (DM9000-DS-F03-041906.pdf,
@ -82,20 +83,20 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the low priority work queue if possible */
# if defined(CONFIG_DM9X_HPWORK)
# define ETHWORK HPWORK
# elif defined(CONFIG_DM9X_LPWORK)
# define ETHWORK LPWORK
# else
# error Neither CONFIG_DM9X_HPWORK nor CONFIG_DM9X_LPWORK defined
# endif
#endif
/* DM90000 and DM9010 register offets */
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ETHWORK LPWORK
/* DM90000 and DM9010 register offsets */
#define DM9X_NETC 0x00 /* Network control register */
#define DM9X_NETS 0x01 /* Network Status register */

View File

@ -1,7 +1,7 @@
/****************************************************************************
* drivers/net/enc28j60.c
*
* Copyright (C) 2010-2012, 2014-2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2010-2012, 2014-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* References:
@ -117,16 +117,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error "Worker thread support is required (CONFIG_SCHED_WORKQUEUE)"
#else
# if defined(CONFIG_ENC28J60_HPWORK)
# define ENCWORK HPWORK
# elif defined(CONFIG_ENC28J60_LPWORK)
# define ENCWORK LPWORK
# else
# error "Neither CONFIG_ENC28J60_HPWORK nor CONFIG_ENC28J60_LPWORK defined"
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ENCWORK LPWORK
/* CONFIG_ENC28J60_DUMPPACKET will dump the contents of each packet to the console. */
#ifdef CONFIG_ENC28J60_DUMPPACKET

View File

@ -1,7 +1,7 @@
/****************************************************************************
* drivers/net/encx24j600.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2017-2018 Gregory Nutt. All rights reserved.
* Copyright (C) 2013-2014 UVC Ingenieure. All rights reserved.
* Author: Max Holtzberg <mh@uvc.de>
*
@ -123,16 +123,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error "Worker thread support is required (CONFIG_SCHED_WORKQUEUE)"
#else
# if defined(CONFIG_ENCX24J600_HPWORK)
# define ENCWORK HPWORK
# elif defined(CONFIG_ENCX24J600_LPWORK)
# define ENCWORK LPWORK
# else
# error "Neither CONFIG_ENCX24J600_HPWORK nor CONFIG_ENCX24J600_LPWORK defined"
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define ENCWORK LPWORK
/* CONFIG_ENCX24J600_DUMPPACKET will dump the contents of each packet to the console. */
#ifdef CONFIG_ENCX24J600_DUMPPACKET

View File

@ -74,19 +74,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the low priority work queue if possible */
# if defined(CONFIG_FTMAC100_HPWORK)
# define FTMAWORK HPWORK
# elif defined(CONFIG_FTMAC100_LPWORK)
# define FTMAWORK LPWORK
# else
# error Neither CONFIG_FTMAC100_HPWORK nor CONFIG_FTMAC100_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define FTMAWORK LPWORK
/* CONFIG_FTMAC100_NINTERFACES determines the number of physical interfaces
* that will be supported.
*/

View File

@ -64,19 +64,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the selected work queue */
# if defined(CONFIG_LAN91C111_HPWORK)
# define LAN91C111_WORK HPWORK
# elif defined(CONFIG_LAN91C111_LPWORK)
# define LAN91C111_WORK LPWORK
# else
# error Neither CONFIG_LAN91C111_HPWORK nor CONFIG_LAN91C111_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define LAN91C111_WORK LPWORK
#ifdef CONFIG_NET_DUMPPACKET
# define lan91c111_dumppacket lib_dumpbuffer
#else

View File

@ -81,17 +81,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
# if defined(CONFIG_TUN_HPWORK)
# define TUNWORK HPWORK
# elif defined(CONFIG_TUN_LPWORK)
# define TUNWORK LPWORK
# else
# error "Neither CONFIG_TUN_HPWORK nor CONFIG_TUN_LPWORK defined"
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define TUNWORK LPWORK
/* CONFIG_TUN_NINTERFACES determines the number of physical interfaces
* that will be supported.
*/

View File

@ -93,7 +93,7 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK. NOTE: Use of the high priority work queue will
@ -101,8 +101,7 @@
* performance. This should be avoided.
*/
# define ETHWORK LPWORK
#endif
#define ETHWORK LPWORK
/* CONFIG_CDCECM_NINTERFACES determines the number of physical interfaces
* that will be supported.

View File

@ -98,26 +98,6 @@ config IEEE80211_BROADCOM_FULLMAC_SDIO
if IEEE80211_BROADCOM_FULLMAC
choice
prompt "Broadcom FullMAC driver work queue"
default IEEE80211_BROADCOM_LPWORK if SCHED_LPWORK
default IEEE80211_BROADCOM_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the loopback driver. If the
low priority work queue is available, then it should be used by the
loopback driver.
config IEEE80211_BROADCOM_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config IEEE80211_BROADCOM_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config IEEE80211_BROADCOM_NINTERFACES
int "Number of Broadcom FullMAC interfaces"
default 1

View File

@ -77,19 +77,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the selected work queue */
# if defined(CONFIG_IEEE80211_BROADCOM_HPWORK)
# define BCMFWORK HPWORK
# elif defined(CONFIG_IEEE80211_BROADCOM_LPWORK)
# define BCMFWORK LPWORK
# else
# error Neither CONFIG_IEEE80211_BROADCOM_HPWORK nor CONFIG_IEEE80211_BROADCOM_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define BCMFWORK LPWORK
/* CONFIG_IEEE80211_BROADCOM_NINTERFACES determines the number of physical interfaces
* that will be supported.
*/

View File

@ -11,34 +11,6 @@ config IEEE802154_XBEE_FREQUENCY
---help---
SPI SLCK frequency in Hz
choice
prompt "Work queue"
default XBEE_NETDEV_LPWORK if SCHED_LPWORK
default XBEE_NETDEV_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the XBee MAC network
driver.
WARNING!! The IEEE802.15.4 network device must never run on the same
work queue as does the IEEE 802.15.4 MAC. That configuration will
cause deadlocks: The network logic may be blocked on the work queue
waiting on resources that can only be freed by the MAC logic but the
MAC is unable to run because the work queue is blocked. The
recommended configuration is: Network on the LP work queue; MAC on HP
work queue. Blocking on the HP work queue is a very bad thing in
any case.
config XBEE_NETDEV_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config XBEE_NETDEV_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
config XBEE_NETDEV_RECVRPRIO
int "Priority of frame receiver registerd with the MAC layer"
default 1

View File

@ -85,19 +85,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the selected work queue */
# if defined(CONFIG_XBEE_NETDEV_HPWORK)
# define XBEENET_WORK HPWORK
# elif defined(CONFIG_XBEE_NETDEV_LPWORK)
# define XBEENET_WORK LPWORK
# else
# error Neither CONFIG_XBEE_NETDEV_HPWORK nor CONFIG_XBEE_NETDEV_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define XBEENET_WORK LPWORK
/* Preferred address size */
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR

View File

@ -193,25 +193,6 @@ config NET_TUN_PKTSIZE
the MSS (Maximum Segment Size). TUN has no link layer header so for
TUN the MTU is the same as the PKTSIZE.
choice
prompt "Work queue"
default TUN_LPWORK if SCHED_LPWORK
default TUN_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the TUN driver. If the
low priority work queue is available, then it should be used by the
TUN driver.
config TUN_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config TUN_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endif # NET_TUN
config NET_USRSOCK

View File

@ -164,36 +164,7 @@ config IEEE802154_NETDEV_RECVRPRIO
the MAC character driver (which should always be lowest priority since
it is a "catch-all" type receiver).
choice
prompt "Work queue"
default IEEE802154_NETDEV_LPWORK if SCHED_LPWORK
default IEEE802154_NETDEV_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the IEEE802.15.4 network
driver. If the low priority work queue is available, then it should
be used by the loopback driver.
WARNING!! The IEEE802.15.4 network device must never run on the same
work queue as does the IEEE 802.15.4 MAC. That configuration will
cause deadlocks: The network logic may be blocked on the work queue
waiting on resources that can only be freed by the MAC logic but the
MAC is unable to run because the work queue is blocked. The
recommended configuration is: Network on the LP work queue; MAC on HP
work queue. Blocking on the HP work queue is a very bad thing in
any case.
config IEEE802154_NETDEV_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config IEEE802154_NETDEV_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endif # IEEE802154_NETDEV
endif # IEEE802154_MACDEV
config IEEE802154_LOOPBACK
@ -205,26 +176,6 @@ config IEEE802154_LOOPBACK
Add support for the IEEE802.15.4 6LoWPAN Loopback test device.
if IEEE802154_LOOPBACK
choice
prompt "Work queue"
default IEEE802154_LOOPBACK_LPWORK if SCHED_LPWORK
default IEEE802154_LOOPBACK_HPWORK if !SCHED_LPWORK && SCHED_HPWORK
depends on SCHED_WORKQUEUE
---help---
Work queue support is required to use the loopback driver. If the
low priority work queue is available, then it should be used by the
loopback driver.
config IEEE802154_LOOPBACK_HPWORK
bool "High priority"
depends on SCHED_HPWORK
config IEEE802154_LOOPBACK_LPWORK
bool "Low priority"
depends on SCHED_LPWORK
endchoice # Work queue
endif # IEEE802154_LOOPBACK
endif # WIRELESS_IEEE802154

View File

@ -1,7 +1,7 @@
/****************************************************************************
* wireless/iee802154/mac802154_loopback.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -71,16 +71,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Worker thread support is required (CONFIG_SCHED_WORKQUEUE)
#else
# if defined(CONFIG_IEEE802154_LOOPBACK_HPWORK)
# define LPBKWORK HPWORK
# elif defined(CONFIG_IEEE802154_LOOPBACK_LPWORK)
# define LPBKWORK LPWORK
# else
# error Neither CONFIG_IEEE802154_LOOPBACK_HPWORK nor CONFIG_IEEE802154_LOOPBACK_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define LPBKWORK LPWORK
/* Preferred address size */
#ifdef CONFIG_NET_6LOWPAN_EXTENDEDADDR

View File

@ -1,7 +1,7 @@
/****************************************************************************
* wireless/ieee802154/mac802154_netdev.c
*
* Copyright (C) 2017 Gregory Nutt. All rights reserved.
* Copyright (C) 2017-2018 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <gnutt@nuttx.org>
*
* Redistribution and use in source and binary forms, with or without
@ -77,19 +77,19 @@
#if !defined(CONFIG_SCHED_WORKQUEUE)
# error Work queue support is required in this configuration (CONFIG_SCHED_WORKQUEUE)
#else
/* Use the selected work queue */
# if defined(CONFIG_IEEE802154_NETDEV_HPWORK)
# define WPANWORK HPWORK
# elif defined(CONFIG_IEEE802154_NETDEV_LPWORK)
# define WPANWORK LPWORK
# else
# error Neither CONFIG_IEEE802154_NETDEV_HPWORK nor CONFIG_IEEE802154_NETDEV_LPWORK defined
# endif
#endif
/* The low priority work queue is preferred. If it is not enabled, LPWORK
* will be the same as HPWORK.
*
* NOTE: However, the network should NEVER run on the high priority work
* queue! That queue is intended only to service short back end interrupt
* processing that never suspends. Suspending the high priority work queue
* may bring the system to its knees!
*/
#define WPANWORK LPWORK
/* CONFIG_IEEE802154_NETDEV_NINTERFACES determines the number of physical interfaces
* that will be supported.
*/