net/bnxt: fix Rx timestamp when FIFO pending bit is set
authorSomnath Kotur <somnath.kotur@broadcom.com>
Mon, 26 Apr 2021 06:07:55 +0000 (11:37 +0530)
committerAjit Khaparde <ajit.khaparde@broadcom.com>
Sun, 2 May 2021 22:15:19 +0000 (00:15 +0200)
commitf8120fd07bf0ebdbcfa7e1a46c91df9d611ca940
treefa3c1480064fdad549bbf7bbf58862951c7de9c3
parent21b1677d87a23a9695be0cbcbdf38607a2d58f84
net/bnxt: fix Rx timestamp when FIFO pending bit is set

Fix to clear the Rx FIFO while reading the timestamp.
If the Rx FIFO has pending bit set, keep reading to clear it
and return the last valid timestamp instead of unconditionally
returning an error.

Fixes: b11cceb83a34 ("net/bnxt: support timesync")
Cc: stable@dpdk.org
Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
drivers/net/bnxt/bnxt.h
drivers/net/bnxt/bnxt_ethdev.c