diff options
author | Atul Gupta <atul.gupta@chelsio.com> | 2017-07-04 07:16:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-07-05 04:21:54 -0400 |
commit | c3ff08eba94ec92417bd78c0d0ad567c483eca85 (patch) | |
tree | 35907d115361eab000d7dc2ef772249411c3002a | |
parent | 9c33e4208bce512e1708781711b2846f463d2eb4 (diff) |
cxgb4: Support for get_ts_info ethtool method
Cc: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c index e9bab72253bb..26eb00a45db1 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_ethtool.c | |||
@@ -1113,14 +1113,31 @@ static int set_flash(struct net_device *netdev, struct ethtool_flash *ef) | |||
1113 | 1113 | ||
1114 | static int get_ts_info(struct net_device *dev, struct ethtool_ts_info *ts_info) | 1114 | static int get_ts_info(struct net_device *dev, struct ethtool_ts_info *ts_info) |
1115 | { | 1115 | { |
1116 | struct port_info *pi = netdev_priv(dev); | ||
1117 | struct adapter *adapter = pi->adapter; | ||
1118 | |||
1116 | ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | | 1119 | ts_info->so_timestamping = SOF_TIMESTAMPING_TX_SOFTWARE | |
1117 | SOF_TIMESTAMPING_RX_SOFTWARE | | 1120 | SOF_TIMESTAMPING_RX_SOFTWARE | |
1118 | SOF_TIMESTAMPING_SOFTWARE; | 1121 | SOF_TIMESTAMPING_SOFTWARE; |
1119 | 1122 | ||
1120 | ts_info->so_timestamping |= SOF_TIMESTAMPING_RX_HARDWARE | | 1123 | ts_info->so_timestamping |= SOF_TIMESTAMPING_RX_HARDWARE | |
1124 | SOF_TIMESTAMPING_TX_HARDWARE | | ||
1121 | SOF_TIMESTAMPING_RAW_HARDWARE; | 1125 | SOF_TIMESTAMPING_RAW_HARDWARE; |
1122 | 1126 | ||
1123 | ts_info->phc_index = -1; | 1127 | ts_info->tx_types = (1 << HWTSTAMP_TX_OFF) | |
1128 | (1 << HWTSTAMP_TX_ON); | ||
1129 | |||
1130 | ts_info->rx_filters = (1 << HWTSTAMP_FILTER_NONE) | | ||
1131 | (1 << HWTSTAMP_FILTER_PTP_V2_L4_EVENT) | | ||
1132 | (1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) | | ||
1133 | (1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) | | ||
1134 | (1 << HWTSTAMP_FILTER_PTP_V2_L4_SYNC) | | ||
1135 | (1 << HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ); | ||
1136 | |||
1137 | if (adapter->ptp_clock) | ||
1138 | ts_info->phc_index = ptp_clock_index(adapter->ptp_clock); | ||
1139 | else | ||
1140 | ts_info->phc_index = -1; | ||
1124 | 1141 | ||
1125 | return 0; | 1142 | return 0; |
1126 | } | 1143 | } |