Skip to content

Commit

Permalink
net/bnxt: fix Tx timestamp init
Browse files Browse the repository at this point in the history
[ upstream commit aa764ba ]

Fix to read the sequence ID register to get Tx timestamp.
Reading the sequence ID register is necessary for the HW FIFO to
advance and thereby get the correct value of the timestamp on Tx side.
This patch fixes that.

Fixes: b11cceb ("net/bnxt: support timesync")

Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
  • Loading branch information
skotur-brcm authored and cpaelzer committed May 11, 2021
1 parent 75a0b1a commit 5a6893b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/bnxt/bnxt_ethdev.c
Expand Up @@ -3455,6 +3455,7 @@ static int bnxt_get_tx_ts(struct bnxt *bp, uint64_t *ts)
ptp->tx_mapped_regs[BNXT_PTP_TX_TS_L]));
*ts |= (uint64_t)rte_le_to_cpu_32(rte_read32((uint8_t *)bp->bar0 +
ptp->tx_mapped_regs[BNXT_PTP_TX_TS_H])) << 32;
rte_read32((uint8_t *)bp->bar0 + ptp->tx_mapped_regs[BNXT_PTP_TX_SEQ]);

return 0;
}
Expand Down

0 comments on commit 5a6893b

Please sign in to comment.