net/mlx4_en: Avoid unregister_netdev at shutdown flow
This allows a clean shutdown, even if some netdev clients do not
release their reference from this netdev. It is enough to release
the HW resources only as the kernel is shutting down.
Fixes: 2ba5fbd62b
('net/mlx4_core: Handle AER flow properly')
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
93c098af09
commit
9d76931180
@@ -4135,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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user