Author: hselasky
Date: Sun Jun  4 08:48:26 2017
New Revision: 319568
URL: https://svnweb.freebsd.org/changeset/base/319568

Log:
  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

Modified:
  stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c
==============================================================================
--- stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c      Sun Jun  4 08:47:09 
2017        (r319567)
+++ stable/9/sys/ofed/drivers/net/mlx4/en_netdev.c      Sun Jun  4 08:48:26 
2017        (r319568)
@@ -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);
_______________________________________________
svn-src-stable-9@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-stable-9
To unsubscribe, send any mail to "svn-src-stable-9-unsubscr...@freebsd.org"

Reply via email to