summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2015-01-16 15:25:18 -0600
committerGregory Nutt <gnutt@nuttx.org>2015-01-16 15:25:18 -0600
commita857d10cb34e9aff1bc25d30cf3ab25e952a12e9 (patch)
tree9273f3e2c663082cf75d9d511b4302ed5b705f53 /nuttx
parent537053c09f507496398d08cb3bfe281f636fa236 (diff)
downloadpx4-nuttx-a857d10cb34e9aff1bc25d30cf3ab25e952a12e9.tar.gz
px4-nuttx-a857d10cb34e9aff1bc25d30cf3ab25e952a12e9.tar.bz2
px4-nuttx-a857d10cb34e9aff1bc25d30cf3ab25e952a12e9.zip
TM4C Ethernet: Add some assertions
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/arch/arm/src/tiva/tm4c_ethernet.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/tiva/tm4c_ethernet.c b/nuttx/arch/arm/src/tiva/tm4c_ethernet.c
index 992f0bffc..14acdab76 100644
--- a/nuttx/arch/arm/src/tiva/tm4c_ethernet.c
+++ b/nuttx/arch/arm/src/tiva/tm4c_ethernet.c
@@ -1660,6 +1660,13 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv)
{
struct net_driver_s *dev = &priv->dev;
+ /* I have seen this error just after writing a new image to FLASH. After
+ * resetting he board, I never see it again. I am guessing that the
+ * flasher leaves the hardware in a bad state(?).
+ */
+
+ DEBUGASSERT(dev->d_buf != NULL);
+
/* Loop while while tiva_recvframe() successfully retrieves valid
* Ethernet frames.
*/
@@ -2041,7 +2048,9 @@ static inline void tiva_interrupt_process(FAR struct tiva_ethmac_s *priv)
#ifdef CONFIG_NET_NOINTS
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;
+
+ DEBUGASSERT(priv);
/* Process pending Ethernet interrupts */