]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
mlx4_core: Error message on mtt allocation failure
authorMarcel Apfelbaum <marcela@dev.mellanox.co.il>
Mon, 19 Mar 2012 12:50:08 +0000 (14:50 +0200)
committerMukesh Kacker <mukesh.kacker@oracle.com>
Tue, 7 Jul 2015 21:38:09 +0000 (14:38 -0700)
Add error message if mlx4_mtt_init fails to allocate mtts.

Signed-off-by: Marcel Apfelbaum <marcela@dev.mellanox.co.il>
Reviewed-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
(Ported from Mellanox OFED 2.4)

Signed-off-by: Mukesh Kacker <mukesh.kacker@oracle.com>
drivers/net/ethernet/mellanox/mlx4/mr.c

index 78f51e103880d4dcae7745ec5cb5b2425e370e73..c8dc251ea569341985d00fcb11d440238ea289b2 100644 (file)
@@ -210,8 +210,11 @@ int mlx4_mtt_init(struct mlx4_dev *dev, int npages, int page_shift,
                ++mtt->order;
 
        mtt->offset = mlx4_alloc_mtt_range(dev, mtt->order);
-       if (mtt->offset == -1)
+       if (mtt->offset == -1) {
+               mlx4_err(dev, "Failed to allocate mtts for %d pages(order %d)\n",
+                        npages, mtt->order);
                return -ENOMEM;
+       }
 
        return 0;
 }