Skip to content

Commit

Permalink
net/mlx4_core: need to call close fw if alloc icm is called twice
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Carol Soto authored and David S. Miller committed Jun 4, 2015
1 parent 5114a04 commit ed3d227
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/net/ethernet/mellanox/mlx4/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2976,6 +2976,7 @@ static int mlx4_load_one(struct pci_dev *pdev, int pci_dev_data,
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)) {
Expand Down

0 comments on commit ed3d227

Please sign in to comment.