enetc: add hardware timestamping support
authorY.b. Lu <yangbo.lu@nxp.com>
Thu, 23 May 2019 02:33:29 +0000 (02:33 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 May 2019 20:16:32 +0000 (13:16 -0700)
commitd398231219116da5697bbe090e478dd68a2259ed
treeee9ed557c74d819836a8fe8827919fc0d11885fa
parentdfb569f2b96e2075bdf80883677d40d86f6b19db
enetc: add hardware timestamping support

This patch is to add hardware timestamping support
for ENETC. On Rx, timestamping is enabled for all
frames. On Tx, we only instruct the hardware to
timestamp the frames marked accordingly by the stack.

Because the RX BD ring dynamic allocation has not been
supported and it is too expensive to use extended RX BDs
if timestamping is not used, a Kconfig option is used to
enable extended RX BDs in order to support hardware
timestamping. This option will be removed once RX BD
ring dynamic allocation is implemented.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/freescale/enetc/Kconfig
drivers/net/ethernet/freescale/enetc/enetc.c
drivers/net/ethernet/freescale/enetc/enetc.h
drivers/net/ethernet/freescale/enetc/enetc_hw.h
drivers/net/ethernet/freescale/enetc/enetc_pf.c
drivers/net/ethernet/freescale/enetc/enetc_vf.c