Skip to contentSkip to conversation

mlx4_core: fix bug in modify_cq wrapper for resize flow.

PATCH Applied Yevgeny Petrilin 2 participants 2 messages Mar 7, 2012 – Mar 8, 2012

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

PATCH 1/1 mlx4_core: fix bug in modify_cq wrapper for resize flow.

From: Jack Morgenstein <[email protected]>

The actual FW command is called in procedure "handle_resize". Code incorrectly invoked the FW command again (in good flow), in the modify_cq wrapper function.

Fix by skipping second FW invocation unconditionally for resize.

---
 .../net/ethernet/mellanox/mlx4/resource_tracker.c  |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c +1 -2
index bfdb7af..8752e6e 100644
@@ -2255,8 +2255,7 @@ int mlx4_MODIFY_CQ_wrapper(struct mlx4_dev *dev, int slave,
 
 	if (vhcr->op_modifier == 0) {
 		err = handle_resize(dev, slave, vhcr, inbox, outbox, cmd, cq);
-		if (err)
-			goto ex_put;
+		goto ex_put;
 	}
 
 	err = mlx4_DMA_wrapper(dev, slave, vhcr, inbox, outbox, cmd);
Signature · 1 line
1.7.7
maintainer Applied
#1 lore raw

From: Yevgeny Petrilin <[email protected]>
Date: Wed, 7 Mar 2012 17:56:35 +0200

Quoted 9 lines

From: Jack Morgenstein <[email protected]>

The actual FW command is called in procedure "handle_resize". Code incorrectly invoked the FW command again (in good flow), in the modify_cq wrapper function.

Fix by skipping second FW invocation unconditionally for resize.

Applied.