diff --git a/ChangeLog b/ChangeLog index 61602bcd45..48656b96d5 100755 --- a/ChangeLog +++ b/ChangeLog @@ -10741,6 +10741,7 @@ serial console. I-/D-Caches and DTCM have been enabled. The delay loop has been calibrated -- very fast (2015-07-19). * drivers/sensor and include/nuttx/sensors: Add support to Bosch BMP180 - barometer. From Alan Carvalho de Assis. + barometer. From Alan Carvalho de Assis (2015-07-20). * configs/stm32f4discovery/: Add support to BMP180 driver on the - STM32F4Discovery. From Alan Carvalho de Assis. + STM32F4Discovery. From Alan Carvalho de Assis (2015-07-20). + * arch/arm/srch/stm32f7: Add an STM32 F7 Ethernet driver (2015-07-20). diff --git a/arch/arm/src/stm32f7/stm32_ethernet.c b/arch/arm/src/stm32f7/stm32_ethernet.c index c9fd0f6c8c..ae918adf1e 100644 --- a/arch/arm/src/stm32f7/stm32_ethernet.c +++ b/arch/arm/src/stm32f7/stm32_ethernet.c @@ -1601,17 +1601,18 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) */ rxdesc = priv->rxhead; + + /* Forces the first RX descriptor to be re-read from physical memory */ + + arch_invalidate_dcache((uintptr_t)rxdesc, + (uintptr_t)rxdesc + sizeof(struct eth_rxdesc_s)); + for (i = 0; (rxdesc->rdes0 & ETH_RDES0_OWN) == 0 && i < CONFIG_STM32F7_ETH_NRXDESC && priv->inflight < CONFIG_STM32F7_ETH_NTXDESC; i++) { - /* Forces the descriptor to be re-read from physical memory */ - - arch_invalidate_dcache((uintptr_t)rxdesc, - (uintptr_t)rxdesc + sizeof(struct eth_rxdesc_s)); - /* Check if this is the first segment in the frame */ if ((rxdesc->rdes0 & ETH_RDES0_FS) != 0 && @@ -1720,7 +1721,12 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv) /* Try the next descriptor */ rxdesc = (struct eth_rxdesc_s *)rxdesc->rdes3; - } + + /* Force the next RX descriptor to be re-read from physical memory */ + + arch_invalidate_dcache((uintptr_t)rxdesc, + (uintptr_t)rxdesc + sizeof(struct eth_rxdesc_s)); + } /* We get here after all of the descriptors have been scanned or when rxdesc points * to the first descriptor owned by the DMA. Remember where we left off. @@ -3051,7 +3057,7 @@ static void stm32_rxdescinit(struct stm32_ethmac_s *priv, /* Set Buffer1 address pointer */ - rxdesc->rdes2 = (uint32_t)rxbuffer[i * ALIGNED_BUFSIZE]; + rxdesc->rdes2 = (uint32_t)&rxbuffer[i * ALIGNED_BUFSIZE]; /* Initialize the next descriptor with the Next Descriptor Polling Enable */ diff --git a/configs b/configs index 904bbaa3ea..b0084a7dde 160000 --- a/configs +++ b/configs @@ -1 +1 @@ -Subproject commit 904bbaa3eaf109d15ab1cdbdb09fb59d1b5fc028 +Subproject commit b0084a7ddeb6733d8bccc7e495995e8b5169fd8f