]> asedeno.scripts.mit.edu Git - linux.git/commit
net: stmmac: Get correct timestamp values from XGMAC
authorJose Abreu <Jose.Abreu@synopsys.com>
Sat, 17 Aug 2019 18:54:40 +0000 (20:54 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Aug 2019 19:43:59 +0000 (12:43 -0700)
commit25e80cd05ff81e51750106f1ae12364449ec38e7
tree520b8763df7b9e4e6a67608cbc94345a61aa5c45
parent83beee5a3aff0fb159b2fb4d0cac8f18a193417e
net: stmmac: Get correct timestamp values from XGMAC

TX Timestamp in XGMAC comes from MAC instead of descriptors. Implement
this in a new callback.

Also, RX Timestamp in XGMAC must be cheked against corruption and we need
a barrier to make sure that descriptor fields are read correctly.

Changes from v2:
- Rework return code check (Jakub)
Changes from v1:
- Rework the get timestamp function (David)

Signed-off-by: Jose Abreu <joabreu@synopsys.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_core.c
drivers/net/ethernet/stmicro/stmmac/dwxgmac2_descs.c
drivers/net/ethernet/stmicro/stmmac/hwif.h
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c