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)
commite9e3720002f61cd637a49ecafae77cac230eefae
tree0cf6de55843143b4cec266d801c988cd998063fa
parentb2aae654a4794ef898ad33a179f341eb610f6b85
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