diff options
author | hselasky <hselasky@FreeBSD.org> | 2017-06-04 08:47:09 +0000 |
---|---|---|
committer | hselasky <hselasky@FreeBSD.org> | 2017-06-04 08:47:09 +0000 |
commit | 9779bfdbb17159be52de128b9016acd6591805d3 (patch) | |
tree | 34aca820bdd3e053e7a49d27dacaa2b9b41c839a /sys | |
parent | 2f73d82b328db261c2a098a3b6c32db40476d5cc (diff) | |
download | FreeBSD-src-9779bfdbb17159be52de128b9016acd6591805d3.zip FreeBSD-src-9779bfdbb17159be52de128b9016acd6591805d3.tar.gz |
MFC r319413:
Free hardware queue resource after port is stopped in the mlx4en(4)
driver. Else if the port is up the resource might still be busy and
the MTT free will fail.
PR: 216493
Sponsored by: Mellanox Technologies
Diffstat (limited to 'sys')
-rw-r--r-- | sys/ofed/drivers/net/mlx4/en_netdev.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/ofed/drivers/net/mlx4/en_netdev.c b/sys/ofed/drivers/net/mlx4/en_netdev.c index 6ec5528..606d2b1 100644 --- a/sys/ofed/drivers/net/mlx4/en_netdev.c +++ b/sys/ofed/drivers/net/mlx4/en_netdev.c @@ -1732,13 +1732,12 @@ void mlx4_en_destroy_netdev(struct net_device *dev) mutex_unlock(&mdev->state_lock); } - if (priv->allocated) - mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); - mutex_lock(&mdev->state_lock); mlx4_en_stop_port(dev); mutex_unlock(&mdev->state_lock); + if (priv->allocated) + mlx4_free_hwq_res(mdev->dev, &priv->res, MLX4_EN_PAGE_SIZE); cancel_delayed_work(&priv->stats_task); cancel_delayed_work(&priv->service_task); |