Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Feb 2018 15:16:11 +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: r329212 - in stable/11/sys/dev/mlx5: . mlx5_core
Message-ID:  <201802131516.w1DFGBnb024785@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Tue Feb 13 15:16:10 2018
New Revision: 329212
URL: https://svnweb.freebsd.org/changeset/base/329212

Log:
  MFC r325658:
  Make physical address of init segment available in the priv of mlx5 core.
  This change is needed by mlx5ib(4).
  
  Sponsored by:	Mellanox Technologies

Modified:
  stable/11/sys/dev/mlx5/driver.h
  stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/dev/mlx5/driver.h
==============================================================================
--- stable/11/sys/dev/mlx5/driver.h	Tue Feb 13 15:14:32 2018	(r329211)
+++ stable/11/sys/dev/mlx5/driver.h	Tue Feb 13 15:16:10 2018	(r329212)
@@ -595,6 +595,7 @@ struct mlx5_core_dev {
 	struct mlx5_port_caps	port_caps[MLX5_MAX_PORTS];
 	u32 hca_caps_cur[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
 	u32 hca_caps_max[MLX5_CAP_NUM][MLX5_UN_SZ_DW(hca_cap_union)];
+	phys_addr_t		iseg_base;
 	struct mlx5_init_seg __iomem *iseg;
 	enum mlx5_device_state	state;
 	void			(*event) (struct mlx5_core_dev *dev,

Modified: stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c
==============================================================================
--- stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c	Tue Feb 13 15:14:32 2018	(r329211)
+++ stable/11/sys/dev/mlx5/mlx5_core/mlx5_main.c	Tue Feb 13 15:16:10 2018	(r329212)
@@ -716,8 +716,8 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, st
 		goto err_clr_master;
 	}
 
-	dev->iseg = ioremap(pci_resource_start(dev->pdev, 0),
-			    sizeof(*dev->iseg));
+	dev->iseg_base = pci_resource_start(dev->pdev, 0);
+	dev->iseg = ioremap(dev->iseg_base, sizeof(*dev->iseg));
 	if (!dev->iseg) {
 		err = -ENOMEM;
 		device_printf((&pdev->dev)->bsddev, "ERR: ""Failed mapping initialization segment, aborting\n");



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201802131516.w1DFGBnb024785>