Skip to content

Commit f97b4b5

Browse files
ogerlitzrolandd
authored andcommitted
mlx4_core: Fix advertisement of wrong PF context behaviour
Commit 08ff323 ("mlx4: 64-byte CQE/EQE support") introduced a regression where older guest VF drivers failed to load even when 64-byte EQEs/CQEs are disabled, since the PF wrongly advertises the new context behaviour anyway. The failure looks like: mlx4_core 0000:00:07.0: Unknown pf context behaviour mlx4_core 0000:00:07.0: Failed to obtain slave caps mlx4_core: probe of 0000:00:07.0 failed with error -38 Fix this by basing this advertisement on dev->caps.flags, which is the operational capabilities used by the QUERY_FUNC_CAP command wrapper (dev_cap->flags holds the firmware capabilities). Reported-by: Alex Williamson <alex.williamson@redhat.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
1 parent 949db15 commit f97b4b5

File tree

1 file changed

+1
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+1
-1
lines changed

drivers/net/ethernet/mellanox/mlx4/main.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ static int mlx4_dev_cap(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
380380
}
381381
}
382382

383-
if ((dev_cap->flags &
383+
if ((dev->caps.flags &
384384
(MLX4_DEV_CAP_FLAG_64B_CQE | MLX4_DEV_CAP_FLAG_64B_EQE)) &&
385385
mlx4_is_master(dev))
386386
dev->caps.function_caps |= MLX4_FUNC_CAP_64B_EQE_CQE;

0 commit comments

Comments
 (0)