Browse Source

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 <ogerlitz@mellanox.com>
Signed-off-by: Carol L Soto <clsoto@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Carol Soto 10 years ago
parent
commit
ed3d2276ef
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/net/ethernet/mellanox/mlx4/main.c

+ 1 - 0
drivers/net/ethernet/mellanox/mlx4/main.c

@@ -2976,6 +2976,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)) {