Skip to content

Commit bcdd823

Browse files
Marcel ApfelbaumSomasundaram Krishnasamy
authored andcommitted
mlx4_core: Error message on mtt allocation failure
Add error message if mlx4_mtt_init fails to allocate mtts. Signed-off-by: Marcel Apfelbaum <[email protected]> Reviewed-by: Jack Morgenstein <[email protected]> Signed-off-by: Vladimir Sokolovsky <[email protected]> (Ported from Mellanox OFED 2.4) Signed-off-by: Mukesh Kacker <[email protected]> Orabug: 27510506 (cherry picked from commit bd2177d) cherry-pick-repo=linux-uek.git Signed-off-by: Qing Huang <[email protected]> Signed-off-by: Aron Silverton <[email protected]> Signed-off-by: Somasundaram Krishnasamy <[email protected]>
1 parent 8eab8ba commit bcdd823

File tree

1 file changed

+4
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+4
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/mr.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,11 @@ int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift,
207207
++mtt->order;
208208

209209
mtt->offset = mlx4_alloc_mtt_range(dev, mtt->order);
210-
if (mtt->offset == -1)
210+
if (mtt->offset == -1) {
211+
mlx4_err(dev, "Failed to allocate mtts for %d pages(order %d)\n",
212+
npages, mtt->order);
211213
return -ENOMEM;
214+
}
212215

213216
return 0;
214217
}

0 commit comments

Comments
 (0)