From: Stefan Roese Date: Thu, 16 Feb 2017 12:29:08 +0000 (+0100) Subject: net: mvpp2.c: Clear all buffer / descriptor areas before usage X-Git-Url: http://git.dujemihanovic.xyz/?a=commitdiff_plain;h=30edc374ea230d73a92d4dc250bfd0cf60ce81c9;p=u-boot.git net: mvpp2.c: Clear all buffer / descriptor areas before usage 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 Acked-by: Joe Hershberger --- diff --git a/drivers/net/mvpp2.c b/drivers/net/mvpp2.c index 06909e6a3c..b9e0fdcc82 100644 --- a/drivers/net/mvpp2.c +++ b/drivers/net/mvpp2.c @@ -4429,6 +4429,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))