From: David S. Miller Date: Mon, 3 Jul 2017 10:42:10 +0000 (-0700) Subject: Merge https://git.kernel.org/pub/scm/linux/kernel/git/davem/net X-Git-Tag: v4.14-rc1~596^2~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a3f7d130eb5c219a1a4b183b92106028747dc85;p=platform%2Fkernel%2Flinux-rpi3.git Merge https://git./linux/kernel/git/davem/net 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 --- 3a3f7d130eb5c219a1a4b183b92106028747dc85 diff --cc drivers/net/ethernet/mellanox/mlx5/core/health.c index 0648a65,8a8b5f0..4b6b03d --- a/drivers/net/ethernet/mellanox/mlx5/core/health.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/health.c @@@ -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); + set_bit(MLX5_DROP_NEW_RECOVERY_WORK, &health->flags); - spin_unlock(&health->wq_lock); + spin_unlock_irqrestore(&health->wq_lock, flags); cancel_delayed_work_sync(&health->recover_work); cancel_work_sync(&health->work); } diff --cc include/linux/mlx5/driver.h index 2ab4ae3,ba26033..df6ce59 --- a/include/linux/mlx5/driver.h +++ b/include/linux/mlx5/driver.h @@@ -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);