From: Carol Soto Date: Tue, 2 Jun 2015 21:07:24 +0000 (-0500) Subject: net/mlx4_core: need to call close fw if alloc icm is called twice X-Git-Tag: v4.1.12-92~307^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=f20aae9e78856c5834f1b36ed88ae68c4d473d37;p=users%2Fjedix%2Flinux-maple.git net/mlx4_core: need to call close fw if alloc icm is called twice If mlx4_enable_sriov is called by adapter without this feature MLX4_DEV_CAP_FLAG2_SYS_EQS then during this path the function alloc icm is called twice without freeing the structures from the first time. Acked-by: Or Gerlitz Signed-off-by: Carol L Soto Signed-off-by: David S. Miller (cherry picked from commit ed3d2276ef72be23c6367358d80004130d8c797d) Orabug: 21606315 Acked-by: Mukesh Kacker Signed-off-by: Yuval Shaia --- diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index 2bc9efb4f5580..b0a8f8b5f7683 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c @@ -3058,6 +3058,7 @@ slave_start: existing_vfs, reset_flow); + mlx4_close_fw(dev); mlx4_cmd_cleanup(dev, MLX4_CMD_CLEANUP_ALL); dev->flags = dev_flags; if (!SRIOV_VALID_STATE(dev->flags)) {