X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fdpaa2%2Fdpaa2_ptp.c;h=3a4536dd69c1bdb8321d11993c022692cc13e9f8;hb=9df62f8574c2ea139432e3fff010d756f0980c45;hp=899dd5d442ebdfaf9f1f1fc293cd96fb36f9c683;hpb=c6299a086711b0578fcebe6a2ee99f3cba6faa54;p=dpdk.git diff --git a/drivers/net/dpaa2/dpaa2_ptp.c b/drivers/net/dpaa2/dpaa2_ptp.c index 899dd5d442..3a4536dd69 100644 --- a/drivers/net/dpaa2/dpaa2_ptp.c +++ b/drivers/net/dpaa2/dpaa2_ptp.c @@ -10,7 +10,7 @@ #include #include -#include +#include #include #include #include @@ -111,10 +111,12 @@ int dpaa2_timesync_read_tx_timestamp(struct rte_eth_dev *dev, { struct dpaa2_dev_priv *priv = dev->data->dev_private; - if (priv->next_tx_conf_queue) - dpaa2_dev_tx_conf(priv->next_tx_conf_queue); - else + if (priv->next_tx_conf_queue) { + while (!priv->tx_timestamp) + dpaa2_dev_tx_conf(priv->next_tx_conf_queue); + } else { return -1; + } *timestamp = rte_ns_to_timespec(priv->tx_timestamp); return 0;