Thread (61 messages) flat view 61 messages, 7 authors, 2012-09-06

Re: [net-next 12/13] igb: Correct PTP support query from ethtool.

From: Richard Cochran <richardcochran@gmail.com>
Date: 2012-08-23 11:24:31

On Thu, Aug 23, 2012 at 02:56:52AM -0700, Jeff Kirsher wrote:
From: Matthew Vick <redacted>

Update ethtool_get_ts_info to not report any supported functionality on
82575 and add support for V2 Sync and V2 Delay packets. In the case
where CONFIG_IGB_PTP is not defined, we should be reporting default
values.
quoted hunk ↗ jump to hunk
diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c
...
+#endif /* CONFIG_IGB_PTP */
+	default:
+		return ethtool_op_get_ts_info(dev, info);
This is wrong. Using this function advertises that you support SW TX
time stamps, which you do not.

Thanks,
Richard
quoted hunk ↗ jump to hunk
+		break;
+	}
 
 	return 0;
 }
-#endif /* CONFIG_IGB_PTP */
 
 static int igb_ethtool_begin(struct net_device *netdev)
 {
@@ -2351,9 +2368,7 @@ static const struct ethtool_ops igb_ethtool_ops = {
 	.get_ethtool_stats      = igb_get_ethtool_stats,
 	.get_coalesce           = igb_get_coalesce,
 	.set_coalesce           = igb_set_coalesce,
-#ifdef CONFIG_IGB_PTP
 	.get_ts_info            = igb_get_ts_info,
-#endif /* CONFIG_IGB_PTP */
 	.begin			= igb_ethtool_begin,
 	.complete		= igb_ethtool_complete,
 };
-- 
1.7.11.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help