Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Nov 2017 14:02:12 +0000 (UTC)
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r325658 - in head/sys/dev/mlx5: . mlx5_core
Message-ID:  <201711101402.vAAE2COG017509@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: hselasky
Date: Fri Nov 10 14:02:12 2017
New Revision: 325658
URL: https://svnweb.freebsd.org/changeset/base/325658

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

Modified:
  head/sys/dev/mlx5/driver.h
  head/sys/dev/mlx5/mlx5_core/mlx5_main.c

Modified: head/sys/dev/mlx5/driver.h
==============================================================================
--- head/sys/dev/mlx5/driver.h	Fri Nov 10 13:58:49 2017	(r325657)
+++ head/sys/dev/mlx5/driver.h	Fri Nov 10 14:02:12 2017	(r325658)
@@ -590,6 +590,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: head/sys/dev/mlx5/mlx5_core/mlx5_main.c
==============================================================================
--- head/sys/dev/mlx5/mlx5_core/mlx5_main.c	Fri Nov 10 13:58:49 2017	(r325657)
+++ head/sys/dev/mlx5/mlx5_core/mlx5_main.c	Fri Nov 10 14:02:12 2017	(r325658)
@@ -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?201711101402.vAAE2COG017509>