TM4C Ethernet: Add some assertions

This commit is contained in:
Gregory Nutt 2015-01-16 15:25:18 -06:00
parent 02c4eafb45
commit 1be7285567

View File

@ -1660,6 +1660,13 @@ static void tiva_receive(FAR struct tiva_ethmac_s *priv)
{ {
struct net_driver_s *dev = &priv->dev; 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 /* Loop while while tiva_recvframe() successfully retrieves valid
* Ethernet frames. * Ethernet frames.
*/ */
@ -2041,7 +2048,9 @@ static inline void tiva_interrupt_process(FAR struct tiva_ethmac_s *priv)
#ifdef CONFIG_NET_NOINTS #ifdef CONFIG_NET_NOINTS
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;
DEBUGASSERT(priv);
/* Process pending Ethernet interrupts */ /* Process pending Ethernet interrupts */