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
This commit is contained in:
Hans Petter Selasky 2017-11-10 14:02:12 +00:00
parent f6923226eb
commit b35a986d25
2 changed files with 3 additions and 2 deletions

View File

@ -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,

View File

@ -716,8 +716,8 @@ static int mlx5_dev_init(struct mlx5_core_dev *dev, struct pci_dev *pdev)
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");