diff mbox

[net] mlx4_core: remove buggy sched_queue masking

Message ID 4F54D3C1.8000902@mellanox.co.il
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Yevgeny Petrilin March 5, 2012, 2:54 p.m. UTC
From: Amir Vadai <amirv@mellanox.co.il>

Fixes a bug introduced by commit fe9a2603c, where the priority bits
in the schedule queue field were masked out.

Signed-off-by: Amir Vadai <amirv@mellanox.co.il>
---
 drivers/net/ethernet/mellanox/mlx4/qp.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

Comments

Roland Dreier March 5, 2012, 8:46 p.m. UTC | #1
>        port = ((context->pri_path.sched_queue >> 6) & 1) + 1;

This assignment of port seems to become dead code now...

> -       if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
> -               context->pri_path.sched_queue = (context->pri_path.sched_queue &
> -                                               0xc3);
>
>        *(__be32 *) mailbox->buf = cpu_to_be32(optpar);
>        memcpy(mailbox->buf + 8, context, sizeof *context);
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Or Gerlitz March 5, 2012, 8:52 p.m. UTC | #2
Roland Dreier <roland@purestorage.com> wrote:

>>        port = ((context->pri_path.sched_queue >> 6) & 1) + 1;

> This assignment of port seems to become dead code now...

good catch, yep, we will do this little cleanup and repost tomorrow,
however to make things clear, the point here was fixing that
regression.

Or.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/qp.c b/drivers/net/ethernet/mellanox/mlx4/qp.c
index 738f950..48ca886 100644
--- a/drivers/net/ethernet/mellanox/mlx4/qp.c
+++ b/drivers/net/ethernet/mellanox/mlx4/qp.c
@@ -152,9 +152,6 @@  static int __mlx4_qp_modify(struct mlx4_dev *dev, struct mlx4_mtt *mtt,
 	}
 
 	port = ((context->pri_path.sched_queue >> 6) & 1) + 1;
-	if (dev->caps.port_type[port] == MLX4_PORT_TYPE_ETH)
-		context->pri_path.sched_queue = (context->pri_path.sched_queue &
-						0xc3);
 
 	*(__be32 *) mailbox->buf = cpu_to_be32(optpar);
 	memcpy(mailbox->buf + 8, context, sizeof *context);