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-11 23:33:33 (GMT) |
commit | 1ae3f770820021fe8a2ff8ec5dab2b2f0ce7b05c (patch) | |
tree | 9f3050b0aa696b8c2c8414aa0e8089ff1c88cb20 /drivers/net/ethernet/freescale/dpa | |
parent | 6e8727d17c85c39df6beb317332a055d6fd598c0 (diff) | |
download | linux-fsl-qoriq-1ae3f770820021fe8a2ff8ec5dab2b2f0ce7b05c.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>
Reviewed-on: http://git.am.freescale.net:8181/4192
Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>
Change-Id: Iafc436208fe560fd098728e421b105cf568017d8
Reviewed-on: http://git.am.freescale.net:8181/4656
Reviewed-by: Bogdan Hamciuc <bogdan.hamciuc@freescale.com>
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@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 066cae0..3a5ec61 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth.c @@ -216,6 +216,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); } |