]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: ptp: update tas basetime after ptp adjust
authorXiaoliang Yang <xiaoliang.yang_1@nxp.com>
Mon, 5 Jul 2021 10:26:55 +0000 (18:26 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 Jul 2021 17:16:17 +0000 (10:16 -0700)
commit7069f0b8f5f3b59fb4420dc9a9e515c1704670f6
tree0cf6de55843143b4cec266d801c988cd998063fa
parent865d548a267144a38b9ee5153483c8e2040c35c9
net: stmmac: ptp: update tas basetime after ptp adjust

After adjusting the ptp time, the Qbv base time may be the past time
of the new current time. dwmac5 hardware limited the base time cannot
be set as past time. This patch add a btr_reserve to store the base
time get from qopt, then calculate the base time and reset the Qbv
configuration after ptp time adjust.

Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.c
drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c
include/linux/stmmac.h