diff options
author | Roland Dreier <rolandd@cisco.com> | 2011-01-12 12:50:36 -0500 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2011-01-12 12:50:36 -0500 |
commit | 4979d18fe105297f8f065743f31f8f735da8df2d (patch) | |
tree | 36776f85b2bee47c5a671db498939305589d23aa /drivers/infiniband | |
parent | 4162cf64973df51fc885825bc9ca4d055891c49f (diff) |
mlx4_{core, ib, en}: Fix driver when sizeof (phys_addr_t) > sizeof (long)
Some systems have PCI addresses that don't fit in unsigned long (eg some
32-bit PowerPC 440 systems have 36-bit bus addresses). Fix up mlx4 drivers
by using phys_addr_t where appropriate, so we don't truncate any PCI
resource addresses before ioremapping them.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband')
-rw-r--r-- | drivers/infiniband/hw/mlx4/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index 4c85224aeaa7..d68d849ab866 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c | |||
@@ -1005,7 +1005,8 @@ static void *mlx4_ib_add(struct mlx4_dev *dev) | |||
1005 | if (mlx4_uar_alloc(dev, &ibdev->priv_uar)) | 1005 | if (mlx4_uar_alloc(dev, &ibdev->priv_uar)) |
1006 | goto err_pd; | 1006 | goto err_pd; |
1007 | 1007 | ||
1008 | ibdev->uar_map = ioremap(ibdev->priv_uar.pfn << PAGE_SHIFT, PAGE_SIZE); | 1008 | ibdev->uar_map = ioremap((phys_addr_t) ibdev->priv_uar.pfn << PAGE_SHIFT, |
1009 | PAGE_SIZE); | ||
1009 | if (!ibdev->uar_map) | 1010 | if (!ibdev->uar_map) |
1010 | goto err_uar; | 1011 | goto err_uar; |
1011 | MLX4_INIT_DOORBELL_LOCK(&ibdev->uar_lock); | 1012 | MLX4_INIT_DOORBELL_LOCK(&ibdev->uar_lock); |