diff options
author | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 20:34:01 +0300 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2016-08-01 20:34:01 +0300 |
commit | 9454c23852ca6d7aec89fd6fd46a046c323caac3 (patch) | |
tree | 794be65345027b5adea3720a43124fee338333a5 /drivers/net/ethernet/mellanox/mlx4/main.c | |
parent | a04bee8285a71cdbb9076c3dc38be1f0b9a6b4b3 (diff) | |
parent | 4ef33685aa0957d771e068b60a5f3ca6b47ade1c (diff) | |
download | linux-9454c23852ca6d7aec89fd6fd46a046c323caac3.tar.xz |
Merge branch 'pci/msi-affinity' into next
Conflicts:
drivers/nvme/host/pci.c
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 12c77a70abdb..546fab0ecc3b 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3222,6 +3222,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data, INIT_LIST_HEAD(&priv->pgdir_list); mutex_init(&priv->pgdir_mutex); + spin_lock_init(&priv->cmd.context_lock); INIT_LIST_HEAD(&priv->bf_list); mutex_init(&priv->bf_mutex); @@ -4134,8 +4135,11 @@ static void mlx4_shutdown(struct pci_dev *pdev) mlx4_info(persist->dev, "mlx4_shutdown was called\n"); mutex_lock(&persist->interface_state_mutex); - if (persist->interface_state & MLX4_INTERFACE_STATE_UP) + if (persist->interface_state & MLX4_INTERFACE_STATE_UP) { + /* Notify mlx4 clients that the kernel is being shut down */ + persist->interface_state |= MLX4_INTERFACE_STATE_SHUTDOWN; mlx4_unload_one(pdev); + } mutex_unlock(&persist->interface_state_mutex); } |