Date: Tue, 3 Apr 2018 09:30:41 +0000 (UTC) From: Hans Petter Selasky <hselasky@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r331917 - stable/11/sys/dev/mlx5/mlx5_core Message-ID: <201804030930.w339UfbJ044543@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: hselasky Date: Tue Apr 3 09:30:40 2018 New Revision: 331917 URL: https://svnweb.freebsd.org/changeset/base/331917 Log: MFC r331824: Make sure Giant is locked when allocating bus resources in mlx5core. During health care IRQ resources will be reallocated. Newbus requires that Giant is locked before accessing these resources. Sponsored by: Mellanox Technologies Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Directory Properties: stable/11/ (props changed) Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c ============================================================================== --- stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Apr 3 09:29:26 2018 (r331916) +++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_health.c Tue Apr 3 09:30:40 2018 (r331917) @@ -300,6 +300,8 @@ static void health_recover(struct work_struct *work) priv = container_of(health, struct mlx5_priv, health); dev = container_of(priv, struct mlx5_core_dev, priv); + mtx_lock(&Giant); /* XXX newbus needs this */ + if (sensor_pci_no_comm(dev)) { dev_err(&dev->pdev->dev, "health recovery flow aborted, PCI reads still not working\n"); recover = false; @@ -322,6 +324,8 @@ static void health_recover(struct work_struct *work) dev_err(&dev->pdev->dev, "starting health recovery flow\n"); mlx5_recover_device(dev); } + + mtx_unlock(&Giant); } /* How much time to wait until health resetting the driver (in msecs) */
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201804030930.w339UfbJ044543>