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-08-28 15:21:40 (GMT) |
commit | 2a5e204442048ed35f00379634946711cf7b1bc9 (patch) | |
tree | 7a674b0ba9d74982bdb7eaf3a59d4ac2681e8602 | |
parent | d7bb4ba636b1b8f3bc3bf184fbe2fedcfcf02adc (diff) | |
download | linux-fsl-qoriq-2a5e204442048ed35f00379634946711cf7b1bc9.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>
-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 8e8bea2..d4e8d48 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); } |