svn commit: r329212 - in stable/11/sys/dev/mlx5: . mlx5_core

Hans Petter Selasky hselasky at FreeBSD.org
Tue Feb 13 15:16:11 UTC 2018


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


More information about the svn-src-all mailing list