mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-12 05:48:40 +00:00
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 <ruxandra.radulescu@nxp.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d4b3763d38
commit
d00defe30a
1 changed files with 7 additions and 0 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue