Commit 2b972acb authored by David S. Miller's avatar David S. Miller

Merge branch 'mlx4-net'

Or Gerlitz says:

====================
mlx4 driver fixes for 3.19-rc2

Please push Maor's patch to -stable >= 3.17

Jack's fixes error-flow issues introduced in 3.19-rc1, no need for -stable.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 7824acd9 d0d01250
...@@ -1829,7 +1829,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) ...@@ -1829,7 +1829,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
err = mlx4_dev_cap(dev, &dev_cap); err = mlx4_dev_cap(dev, &dev_cap);
if (err) { if (err) {
mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting\n"); mlx4_err(dev, "QUERY_DEV_CAP command failed, aborting\n");
goto err_stop_fw; return err;
} }
choose_steering_mode(dev, &dev_cap); choose_steering_mode(dev, &dev_cap);
...@@ -1860,7 +1860,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) ...@@ -1860,7 +1860,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
&init_hca); &init_hca);
if ((long long) icm_size < 0) { if ((long long) icm_size < 0) {
err = icm_size; err = icm_size;
goto err_stop_fw; return err;
} }
dev->caps.max_fmr_maps = (1 << (32 - ilog2(dev->caps.num_mpts))) - 1; dev->caps.max_fmr_maps = (1 << (32 - ilog2(dev->caps.num_mpts))) - 1;
...@@ -1874,7 +1874,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) ...@@ -1874,7 +1874,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
err = mlx4_init_icm(dev, &dev_cap, &init_hca, icm_size); err = mlx4_init_icm(dev, &dev_cap, &init_hca, icm_size);
if (err) if (err)
goto err_stop_fw; return err;
err = mlx4_INIT_HCA(dev, &init_hca); err = mlx4_INIT_HCA(dev, &init_hca);
if (err) { if (err) {
...@@ -1886,7 +1886,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev) ...@@ -1886,7 +1886,7 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
err = mlx4_query_func(dev, &dev_cap); err = mlx4_query_func(dev, &dev_cap);
if (err < 0) { if (err < 0) {
mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n"); mlx4_err(dev, "QUERY_FUNC command failed, aborting.\n");
goto err_stop_fw; goto err_close;
} else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) { } else if (err & MLX4_QUERY_FUNC_NUM_SYS_EQS) {
dev->caps.num_eqs = dev_cap.max_eqs; dev->caps.num_eqs = dev_cap.max_eqs;
dev->caps.reserved_eqs = dev_cap.reserved_eqs; dev->caps.reserved_eqs = dev_cap.reserved_eqs;
...@@ -2006,11 +2006,6 @@ static int mlx4_init_hca(struct mlx4_dev *dev) ...@@ -2006,11 +2006,6 @@ static int mlx4_init_hca(struct mlx4_dev *dev)
if (!mlx4_is_slave(dev)) if (!mlx4_is_slave(dev))
mlx4_free_icms(dev); mlx4_free_icms(dev);
err_stop_fw:
if (!mlx4_is_slave(dev)) {
mlx4_UNMAP_FA(dev);
mlx4_free_icm(dev, priv->fw.fw_icm, 0);
}
return err; return err;
} }
......
...@@ -584,6 +584,7 @@ EXPORT_SYMBOL_GPL(mlx4_mr_free); ...@@ -584,6 +584,7 @@ EXPORT_SYMBOL_GPL(mlx4_mr_free);
void mlx4_mr_rereg_mem_cleanup(struct mlx4_dev *dev, struct mlx4_mr *mr) void mlx4_mr_rereg_mem_cleanup(struct mlx4_dev *dev, struct mlx4_mr *mr)
{ {
mlx4_mtt_cleanup(dev, &mr->mtt); mlx4_mtt_cleanup(dev, &mr->mtt);
mr->mtt.order = -1;
} }
EXPORT_SYMBOL_GPL(mlx4_mr_rereg_mem_cleanup); EXPORT_SYMBOL_GPL(mlx4_mr_rereg_mem_cleanup);
...@@ -593,14 +594,14 @@ int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr, ...@@ -593,14 +594,14 @@ int mlx4_mr_rereg_mem_write(struct mlx4_dev *dev, struct mlx4_mr *mr,
{ {
int err; int err;
mpt_entry->start = cpu_to_be64(iova);
mpt_entry->length = cpu_to_be64(size);
mpt_entry->entity_size = cpu_to_be32(page_shift);
err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt); err = mlx4_mtt_init(dev, npages, page_shift, &mr->mtt);
if (err) if (err)
return err; return err;
mpt_entry->start = cpu_to_be64(mr->iova);
mpt_entry->length = cpu_to_be64(mr->size);
mpt_entry->entity_size = cpu_to_be32(mr->mtt.page_shift);
mpt_entry->pd_flags &= cpu_to_be32(MLX4_MPT_PD_MASK | mpt_entry->pd_flags &= cpu_to_be32(MLX4_MPT_PD_MASK |
MLX4_MPT_PD_FLAG_EN_INV); MLX4_MPT_PD_FLAG_EN_INV);
mpt_entry->flags &= cpu_to_be32(MLX4_MPT_FLAG_FREE | mpt_entry->flags &= cpu_to_be32(MLX4_MPT_FLAG_FREE |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment