All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org, Daniel Jurgens <danielj@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [PATCH net 03/12] net/mlx5: Cancel recovery work in remove flow
Date: Wed, 28 Dec 2016 14:58:33 +0200	[thread overview]
Message-ID: <1482929922-32626-4-git-send-email-saeedm@mellanox.com> (raw)
In-Reply-To: <1482929922-32626-1-git-send-email-saeedm@mellanox.com>

From: Daniel Jurgens <danielj@mellanox.com>

If there is pending delayed work for health recovery it must be canceled
if the device is being unloaded.

Fixes: 05ac2c0b7438 ("net/mlx5: Fix race between PCI error handlers and health work")
Signed-off-by: Daniel Jurgens <danielj@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/main.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/main.c b/drivers/net/ethernet/mellanox/mlx5/core/main.c
index 23c12f1..0b49739 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/main.c
@@ -1196,6 +1196,8 @@ static int mlx5_unload_one(struct mlx5_core_dev *dev, struct mlx5_priv *priv,
 {
 	int err = 0;
 
+	mlx5_drain_health_wq(dev);
+
 	mutex_lock(&dev->intf_state_mutex);
 	if (test_bit(MLX5_INTERFACE_STATE_DOWN, &dev->intf_state)) {
 		dev_warn(&dev->pdev->dev, "%s: interface is down, NOP\n",
@@ -1358,10 +1360,9 @@ static pci_ers_result_t mlx5_pci_err_detected(struct pci_dev *pdev,
 
 	mlx5_enter_error_state(dev);
 	mlx5_unload_one(dev, priv, false);
-	/* In case of kernel call save the pci state and drain health wq */
+	/* In case of kernel call save the pci state */
 	if (state) {
 		pci_save_state(pdev);
-		mlx5_drain_health_wq(dev);
 		mlx5_pci_disable_device(dev);
 	}
 
-- 
2.7.4

  parent reply	other threads:[~2016-12-28 12:58 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-28 12:58 [PATCH net 00/12] Mellanox 100G mlx5 fixes 28-12-2016 Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 01/12] net/mlx5: Disable RoCE on the e-switch management port under switchdev mode Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 02/12] net/mlx5: Check FW limitations on log_max_qp before setting it Saeed Mahameed
2016-12-28 12:58 ` Saeed Mahameed [this message]
2016-12-28 12:58 ` [PATCH net 04/12] net/mlx5: Avoid shadowing numa_node Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 05/12] net/mlx5: Mask destination mac value in ethtool steering rules Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 06/12] net/mlx5: Release FTE lock in error flow Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 07/12] net/mlx5: Prevent setting multicast macs for VFs Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 08/12] Revert "net/mlx5e: Expose PCIe statistics to ethtool" Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 09/12] Revert "net/mlx5: Add MPCNT register infrastructure" Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 10/12] net/mlx5e: Check ets capability before initializing ets settings Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 11/12] net/mlx5e: Don't sync netdev state when not registered Saeed Mahameed
2016-12-28 12:58 ` [PATCH net 12/12] net/mlx5e: Disable netdev after close Saeed Mahameed
2016-12-28 19:38 ` [PATCH net 00/12] Mellanox 100G mlx5 fixes 28-12-2016 David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1482929922-32626-4-git-send-email-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=danielj@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.