Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9858d2d1 authored by Yevgeny Petrilin's avatar Yevgeny Petrilin Committed by David S. Miller
Browse files

net/mlx4: Use single completion vector after NOP failure



Fix a crash at the error flow of NOP command which caused the driver to try and use
a completion vector which wasn't allocated.

Signed-off-by: default avatarYevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 5c8e9046
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -1975,6 +1975,8 @@ slave_start:
	if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) &&
	if (err == -EBUSY && (dev->flags & MLX4_FLAG_MSI_X) &&
	    !mlx4_is_mfunc(dev)) {
	    !mlx4_is_mfunc(dev)) {
		dev->flags &= ~MLX4_FLAG_MSI_X;
		dev->flags &= ~MLX4_FLAG_MSI_X;
		dev->caps.num_comp_vectors = 1;
		dev->caps.comp_pool	   = 0;
		pci_disable_msix(pdev);
		pci_disable_msix(pdev);
		err = mlx4_setup_hca(dev);
		err = mlx4_setup_hca(dev);
	}
	}