[ofa-general] [PATCH] mlx4/core: increase command timeout for INIT_HCA to 10 seconds

Jack Morgenstein jackm at dev.mellanox.co.il
Sun Oct 21 03:03:01 PDT 2007


Increase the timeout for the INIT_HCA command, to bring it into
line with all the other command timeouts (which are 10 seconds).

Signed-off-by: Jack Morgenstein <jackm at dev.mellanox.co.il>

---
Roland,
The ConnectX PRM (section 19.3.4 -- Init HCA) states:
"Execution time depends on the amount of resources (QPs, CQs, etc) which are allocated and initialized by
the HCA"
The current timeout value of 1 second is sufficient for the resources currently allocated.
However, if more resources are allocated (via module parameters, per my previous patch),
this 1-second timeout will not be sufficiently long.

The INIT_HCA timeout should be increased to 10 seconds, to bring it into line with all
the other HCA commands.

Jack

diff --git a/drivers/net/mlx4/fw.c b/drivers/net/mlx4/fw.c
index 6471d33..5064873 100644
--- a/drivers/net/mlx4/fw.c
+++ b/drivers/net/mlx4/fw.c
@@ -736,7 +736,7 @@ int mlx4_INIT_HCA(struct mlx4_dev *dev, struct mlx4_init_hca_param *param)
 	MLX4_PUT(inbox, (u8) (PAGE_SHIFT - 12), INIT_HCA_UAR_PAGE_SZ_OFFSET);
 	MLX4_PUT(inbox, param->log_uar_sz,      INIT_HCA_LOG_UAR_SZ_OFFSET);
 
-	err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_INIT_HCA, 1000);
+	err = mlx4_cmd(dev, mailbox->dma, 0, 0, MLX4_CMD_INIT_HCA, 10000);
 
 	if (err)
 		mlx4_err(dev, "INIT_HCA returns %d\n", err);



More information about the general mailing list