]> 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)
commitcc36a402707ebe45134e8811bbef8872312869f8
tree0cf6de55843143b4cec266d801c988cd998063fa
parent9d91cf15ab3e0b2246ce6590a2329ab94c6920f8
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