diff options
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/main.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/main.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/main.c b/drivers/net/ethernet/mellanox/mlx4/main.c index e1bafffbc3b1..a6542d75374c 100644 --- a/drivers/net/ethernet/mellanox/mlx4/main.c +++ b/drivers/net/ethernet/mellanox/mlx4/main.c | |||
@@ -1790,15 +1790,8 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev) | |||
1790 | int i; | 1790 | int i; |
1791 | 1791 | ||
1792 | if (msi_x) { | 1792 | if (msi_x) { |
1793 | /* In multifunction mode each function gets 2 msi-X vectors | 1793 | nreq = min_t(int, dev->caps.num_eqs - dev->caps.reserved_eqs, |
1794 | * one for data path completions anf the other for asynch events | 1794 | nreq); |
1795 | * or command completions */ | ||
1796 | if (mlx4_is_mfunc(dev)) { | ||
1797 | nreq = 2; | ||
1798 | } else { | ||
1799 | nreq = min_t(int, dev->caps.num_eqs - | ||
1800 | dev->caps.reserved_eqs, nreq); | ||
1801 | } | ||
1802 | 1795 | ||
1803 | entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL); | 1796 | entries = kcalloc(nreq, sizeof *entries, GFP_KERNEL); |
1804 | if (!entries) | 1797 | if (!entries) |