mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 21:36:28 +08:00
Tiva Ethernet: When calling into the stack from the worker thread, it is necessary to have the stack locked
This commit is contained in:
@@ -2050,12 +2050,15 @@ static inline void tiva_interrupt_process(FAR struct tiva_ethmac_s *priv)
|
|||||||
static void tiva_interrupt_work(FAR void *arg)
|
static void tiva_interrupt_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
DEBUGASSERT(priv);
|
DEBUGASSERT(priv);
|
||||||
|
|
||||||
/* Process pending Ethernet interrupts */
|
/* Process pending Ethernet interrupts */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
tiva_interrupt_process(priv);
|
tiva_interrupt_process(priv);
|
||||||
|
net_unlock(state);
|
||||||
|
|
||||||
/* Re-enable Ethernet interrupts at the NVIC */
|
/* Re-enable Ethernet interrupts at the NVIC */
|
||||||
|
|
||||||
@@ -2198,10 +2201,13 @@ static inline void tiva_txtimeout_process(FAR struct tiva_ethmac_s *priv)
|
|||||||
static void tiva_txtimeout_work(FAR void *arg)
|
static void tiva_txtimeout_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
/* Process pending Ethernet interrupts */
|
/* Process pending Ethernet interrupts */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
tiva_txtimeout_process(priv);
|
tiva_txtimeout_process(priv);
|
||||||
|
net_unlock(state);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2347,10 +2353,13 @@ static inline void tiva_poll_process(FAR struct tiva_ethmac_s *priv)
|
|||||||
static void tiva_poll_work(FAR void *arg)
|
static void tiva_poll_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
/* Perform the poll */
|
/* Perform the poll */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
tiva_poll_process(priv);
|
tiva_poll_process(priv);
|
||||||
|
net_unlock(state);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2553,10 +2562,13 @@ static inline void tiva_txavail_process(FAR struct tiva_ethmac_s *priv)
|
|||||||
static void tiva_txavail_work(FAR void *arg)
|
static void tiva_txavail_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
FAR struct tiva_ethmac_s *priv = (FAR struct tiva_ethmac_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
/* Perform the poll */
|
/* Perform the poll */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
tiva_txavail_process(priv);
|
tiva_txavail_process(priv);
|
||||||
|
net_unlock(state);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
@@ -463,10 +463,13 @@ static inline void skel_interrupt_process(FAR struct skel_driver_s *skel)
|
|||||||
static void skel_interrupt_work(FAR void *arg)
|
static void skel_interrupt_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
/* Process pending Ethernet interrupts */
|
/* Process pending Ethernet interrupts */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
skel_interrupt_process(skel);
|
skel_interrupt_process(skel);
|
||||||
|
net_unlock(state);
|
||||||
|
|
||||||
/* Re-enable Ethernet interrupts */
|
/* Re-enable Ethernet interrupts */
|
||||||
|
|
||||||
@@ -583,10 +586,13 @@ static inline void skel_txtimeout_process(FAR struct skel_driver_s *skel)
|
|||||||
static void skel_txtimeout_work(FAR void *arg)
|
static void skel_txtimeout_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
/* Process pending Ethernet interrupts */
|
/* Process pending Ethernet interrupts */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
skel_txtimeout_process(skel);
|
skel_txtimeout_process(skel);
|
||||||
|
net_unlock(state);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -693,10 +699,13 @@ static inline void skel_poll_process(FAR struct skel_driver_s *skel)
|
|||||||
static void skel_poll_work(FAR void *arg)
|
static void skel_poll_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
/* Perform the poll */
|
/* Perform the poll */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
skel_poll_process(skel);
|
skel_poll_process(skel);
|
||||||
|
net_unlock(state);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -884,10 +893,13 @@ static int inline skel_txavail_process(FAR struct skel_driver_s *skel)
|
|||||||
static void skel_txavail_work(FAR void *arg)
|
static void skel_txavail_work(FAR void *arg)
|
||||||
{
|
{
|
||||||
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
FAR struct skel_driver_s *skel = (FAR struct skel_driver_s *)arg;
|
||||||
|
net_lock_t state;
|
||||||
|
|
||||||
/* Perform the poll */
|
/* Perform the poll */
|
||||||
|
|
||||||
|
state = net_lock();
|
||||||
skel_txavail_process(skel);
|
skel_txavail_process(skel);
|
||||||
|
net_unlock(state);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user