From: Ioana Radulescu Date: Tue, 6 Jun 2017 15:00:32 +0000 (-0500) Subject: staging: fsl-dpaa2/eth: Reset dpbp X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d00defe30a21eea6d952925dccc7e212b1baf1ff;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git staging: fsl-dpaa2/eth: Reset dpbp Reset the buffer pool object before using it, like we do for the other DPAA2 objects. Signed-off-by: Ioana Radulescu Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index d3ec384c7364..fd56fbd20087 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -1687,6 +1687,12 @@ static int setup_dpbp(struct dpaa2_eth_priv *priv) goto err_open; } + err = dpbp_reset(priv->mc_io, 0, dpbp_dev->mc_handle); + if (err) { + dev_err(dev, "dpbp_reset() failed\n"); + goto err_reset; + } + err = dpbp_enable(priv->mc_io, 0, dpbp_dev->mc_handle); if (err) { dev_err(dev, "dpbp_enable() failed\n"); @@ -1705,6 +1711,7 @@ static int setup_dpbp(struct dpaa2_eth_priv *priv) err_get_attr: dpbp_disable(priv->mc_io, 0, dpbp_dev->mc_handle); err_enable: +err_reset: dpbp_close(priv->mc_io, 0, dpbp_dev->mc_handle); err_open: fsl_mc_object_free(dpbp_dev);