]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net/mlx5: Fix wrong address reclaim when command interface is down
authorEran Ben Elisha <eranbe@nvidia.com>
Thu, 3 Dec 2020 04:39:43 +0000 (20:39 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Dec 2020 09:17:34 +0000 (10:17 +0100)
commit7dc552407c7e8221e22d3128aa0fab71b8ab2f98
treecbd3e4a4012f3dc63405bad5fb4e035b0abdc956
parent025cb3e4610a0dd5a9ed0bd56250c2879bed1619
net/mlx5: Fix wrong address reclaim when command interface is down

[ Upstream commit 1d2bb5ad89f47d8ce8aedc70ef85059ab3870292 ]

When command interface is down, driver to reclaim all 4K page chucks that
were hold by the Firmeware. Fix a bug for 64K page size systems, where
driver repeatedly released only the first chunk of the page.

Define helper function to fill 4K chunks for a given Firmware pages.
Iterate over all unreleased Firmware pages and call the hepler per each.

Fixes: 5adff6a08862 ("net/mlx5: Fix incorrect page count when in internal error")
Signed-off-by: Eran Ben Elisha <eranbe@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c