svn commit: r319568 - stable/9/sys/ofed/drivers/net/mlx4

Hans Petter Selasky hselasky at FreeBSD.org
Sun Jun 4 08:48:28 UTC 2017


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);


More information about the svn-src-stable-9 mailing list