mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 00:14:22 +08:00
arch/arm/stm32f7: fix cache invalidation issue in Ethernet RX
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
This commit is contained in:
committed by
David Sidrane
parent
4cd7e33b8d
commit
27fe5a50c6
@@ -219,8 +219,8 @@
|
|||||||
# define CONFIG_STM32F7_ETH_NTXDESC 4
|
# define CONFIG_STM32F7_ETH_NTXDESC 4
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef min
|
#ifndef MIN
|
||||||
# define min(a,b) ((a) < (b) ? (a) : (b))
|
# define MIN(a,b) ((a) < (b) ? (a) : (b))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* We need at least one more free buffer than transmit buffers */
|
/* We need at least one more free buffer than transmit buffers */
|
||||||
@@ -1732,7 +1732,8 @@ static int stm32_recvframe(struct stm32_ethmac_s *priv)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
up_invalidate_dcache((uintptr_t)dev->d_buf,
|
up_invalidate_dcache((uintptr_t)dev->d_buf,
|
||||||
min(dev->d_len, ALIGNED_BUFSIZE));
|
(uintptr_t)dev->d_buf +
|
||||||
|
MIN(dev->d_len, ALIGNED_BUFSIZE));
|
||||||
|
|
||||||
ninfo("rxhead: %p d_buf: %p d_len: %d\n",
|
ninfo("rxhead: %p d_buf: %p d_len: %d\n",
|
||||||
priv->rxhead, dev->d_buf, dev->d_len);
|
priv->rxhead, dev->d_buf, dev->d_len);
|
||||||
|
|||||||
Reference in New Issue
Block a user