Skip to contentSkip to conversation

mlx4_core: remove buggy sched_queue masking

PATCH In review Yevgeny Petrilin 3 participants 3 messages Mar 5, 2012

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mlx4_core: remove buggy sched_queue masking

From: Amir Vadai <[email protected]>

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

---
 drivers/net/ethernet/mellanox/mlx4/qp.c |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)
drivers/net/ethernet/mellanox/mlx4/qp.c +0 -3
index 738f950..48ca886 100644
@@ -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);
Signature · 1 line
1.7.7
#1 lore raw
Quoted 1 line

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

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

Quoted 6 lines

-       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);

#2 lore raw
Quoted 3 lines · Roland Dreier
Quoted 1 line

       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.