diff options
author | Ioana Radulescu <ruxandra.radulescu@freescale.com> | 2013-08-20 14:04:45 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <German.Rivera@freescale.com> | 2013-09-10 23:20:33 (GMT) |
commit | bad206bc9bd78e15dc7df68974a02e5ab60dfa83 (patch) | |
tree | 58388d572df8d269528fd7cf9a8f876c95f1f3de /drivers/net/ethernet/freescale/dpa | |
parent | 769b68e22239ccc1e7162593ca4aba1b0ff5189d (diff) | |
download | linux-fsl-qoriq-bad206bc9bd78e15dc7df68974a02e5ab60dfa83.tar.xz |
dpaa_eth: Fix freeing of frame in error cases
In case of a Tx error at FMan level or an ERN, if the frame was
marked as recycleable we need to put the buffers in the target pools,
otherwise we mess up the pool counters. This was done correctly for
the ERN callback, now fixing the Tx error one as well.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com>
Change-Id: I0faa77a31af9086806713e593da72b03c2bd3223
Reviewed-on: http://git.am.freescale.net:8181/4192
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Reviewed-on: http://git.am.freescale.net:8181/4470
Reviewed-by: Sovaiala Cristian-Constantin-B39531 <Cristian.Sovaiala@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale/dpa')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c index 9a139d8..77a3a35 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -215,6 +215,14 @@ static void _dpa_tx_error(struct net_device *net_dev, percpu_priv->stats.tx_errors++; + /* If we intended the buffers from this frame to go into the bpools + * when the FMan transmit was done, we need to put it in manually. + */ + if (fd->cmd & FM_FD_CMD_FCO) { + dpa_fd_release(net_dev, fd); + return; + } + skb = _dpa_cleanup_tx_fd(priv, fd); dev_kfree_skb(skb); } |