bnxt_en: Add missing periodic PHC overflow check
authorMichael Chan <michael.chan@broadcom.com>
Fri, 23 Jul 2021 21:53:48 +0000 (17:53 -0400)
committerDavid S. Miller <davem@davemloft.net>
Sat, 24 Jul 2021 18:47:58 +0000 (19:47 +0100)
commit89bc7f456cd40e0be7b94f4fdae9186f22b76a05
treedf642956112be0cd798f4a7b9c1fb8ec57c86ff6
parent3cf4375a090473d240281a0d2b04a3a5aaeac34b
bnxt_en: Add missing periodic PHC overflow check

We use the timecounter APIs for the 48-bit PHC and packet timestamps.
We must periodically update the timecounter at roughly half the
overflow interval.  The overflow interval is about 78 hours, so
update it every 19 hours (1/4 interval) for some extra margins.

Fixes: 390862f45c85 ("bnxt_en: Get the full 48-bit hardware timestamp periodically")
Reviewed-by: Pavan Chebbi <pavan.chebbi@broadcom.com>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Acked-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.c
drivers/net/ethernet/broadcom/bnxt/bnxt_ptp.h