summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorShengzhou Liu <Shengzhou.Liu@freescale.com>2013-11-13 10:51:31 (GMT)
committerMadalin-Cristian Bucur <madalin.bucur@freescale.com>2014-01-06 15:08:51 (GMT)
commitef7d89b59b54c33b1eb6faddf64fddee1b8327e8 (patch)
tree7efb2c1f2ea5d57defcf48a5f152f67c0294f7dd /drivers/net/ethernet/freescale
parent2e25db249d23cf1d644a002881d453ea01871a4f (diff)
downloadlinux-fsl-qoriq-ef7d89b59b54c33b1eb6faddf64fddee1b8327e8.tar.xz
dpaa_eth: fix bug of storing Rx timestamp incorrectly
Correct the position of storing 1588 timestamp in Rx path in contig_fd_to_skb. Signed-off-by: Shengzhou Liu <Shengzhou.Liu@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/6606 Reviewed-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com> Tested-by: Review Code-CDREVIEW <CDREVIEW@freescale.com> Reviewed-by: Ruxandra Ioana Radulescu <ruxandra.radulescu@freescale.com> Reviewed-by: Thomas Trefny <Tom.Trefny@freescale.com> Change-Id: Ia94a9b9c8313b3204a1f9b5d6e5a3410c2509c3a Reviewed-on: http://git.am.freescale.net:8181/7351 Reviewed-by: Jose Rivera <German.Rivera@freescale.com> Reviewed-on: http://git.am.freescale.net:8181/7684 Tested-by: Madalin-Cristian Bucur <madalin.bucur@freescale.com>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c
index e48a21d..2284318 100644
--- a/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c
+++ b/drivers/net/ethernet/freescale/dpa/dpaa_eth_sg.c
@@ -359,12 +359,6 @@ static struct sk_buff *__hot contig_fd_to_skb(const struct dpa_priv_s *priv,
skb->truesize = SKB_TRUESIZE(dpa_fd_length(fd));
#endif
- /* do we need the timestamp for bad frames? */
-#ifdef CONFIG_FSL_DPAA_1588
- if (priv->tsu && priv->tsu->valid && priv->tsu->hwts_rx_en_ioctl)
- dpa_ptp_store_rxstamp(priv, skb, vaddr);
-#endif
-
DPA_BUG_ON(fd_off != priv->rx_headroom);
skb_reserve(skb, fd_off);
skb_put(skb, dpa_fd_length(fd));
@@ -374,6 +368,10 @@ static struct sk_buff *__hot contig_fd_to_skb(const struct dpa_priv_s *priv,
DPA_RX_PRIV_DATA_SIZE);
_dpa_process_parse_results(parse_results, fd, skb, use_gro);
+#ifdef CONFIG_FSL_DPAA_1588
+ if (priv->tsu && priv->tsu->valid && priv->tsu->hwts_rx_en_ioctl)
+ dpa_ptp_store_rxstamp(priv, skb, vaddr);
+#endif
#ifdef CONFIG_FSL_DPAA_TS
if (priv->ts_rx_en)
dpa_get_ts(priv, RX, skb_hwtstamps(skb), vaddr);