diff options
author | Ioana Radulescu <ruxandra.radulescu@nxp.com> | 2017-06-16 12:40:55 (GMT) |
---|---|---|
committer | Xie Xiaobo <xiaobo.xie@nxp.com> | 2017-09-25 07:25:37 (GMT) |
commit | 9f00d0b4f0d247392c3b2eb9db54c3d5f3c20089 (patch) | |
tree | 7f1ab96094af1deac62dbde1a94e0df5c5ff9e40 | |
parent | b1e89e362da573a95af1cd2c78c6365a92a9fbd2 (diff) | |
download | linux-9f00d0b4f0d247392c3b2eb9db54c3d5f3c20089.tar.xz |
staging: fsl-dpaa2/eth: Set Tx timestamp support correctly
We used to set pass_timestamp parameter only for Tx
confirmation buffer layout config, when in fact MC
also looks at the Tx buffer layout when deciding whether
to enable Tx timestamping support or not.
Older versions of MC (< MC.1.x) enabled this support regardless
of user config, so the issue was hidden.
Copy the pass_timestamp setting to Tx buffer layout configuration.
Signed-off-by: Ioana Radulescu <ruxandra.radulescu@nxp.com>
-rw-r--r-- | drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c index 1acd00a..cb6331c 100644 --- a/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c +++ b/drivers/staging/fsl-dpaa2/ethernet/dpaa2-eth.c @@ -2065,7 +2065,9 @@ static int setup_dpni(struct fsl_mc_device *ls_dev) /* tx buffer */ buf_layout.options = DPNI_BUF_LAYOUT_OPT_FRAME_STATUS | + DPNI_BUF_LAYOUT_OPT_TIMESTAMP | DPNI_BUF_LAYOUT_OPT_PRIVATE_DATA_SIZE; + buf_layout.pass_timestamp = true; err = dpni_set_buffer_layout(priv->mc_io, 0, priv->mc_token, DPNI_QUEUE_TX, &buf_layout); if (err) { @@ -2075,8 +2077,8 @@ static int setup_dpni(struct fsl_mc_device *ls_dev) } /* tx-confirm buffer */ - buf_layout.options = DPNI_BUF_LAYOUT_OPT_FRAME_STATUS; - buf_layout.pass_timestamp = 1; + buf_layout.options = DPNI_BUF_LAYOUT_OPT_FRAME_STATUS | + DPNI_BUF_LAYOUT_OPT_TIMESTAMP; err = dpni_set_buffer_layout(priv->mc_io, 0, priv->mc_token, DPNI_QUEUE_TX_CONFIRM, &buf_layout); if (err) { |