aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/xscale
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2012-04-03 18:59:21 -0400
committerDavid S. Miller <davem@davemloft.net>2012-04-04 05:28:46 -0400
commit509a7c25729feab353502e1b544c614772a1d49a (patch)
tree44e08849d8c9cd6cff083c5d3b1720588d4e8944 /drivers/net/ethernet/xscale
parenta85bbddd080ab49e461870411f6bb93f3d94ec11 (diff)
ixp4xx_eth: Support the get_ts_info ethtool method.
Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/xscale')
-rw-r--r--drivers/net/ethernet/xscale/ixp4xx_eth.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/ethernet/xscale/ixp4xx_eth.c b/drivers/net/ethernet/xscale/ixp4xx_eth.c
index 41a8b5a9849e..482648fcf0b6 100644
--- a/drivers/net/ethernet/xscale/ixp4xx_eth.c
+++ b/drivers/net/ethernet/xscale/ixp4xx_eth.c
@@ -1002,12 +1002,41 @@ static int ixp4xx_nway_reset(struct net_device *dev)
1002 return phy_start_aneg(port->phydev); 1002 return phy_start_aneg(port->phydev);
1003} 1003}
1004 1004
1005int ixp46x_phc_index = -1;
1006
1007static int ixp4xx_get_ts_info(struct net_device *dev,
1008 struct ethtool_ts_info *info)
1009{
1010 if (!cpu_is_ixp46x()) {
1011 info->so_timestamping =
1012 SOF_TIMESTAMPING_TX_SOFTWARE |
1013 SOF_TIMESTAMPING_RX_SOFTWARE |
1014 SOF_TIMESTAMPING_SOFTWARE;
1015 info->phc_index = -1;
1016 return 0;
1017 }
1018 info->so_timestamping =
1019 SOF_TIMESTAMPING_TX_HARDWARE |
1020 SOF_TIMESTAMPING_RX_HARDWARE |
1021 SOF_TIMESTAMPING_RAW_HARDWARE;
1022 info->phc_index = ixp46x_phc_index;
1023 info->tx_types =
1024 (1 << HWTSTAMP_TX_OFF) |
1025 (1 << HWTSTAMP_TX_ON);
1026 info->rx_filters =
1027 (1 << HWTSTAMP_FILTER_NONE) |
1028 (1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
1029 (1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ);
1030 return 0;
1031}
1032
1005static const struct ethtool_ops ixp4xx_ethtool_ops = { 1033static const struct ethtool_ops ixp4xx_ethtool_ops = {
1006 .get_drvinfo = ixp4xx_get_drvinfo, 1034 .get_drvinfo = ixp4xx_get_drvinfo,
1007 .get_settings = ixp4xx_get_settings, 1035 .get_settings = ixp4xx_get_settings,
1008 .set_settings = ixp4xx_set_settings, 1036 .set_settings = ixp4xx_set_settings,
1009 .nway_reset = ixp4xx_nway_reset, 1037 .nway_reset = ixp4xx_nway_reset,
1010 .get_link = ethtool_op_get_link, 1038 .get_link = ethtool_op_get_link,
1039 .get_ts_info = ixp4xx_get_ts_info,
1011}; 1040};
1012 1041
1013 1042