Skip to content

Commit bd2177d

Browse files
Marcel ApfelbaumMukesh Kacker
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]>
1 parent d72da15 commit bd2177d

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
@@ -210,8 +210,11 @@ int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift,
210210
++mtt->order;
211211

212212
mtt->offset = mlx4_alloc_mtt_range(dev, mtt->order);
213-
if (mtt->offset == -1)
213+
if (mtt->offset == -1) {
214+
mlx4_err(dev, "Failed to allocate mtts for %d pages(order %d)\n",
215+
npages, mtt->order);
214216
return -ENOMEM;
217+
}
215218

216219
return 0;
217220
}

0 commit comments

Comments
 (0)