net: mvpp2.c: Clear all buffer / descriptor areas before usage
authorStefan Roese <sr@denx.de>
Thu, 16 Feb 2017 12:29:08 +0000 (13:29 +0100)
committerStefan Roese <sr@denx.de>
Wed, 29 Mar 2017 05:42:16 +0000 (07:42 +0200)
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@denx.de>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/net/mvpp2.c

index 06909e6a3c06e821df1a6e911a74dfdbe52bbe64..b9e0fdcc828fb4733a5797ae442988ccb39ae1d2 100644 (file)
@@ -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))