]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Merge https://git.kernel.org/pub/scm/linux/kernel/git/davem/net
authorDavid S. Miller <davem@davemloft.net>
Mon, 3 Jul 2017 10:42:10 +0000 (03:42 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 3 Jul 2017 10:42:10 +0000 (03:42 -0700)
Some overlapping changes in the mlx5 driver.

A merge conflict resolution posted by Stephen Rothwell was used as a
guide.

Signed-off-by: David S. Miller <davem@davemloft.net>
1  2 
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/health.c
drivers/net/ethernet/mellanox/mlx5/core/main.c
include/linux/mlx5/driver.h

index 0648a659b21da281f5661d633e0cba9e09e5a6c6,8a8b5f0e497cf45382e02d434429772d7c277a32..4b6b03d6297f9884412c2ee9768edd0462c34fd3
@@@ -193,8 -193,8 +194,8 @@@ static void health_care(struct work_str
        mlx5_core_warn(dev, "handling bad device here\n");
        mlx5_handle_bad_state(dev);
  
 -      spin_lock(&health->wq_lock);
 +      spin_lock_irqsave(&health->wq_lock, flags);
-       if (!test_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags))
+       if (!test_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags))
                schedule_delayed_work(&health->recover_work, recover_delay);
        else
                dev_err(&dev->pdev->dev,
@@@ -341,11 -334,11 +343,12 @@@ void mlx5_stop_health_poll(struct mlx5_
  void mlx5_drain_health_wq(struct mlx5_core_dev *dev)
  {
        struct mlx5_core_health *health = &dev->priv.health;
 +      unsigned long flags;
  
 -      spin_lock(&health->wq_lock);
 +      spin_lock_irqsave(&health->wq_lock, flags);
        set_bit(MLX5_DROP_NEW_HEALTH_WORK, &health->flags);
 -      spin_unlock(&health->wq_lock);
+       set_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags);
 +      spin_unlock_irqrestore(&health->wq_lock, flags);
        cancel_delayed_work_sync(&health->recover_work);
        cancel_work_sync(&health->work);
  }
index 2ab4ae3e3a1abb73d88b9bb3d78ce21359e1c793,ba260330ce5e6c921e28c41d6789a4ae69c249d3..df6ce59a1f954257cdef95a7733736e42c8b9491
@@@ -945,7 -925,7 +945,8 @@@ int mlx5_health_init(struct mlx5_core_d
  void mlx5_start_health_poll(struct mlx5_core_dev *dev);
  void mlx5_stop_health_poll(struct mlx5_core_dev *dev);
  void mlx5_drain_health_wq(struct mlx5_core_dev *dev);
 +void mlx5_trigger_health_work(struct mlx5_core_dev *dev);
+ void mlx5_drain_health_recovery(struct mlx5_core_dev *dev);
  int mlx5_buf_alloc_node(struct mlx5_core_dev *dev, int size,
                        struct mlx5_buf *buf, int node);
  int mlx5_buf_alloc(struct mlx5_core_dev *dev, int size, struct mlx5_buf *buf);