]> git.baikalelectronics.ru Git - kernel.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)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Dec 2020 19:18:35 +0000 (11:18 -0800)
commita438629900cc2a38536752dd3bd9585da0b38421
treef1aa66ee6ec8dfe518cd9a29a65059a21ca4e162
parent38bd4da0664b49694403f9c3e67a4a86acb35da0
net/mlx5: Fix wrong address reclaim when command interface is down

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: 514c662c4e95 ("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>
drivers/net/ethernet/mellanox/mlx5/core/pagealloc.c