aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/mlx4/en_netdev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/mlx4/en_netdev.c')
-rw-r--r--drivers/net/mlx4/en_netdev.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c
index 303c23de6cac..7bcc49de1637 100644
--- a/drivers/net/mlx4/en_netdev.c
+++ b/drivers/net/mlx4/en_netdev.c
@@ -348,11 +348,9 @@ static void mlx4_en_tx_timeout(struct net_device *dev)
348 if (netif_msg_timer(priv)) 348 if (netif_msg_timer(priv))
349 mlx4_warn(mdev, "Tx timeout called on port:%d\n", priv->port); 349 mlx4_warn(mdev, "Tx timeout called on port:%d\n", priv->port);
350 350
351 if (netif_carrier_ok(dev)) { 351 priv->port_stats.tx_timeout++;
352 priv->port_stats.tx_timeout++; 352 mlx4_dbg(DRV, priv, "Scheduling watchdog\n");
353 mlx4_dbg(DRV, priv, "Scheduling watchdog\n"); 353 queue_work(mdev->workqueue, &priv->watchdog_task);
354 queue_work(mdev->workqueue, &priv->watchdog_task);
355 }
356} 354}
357 355
358 356
@@ -585,7 +583,7 @@ int mlx4_en_start_port(struct net_device *dev)
585 err = mlx4_en_activate_cq(priv, cq); 583 err = mlx4_en_activate_cq(priv, cq);
586 if (err) { 584 if (err) {
587 mlx4_err(mdev, "Failed activating Rx CQ\n"); 585 mlx4_err(mdev, "Failed activating Rx CQ\n");
588 goto rx_err; 586 goto cq_err;
589 } 587 }
590 for (j = 0; j < cq->size; j++) 588 for (j = 0; j < cq->size; j++)
591 cq->buf[j].owner_sr_opcode = MLX4_CQE_OWNER_MASK; 589 cq->buf[j].owner_sr_opcode = MLX4_CQE_OWNER_MASK;
@@ -761,9 +759,14 @@ static void mlx4_en_restart(struct work_struct *work)
761 struct net_device *dev = priv->dev; 759 struct net_device *dev = priv->dev;
762 760
763 mlx4_dbg(DRV, priv, "Watchdog task called for port %d\n", priv->port); 761 mlx4_dbg(DRV, priv, "Watchdog task called for port %d\n", priv->port);
764 mlx4_en_stop_port(dev); 762
765 if (mlx4_en_start_port(dev)) 763 mutex_lock(&mdev->state_lock);
766 mlx4_err(mdev, "Failed restarting port %d\n", priv->port); 764 if (priv->port_up) {
765 mlx4_en_stop_port(dev);
766 if (mlx4_en_start_port(dev))
767 mlx4_err(mdev, "Failed restarting port %d\n", priv->port);
768 }
769 mutex_unlock(&mdev->state_lock);
767} 770}
768 771
769 772
@@ -1054,7 +1057,7 @@ int mlx4_en_init_netdev(struct mlx4_en_dev *mdev, int port,
1054 * Set driver features 1057 * Set driver features
1055 */ 1058 */
1056 dev->features |= NETIF_F_SG; 1059 dev->features |= NETIF_F_SG;
1057 dev->features |= NETIF_F_HW_CSUM; 1060 dev->features |= NETIF_F_IP_CSUM | NETIF_F_IPV6_CSUM;
1058 dev->features |= NETIF_F_HIGHDMA; 1061 dev->features |= NETIF_F_HIGHDMA;
1059 dev->features |= NETIF_F_HW_VLAN_TX | 1062 dev->features |= NETIF_F_HW_VLAN_TX |
1060 NETIF_F_HW_VLAN_RX | 1063 NETIF_F_HW_VLAN_RX |