aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h
diff options
context:
space:
mode:
authorHariprasad Shenai <hariprasad@chelsio.com>2015-09-28 10:26:53 +0530
committerDavid S. Miller <davem@davemloft.net>2015-09-28 22:35:29 -0700
commit5e2a5ebc3f94027d0f2ffd33d3f3adbc856775d3 (patch)
tree443ef8667e7121d13c84afbef7ac10284167b241 /drivers/net/ethernet/chelsio/cxgb4/t4_hw.h
parentnet: Fix Hisilicon Network Subsystem Support Compilation (diff)
downloadlinux-dev-5e2a5ebc3f94027d0f2ffd33d3f3adbc856775d3.tar.xz
linux-dev-5e2a5ebc3f94027d0f2ffd33d3f3adbc856775d3.zip
cxgb4: Add HW timesptamp support for RX
Adds support for ethtool get time stamp ioctl, which is used by tcpdump to get the supported time stamp types eg: tcpdump -i eth5 -J Time stamp types for eth5 (use option -j to set): host (Host) adapter_unsynced (Adapter, not synced with system time) Adds support for adapter unsynced mode, by adding SIOCSHWTSTAMP support in driver. Signed-off-by: Hariprasad Shenai <hariprasad@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/t4_hw.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h
index 640369df8b3a..13708fde1668 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/t4_hw.h
@@ -263,4 +263,9 @@ enum {
#undef FLASH_START
#undef FLASH_MAX_SIZE
+#define SGE_TIMESTAMP_S 0
+#define SGE_TIMESTAMP_M 0xfffffffffffffffULL
+#define SGE_TIMESTAMP_V(x) ((__u64)(x) << SGE_TIMESTAMP_S)
+#define SGE_TIMESTAMP_G(x) (((__u64)(x) >> SGE_TIMESTAMP_S) & SGE_TIMESTAMP_M)
+
#endif /* __T4_HW_H */