Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314529
b: refs/heads/master
c: cb41145
h: refs/heads/master
i:
  314527: b549e59
v: v3
  • Loading branch information
Carolyn Wyborny authored and Jeff Kirsher committed Jun 20, 2012
1 parent b1c8630 commit 4ad634b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d3eef8c8a033a5ee56ab5d923068eb8cd5d53887
refs/heads/master: cb41145ee78585282af56a9203f391c0d84366b1
35 changes: 35 additions & 0 deletions trunk/drivers/net/ethernet/intel/igb/igb_ethtool.c
Original file line number Diff line number Diff line change
Expand Up @@ -2271,6 +2271,38 @@ static void igb_ethtool_complete(struct net_device *netdev)
pm_runtime_put(&adapter->pdev->dev);
}

#ifdef CONFIG_IGB_PTP
static int igb_ethtool_get_ts_info(struct net_device *dev,
struct ethtool_ts_info *info)
{
struct igb_adapter *adapter = netdev_priv(dev);

info->so_timestamping =
SOF_TIMESTAMPING_TX_HARDWARE |
SOF_TIMESTAMPING_RX_HARDWARE |
SOF_TIMESTAMPING_RAW_HARDWARE;

if (adapter->ptp_clock)
info->phc_index = ptp_clock_index(adapter->ptp_clock);
else
info->phc_index = -1;

info->tx_types =
(1 << HWTSTAMP_TX_OFF) |
(1 << HWTSTAMP_TX_ON);

info->rx_filters =
(1 << HWTSTAMP_FILTER_NONE) |
(1 << HWTSTAMP_FILTER_ALL) |
(1 << HWTSTAMP_FILTER_SOME) |
(1 << HWTSTAMP_FILTER_PTP_V1_L4_SYNC) |
(1 << HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ) |
(1 << HWTSTAMP_FILTER_PTP_V2_EVENT);

return 0;
}

#endif
static const struct ethtool_ops igb_ethtool_ops = {
.get_settings = igb_get_settings,
.set_settings = igb_set_settings,
Expand Down Expand Up @@ -2299,6 +2331,9 @@ static const struct ethtool_ops igb_ethtool_ops = {
.set_coalesce = igb_set_coalesce,
.begin = igb_ethtool_begin,
.complete = igb_ethtool_complete,
#ifdef CONFIG_IGB_PTP
.get_ts_info = igb_ethtool_get_ts_info,
#endif
};

void igb_set_ethtool_ops(struct net_device *netdev)
Expand Down

0 comments on commit 4ad634b

Please sign in to comment.