[U-Boot] [PATCH v1 28/41] net: mvpp2.c: Clear all buffer / descriptor areas before usage
Stefan Roese
sr at denx.de
Tue Mar 21 14:27:49 UTC 2017
This fixes problems noticed with the PPv2.2 A7k/8k port, when not all
elements of the descriptors had been cleared before use.
Signed-off-by: Stefan Roese <sr at denx.de>
---
drivers/net/mvpp2.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c
index bacc9190e1..66e75e2af4 100644
--- a/drivers/net/mvpp2.c
+++ b/drivers/net/mvpp2.c
@@ -4426,6 +4426,9 @@ static int mvpp2_base_probe(struct udevice *dev)
size += RX_BUFFER_SIZE;
}
+ /* Clear the complete area so that all descriptors are cleared */
+ memset(bd_space, 0, size);
+
/* Save base addresses for later use */
priv->base = (void *)dev_get_addr_index(dev, 0);
if (IS_ERR(priv->base))
--
2.12.0
More information about the U-Boot
mailing list