提交 2156d9a8 编写于 作者: S Shawn Bohrer 提交者: David S. Miller

mlx4_en: Only cycle port if HW timestamp config changes

If the hwtstamp_config matches what is currently set for the device then
simply return.  Without this change any program that tries to enable
hardware timestamps will cause the link to cycle even if hardware
timstamps were already enabled.
Signed-off-by: NShawn Bohrer <sbohrer@rgmadvisors.com>
Acked-By: NHadar Hen Zion <hadarh@mellanox.com>
Acked-by: NRichard Cochran <richardcochran@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ad7d4eae
......@@ -42,6 +42,10 @@ int mlx4_en_timestamp_config(struct net_device *dev, int tx_type, int rx_filter)
int port_up = 0;
int err = 0;
if (priv->hwtstamp_config.tx_type == tx_type &&
priv->hwtstamp_config.rx_filter == rx_filter)
return 0;
mutex_lock(&mdev->state_lock);
if (priv->port_up) {
port_up = 1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册