net: mvpp2x: Set BM poll size once during priv probe
authorStefan Chulski <stefanc@marvell.com>
Wed, 9 Aug 2017 07:37:52 +0000 (10:37 +0300)
committerStefan Roese <sr@denx.de>
Thu, 10 Aug 2017 06:33:02 +0000 (08:33 +0200)
Set BM poll size once during priv probe and do not
overwrite it during port probe procedure. Pool is common for
all CP ports.

Signed-off-by: Stefan Chulski <stefanc@marvell.com>
Tested-by: iSoC Platform CI <ykjenk@marvell.com>
Reviewed-by: Nadav Haklai <nadavh@marvell.com>
Reviewed-by: Igal Liberman <igall@marvell.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Stefan Roese <sr@denx.de>
drivers/net/mvpp2.c

index a7077c7361a0cacf4a092b037aeeae88e5339b7d..233c98b66c88d85f9578b9b84766124c2d4f2f4d 100644 (file)
@@ -2675,7 +2675,7 @@ static int mvpp2_bm_pools_init(struct udevice *dev,
                err = mvpp2_bm_pool_create(dev, priv, bm_pool, size);
                if (err)
                        goto err_unroll_pools;
-               mvpp2_bm_pool_bufsize_set(priv, bm_pool, 0);
+               mvpp2_bm_pool_bufsize_set(priv, bm_pool, RX_BUFFER_SIZE);
        }
        return 0;
 
@@ -2861,9 +2861,6 @@ mvpp2_bm_pool_use(struct mvpp2_port *port, int pool, enum mvpp2_bm_type type,
                }
        }
 
-       mvpp2_bm_pool_bufsize_set(port->priv, new_pool,
-                                 MVPP2_RX_BUF_SIZE(new_pool->pkt_size));
-
        return new_pool;
 }