|
@@ -1375,12 +1375,13 @@ static void mlx4_en_do_get_stats(struct work_struct *work)
|
|
|
|
|
|
mutex_lock(&mdev->state_lock);
|
|
|
if (mdev->device_up) {
|
|
|
- err = mlx4_en_DUMP_ETH_STATS(mdev, priv->port, 0);
|
|
|
- if (err)
|
|
|
- en_dbg(HW, priv, "Could not update stats\n");
|
|
|
+ if (priv->port_up) {
|
|
|
+ err = mlx4_en_DUMP_ETH_STATS(mdev, priv->port, 0);
|
|
|
+ if (err)
|
|
|
+ en_dbg(HW, priv, "Could not update stats\n");
|
|
|
|
|
|
- if (priv->port_up)
|
|
|
mlx4_en_auto_moderation(priv);
|
|
|
+ }
|
|
|
|
|
|
queue_delayed_work(mdev->workqueue, &priv->stats_task, STATS_DELAY);
|
|
|
}
|