bnxt_en: Get the full 48-bit hardware timestamp periodically
authorPavan Chebbi <pavan.chebbi@broadcom.com>
Sun, 27 Jun 2021 17:19:47 +0000 (13:19 -0400)
committerDavid S. Miller <davem@davemloft.net>
Mon, 28 Jun 2021 20:41:06 +0000 (13:41 -0700)
commit390862f45c85b8ebbf9c5c09192bf413a8fb72f8
treec35182465923f225abbc78772880b4f9c85290f1
parent118612d519d83b98ead11195a5c818f5e8904654
bnxt_en: Get the full 48-bit hardware timestamp periodically

From the bnxt_timer(), read the 48-bit hardware running clock
periodically and store it in ptp->current_time.  The previous snapshot
of the clock will be stored in ptp->old_time.  The old_time snapshot
will be used in the next patches to compute the RX packet timestamps.

v2: Use .do_aux_work() to read the timer periodically.

Reviewed-by: Edwin Peer <edwin.peer@broadcom.com>
Signed-off-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h