]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitdbd4523560b68f3c68336c2314b2a4c1c4732176
treedf642956112be0cd798f4a7b9c1fb8ec57c86ff6
parent6d604faa6f4134bd4bd53baa09961acd7aec5da4
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: 881cb92cc8a1 ("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