@@ -883,26 +883,11 @@ static int mlx4_setup_hca(struct mlx4_dev *dev)
return err;
}
- err = mlx4_uar_alloc(dev, &priv->driver_uar);
- if (err) {
- mlx4_err(dev, "Failed to allocate driver access region, "
- "aborting.\n");
- goto err_uar_table_free;
- }
-
- priv->kar = ioremap(priv->driver_uar.pfn << PAGE_SHIFT, PAGE_SIZE);
- if (!priv->kar) {
- mlx4_err(dev, "Couldn't map kernel access region, "
- "aborting.\n");
- err = -ENOMEM;
- goto err_uar_free;
- }
-
err = mlx4_init_pd_table(dev);
if (err) {
mlx4_err(dev, "Failed to initialize "
"protection domain table, aborting.\n");
- goto err_kar_unmap;
+ goto err_uar_table_free;
}
err = mlx4_init_mr_table(dev);
@@ -1015,12 +1000,6 @@ err_mr_table_free:
err_pd_table_free:
mlx4_cleanup_pd_table(dev);
-err_kar_unmap:
- iounmap(priv->kar);
-
-err_uar_free:
- mlx4_uar_free(dev, &priv->driver_uar);
-
err_uar_table_free:
mlx4_cleanup_uar_table(dev);
return err;
@@ -1316,8 +1295,6 @@ static void mlx4_remove_one(struct pci_dev *pdev)
mlx4_cleanup_mr_table(dev);
mlx4_cleanup_pd_table(dev);
- iounmap(priv->kar);
- mlx4_uar_free(dev, &priv->driver_uar);
mlx4_cleanup_uar_table(dev);
mlx4_free_eq_table(dev);
mlx4_close_hca(dev);
@@ -401,8 +401,6 @@ struct mlx4_priv {
void __iomem *clr_base;
- struct mlx4_uar driver_uar;
- void __iomem *kar;
struct mlx4_port_info port[MLX4_MAX_PORTS + 1];
struct mlx4_sense sense;
struct mutex port_mutex;