diff options
author | Jack Morgenstein <jackm@dev.mellanox.co.il> | 2012-05-30 05:14:55 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-31 18:18:16 -0400 |
commit | 401453a31ea8192eb94f9337f5608de907681bfb (patch) | |
tree | f1f9f61dbd43844562cb244de8790ad22b3ad750 | |
parent | 6230bb234dd17b4c92518e848368ce03f9802323 (diff) |
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 <jackm@dev.mellanox.co.il>
Reviewed-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx4/fw.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx4/fw.c b/drivers/net/ethernet/mellanox/mlx4/fw.c index 7f2a4a659627..9c83bb8151ea 100644 --- a/drivers/net/ethernet/mellanox/mlx4/fw.c +++ b/drivers/net/ethernet/mellanox/mlx4/fw.c | |||
@@ -412,7 +412,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
412 | outbox = mailbox->buf; | 412 | outbox = mailbox->buf; |
413 | 413 | ||
414 | err = mlx4_cmd_box(dev, 0, mailbox->dma, 0, 0, MLX4_CMD_QUERY_DEV_CAP, | 414 | 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); |
416 | if (err) | 416 | if (err) |
417 | goto out; | 417 | goto out; |
418 | 418 | ||
@@ -590,8 +590,7 @@ int mlx4_QUERY_DEV_CAP(struct mlx4_dev *dev, struct mlx4_dev_cap *dev_cap) | |||
590 | 590 | ||
591 | for (i = 1; i <= dev_cap->num_ports; ++i) { | 591 | for (i = 1; i <= dev_cap->num_ports; ++i) { |
592 | err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT, | 592 | err = mlx4_cmd_box(dev, 0, mailbox->dma, i, 0, MLX4_CMD_QUERY_PORT, |
593 | MLX4_CMD_TIME_CLASS_B, | 593 | MLX4_CMD_TIME_CLASS_B, MLX4_CMD_NATIVE); |
594 | !mlx4_is_slave(dev)); | ||
595 | if (err) | 594 | if (err) |
596 | goto out; | 595 | goto out; |
597 | 596 | ||