mlx5: Do not poke hardware for statistic after teardown is started.
Sponsored by: Mellanox Technologies MFC after: 1 week
This commit is contained in:
parent
9159d4fe20
commit
72af986714
@ -640,7 +640,8 @@ enum mlx5_device_state {
|
||||
};
|
||||
|
||||
enum mlx5_interface_state {
|
||||
MLX5_INTERFACE_STATE_UP,
|
||||
MLX5_INTERFACE_STATE_UP = 0x1,
|
||||
MLX5_INTERFACE_STATE_TEARDOWN = 0x2,
|
||||
};
|
||||
|
||||
enum mlx5_pci_status {
|
||||
|
@ -1606,6 +1606,8 @@ static void shutdown_one(struct pci_dev *pdev)
|
||||
/* enter polling mode */
|
||||
mlx5_cmd_use_polling(dev);
|
||||
|
||||
set_bit(MLX5_INTERFACE_STATE_TEARDOWN, &dev->intf_state);
|
||||
|
||||
/* disable all interrupts */
|
||||
mlx5_disable_interrupts(dev);
|
||||
|
||||
|
@ -1038,9 +1038,10 @@ mlx5e_update_stats_work(struct work_struct *work)
|
||||
{
|
||||
struct mlx5e_priv *priv;
|
||||
|
||||
priv = container_of(work, struct mlx5e_priv, update_stats_work);
|
||||
priv = container_of(work, struct mlx5e_priv, update_stats_work);
|
||||
PRIV_LOCK(priv);
|
||||
if (test_bit(MLX5E_STATE_OPENED, &priv->state) != 0)
|
||||
if (test_bit(MLX5E_STATE_OPENED, &priv->state) != 0 &&
|
||||
!test_bit(MLX5_INTERFACE_STATE_TEARDOWN, &priv->mdev->intf_state))
|
||||
mlx5e_update_stats_locked(priv);
|
||||
PRIV_UNLOCK(priv);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user