Skip to contentSkip to conversation

net/mlx4_en: fix a condition

PATCH Applied Dan Carpenter 3 participants 3 messages Feb 3, 2017 – Feb 6, 2017

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

PATCH 1/1 net/mlx4_en: fix a condition

There is a "||" vs "|" typo here so we test 0x1 instead of 0x6.

Fixes 1f8176f7352a ("net/mlx4_en: Check the enabling pptx/pprx flags in SET_PORT wrapper flow")
drivers/net/ethernet/mellanox/mlx4/port.c +1 -1
index 5053c949148f..4e36e287d605 100644
@@ -1395,7 +1395,7 @@ static int mlx4_common_set_port(struct mlx4_dev *dev, int slave, u32 in_mod,
 							  gen_context);
 
 			if (gen_context->flags &
-			    (MLX4_FLAG_V_PPRX_MASK || MLX4_FLAG_V_PPTX_MASK))
+			    (MLX4_FLAG_V_PPRX_MASK | MLX4_FLAG_V_PPTX_MASK))
 				mlx4_en_set_port_global_pause(dev, slave,
 							      gen_context);
 
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · Dan Carpenter

There is a "||" vs "|" typo here so we test 0x1 instead of 0x6.

Fixes 1f8176f7352a ("net/mlx4_en: Check the enabling pptx/pprx flags in SET_PORT wrapper flow")
drivers/net/ethernet/mellanox/mlx4/port.c +1 -2
index 5053c949148f..4e36e287d605 100644
@@ -1395,7 +1395,7 @@ static int mlx4_common_set_port(struct mlx4_dev *dev, int slave, u32 in_mod,
  							  gen_context);
 
  			if (gen_context->flags &
-			    (MLX4_FLAG_V_PPRX_MASK || MLX4_FLAG_V_PPTX_MASK))
+			    (MLX4_FLAG_V_PPRX_MASK | MLX4_FLAG_V_PPTX_MASK))
  				mlx4_en_set_port_global_pause(dev, slave,
  							      gen_context);
 
--
Quoted 3 lines

To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

Thanks Dan.