Kinetis enet: RDAR should be called after ETHER_EN

This commit is contained in:
Andrew Webster
2016-01-21 18:46:54 -06:00
committed by Gregory Nutt
parent c1a8443416
commit 6ba74a281a
+4 -4
View File
@@ -939,16 +939,16 @@ static int kinetis_ifup(struct net_driver_s *dev)
putreg32((uint32_t)priv->txdesc, KINETIS_ENET_TDSR);
/* Indicate that there have been empty receive buffers produced */
putreg32(ENET_RDAR, KINETIS_ENET_RDAR);
/* And enable the MAC itself */
regval = getreg32(KINETIS_ENET_ECR);
regval |= ENET_ECR_ETHEREN;
putreg32(regval, KINETIS_ENET_ECR);
/* Indicate that there have been empty receive buffers produced */
putreg32(ENET_RDAR, KINETIS_ENET_RDAR);
/* Set and activate a timer process */
(void)wd_start(priv->txpoll, KINETIS_WDDELAY, kinetis_polltimer, 1, (uint32_t)priv);