Patchwork [net] mlx4_core: fix bug in modify_cq wrapper for resize flow.

login
register
mail settings
Submitter Yevgeny Petrilin
Date March 7, 2012, 3:56 p.m.
Message ID <4F578533.3090405@mellanox.co.il>
Download mbox | patch
Permalink /patch/145312/
State Accepted
Delegated to: David Miller
Headers show

Comments

Yevgeny Petrilin - March 7, 2012, 3:56 p.m.
From: Jack Morgenstein <jackm@dev.mellanox.co.il>

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.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
---
 .../net/ethernet/mellanox/mlx4/resource_tracker.c  |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)
David Miller - March 8, 2012, 8:28 a.m.
From: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Date: Wed, 7 Mar 2012 17:56:35 +0200

> From: Jack Morgenstein <jackm@dev.mellanox.co.il>
> 
> 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.
> 
> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>

Applied.
--
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

Patch

diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index bfdb7af..8752e6e 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -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);