Skip to content

Commit 401453a

Browse files
Jack Morgensteindavem330
authored andcommitted
net/mlx4_core: Fix obscure mlx4_cmd_box parameter in QUERY_DEV_CAP
The "!mlx4_is_slave" is totally confusing. Fix with constant MLX4_CMD_NATIVE, which is the intended behavior. Signed-off-by: Jack Morgenstein <[email protected]> Reviewed-by: Or Gerlitz <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 6230bb2 commit 401453a

File tree

1 file changed

+2
-3
lines changed
  • drivers/net/ethernet/mellanox/mlx4

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
412412
outbox = mailbox->buf;
413413

414414
err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_DEV_CAP,
415-
MLX4_CMD_TIME_CLASS_A, !mlx4_is_slave(dev));
415+
MLX4_CMD_TIME_CLASS_A, MLX4_CMD_NATIVE);
416416
if (err)
417417
goto out;
418418

@@ -590,8 +590,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap)
590590

591591
for (i = 1; i <= dev_cap->num_ports; ++i) {
592592
err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT,
593-
MLX4_CMD_TIME_CLASS_B,
594-
!mlx4_is_slave(dev));
593+
MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE);
595594
if (err)
596595
goto out;
597596

0 commit comments

Comments
 (0)