All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch "net/mlx5e: Disable netdev after close" has been added to the 4.9-stable tree
@ 2017-01-12 20:38 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-12 20:38 UTC (permalink / raw)
  To: saeedm, davem, gregkh, mohamad; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    net/mlx5e: Disable netdev after close

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-mlx5e-disable-netdev-after-close.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From foo@baz Thu Jan 12 21:37:26 CET 2017
From: Saeed Mahameed <saeedm@mellanox.com>
Date: Wed, 28 Dec 2016 14:58:42 +0200
Subject: net/mlx5e: Disable netdev after close

From: Saeed Mahameed <saeedm@mellanox.com>


[ Upstream commit 37f304d10030bb425c19099e7b955d9c3ec4cba3 ]

Disable netdev should come after it was closed, although no harm of doing it
before -hence the MLX5E_STATE_DESTROYING bit- but it is more natural this way.

Fixes: 26e59d8077a3 ("net/mlx5e: Implement mlx5e interface attach/detach callbacks")
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Reviewed-by: Mohamad Haj Yahia <mohamad@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_main.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -3942,10 +3942,6 @@ void mlx5e_detach_netdev(struct mlx5_cor
 	const struct mlx5e_profile *profile = priv->profile;
 
 	set_bit(MLX5E_STATE_DESTROYING, &priv->state);
-	if (profile->disable)
-		profile->disable(priv);
-
-	flush_workqueue(priv->wq);
 
 	rtnl_lock();
 	if (netif_running(netdev))
@@ -3953,6 +3949,10 @@ void mlx5e_detach_netdev(struct mlx5_cor
 	netif_device_detach(netdev);
 	rtnl_unlock();
 
+	if (profile->disable)
+		profile->disable(priv);
+	flush_workqueue(priv->wq);
+
 	mlx5e_destroy_q_counter(priv);
 	profile->cleanup_rx(priv);
 	mlx5e_close_drop_rq(priv);


Patches currently in stable-queue which might be from saeedm@mellanox.com are

queue-4.9/net-mlx5e-don-t-sync-netdev-state-when-not-registered.patch
queue-4.9/net-mlx5-mask-destination-mac-value-in-ethtool-steering-rules.patch
queue-4.9/net-mlx5-check-fw-limitations-on-log_max_qp-before-setting-it.patch
queue-4.9/net-mlx5-avoid-shadowing-numa_node.patch
queue-4.9/net-mlx5e-disable-netdev-after-close.patch
queue-4.9/net-mlx5e-remove-warn_once-from-adaptive-moderation-code.patch
queue-4.9/net-mlx5-prevent-setting-multicast-macs-for-vfs.patch
queue-4.9/net-mlx5-cancel-recovery-work-in-remove-flow.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-12 20:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-12 20:38 Patch "net/mlx5e: Disable netdev after close" has been added to the 4.9-stable tree gregkh

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.