]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
net/mlx4: Remove BUG_ON from ICM allocation routine
authorLeon Romanovsky <leonro@mellanox.com>
Thu, 29 Dec 2016 16:37:11 +0000 (18:37 +0200)
committerThadeu Lima de Souza Cascardo <cascardo@canonical.com>
Tue, 22 Aug 2017 09:58:05 +0000 (06:58 -0300)
commita3189d3b078d4a4848914706cefba40382b231c0
treef330b871f4e3d18e880ab0d4924d75bf6856fd3a
parent4eee87ab20005225116b42196dd715b3e0714aae
net/mlx4: Remove BUG_ON from ICM allocation routine

BugLink: http://bugs.launchpad.net/bugs/1710646
[ Upstream commit c1d5f8ff80ea84768f5fae1ca9d1abfbb5e6bbaa ]

This patch removes BUG_ON() macro from mlx4_alloc_icm_coherent()
by checking DMA address alignment in advance and performing proper
folding in case of error.

Fixes: 5b0bf5e25efe ("mlx4_core: Support ICM tables in coherent memory")
Reported-by: Ozgur Karatas <okaratas@member.fsf.org>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
drivers/net/ethernet/mellanox/mlx4/icm.c