diff options
author | Ioana Radulescu <ruxandra.radulescu@freescale.com> | 2013-08-20 16:02:32 (GMT) |
---|---|---|
committer | Rivera Jose-B46482 <German.Rivera@freescale.com> | 2013-09-20 18:53:50 (GMT) |
commit | 7b7f65db63ecab22825ee1c744dd23b96cbff985 (patch) | |
tree | caaec4dadd64e7d29b50e956d4272ed817c6feb6 /drivers/net/ethernet | |
parent | 225f9c814d26de2b2265ecf68c714120ce85cdfb (diff) | |
download | linux-fsl-qoriq-7b7f65db63ecab22825ee1c744dd23b96cbff985.tar.xz |
dpaa_eth: No recycling if timestamp support is on
The timestamping code relies on Tx confirmation routine to get the
Tx timestamp of a frame. So if timestamp support is activated, don't
recycle frames at all.
Also fix a couple of compilation warnings when building with
timestamp support on.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@freescale.com>
Change-Id: I5ee3a5b727e28ee337dc9da5c16ad0d1dabe4317
Reviewed-on: http://git.am.freescale.net:8181/4838
Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com>
Reviewed-by: Cristian-Constantin Sovaiala <Cristian.Sovaiala@freescale.com>
Reviewed-by: Bucur Madalin-Cristian-B32716 <madalin.bucur@freescale.com>
Reviewed-by: Rivera Jose-B46482 <German.Rivera@freescale.com>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c index 61f2c40..176a433 100644 --- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c +++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c @@ -269,7 +269,7 @@ struct sk_buff *_dpa_cleanup_tx_fd(const struct dpa_priv_s *priv, return skb; } -#ifndef CONFIG_FSL_DPAA_TS +#if (!defined(CONFIG_FSL_DPAA_TS) && !defined(CONFIG_FSL_DPAA_1588)) static bool dpa_skb_is_recyclable(struct sk_buff *skb) { /* No recycling possible if skb buffer is kmalloc'ed */ @@ -317,7 +317,7 @@ static bool dpa_buf_is_recyclable(struct sk_buff *skb, return false; } -#endif /* CONFIG_FSL_DPAA_TS */ +#endif /* (!defined(CONFIG_FSL_DPAA_TS) && !defined(CONFIG_FSL_DPAA_1588)) */ /* Build a linear skb around the received buffer. @@ -605,10 +605,11 @@ static int __hot skb_to_contig_fd(struct dpa_priv_s *priv, struct net_device *net_dev = priv->net_dev; int err; enum dma_data_direction dma_dir; - int *count_ptr = __this_cpu_ptr(dpa_bp->percpu_count); unsigned char *buffer_start; -#ifndef CONFIG_FSL_DPAA_TS +#if (!defined(CONFIG_FSL_DPAA_TS) && !defined(CONFIG_FSL_DPAA_1588)) + int *count_ptr = __this_cpu_ptr(dpa_bp->percpu_count); + /* Check recycling conditions; only if timestamp support is not * enabled, otherwise we need the fd back on tx confirmation */ |