aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net
diff options
context:
space:
mode:
authorDotan Barak <dotanb@dev.mellanox.co.il>2007-08-07 04:18:52 -0400
committerRoland Dreier <rolandd@cisco.com>2007-10-09 22:59:04 -0400
commit36ce10d3e849c2f9efa3fd647058de398ee276eb (patch)
treed9db9ddf322e00f6e106e5a9b92944e9be6dd978 /drivers/net
parent65d470b3ea52ee1402499d6fcb4632296452e5b1 (diff)
mlx4_core: Use enum value GO_BIT_TIMEOUT_MSECS
Rename GO_BIT_TIMEOUT to GO_BIT_TIMEOUT_MSECS for clarity, and actually use it as the go bit timeout (instead of having the define but then ignoring it and using a hard-coded 10 * HZ for the actual timeout). Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/mlx4/cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/mlx4/cmd.c b/drivers/net/mlx4/cmd.c
index a9f31753661a..b540820e9c25 100644
--- a/drivers/net/mlx4/cmd.c
+++ b/drivers/net/mlx4/cmd.c
@@ -95,7 +95,7 @@ enum {
95}; 95};
96 96
97enum { 97enum {
98 GO_BIT_TIMEOUT = 10000 98 GO_BIT_TIMEOUT_MSECS = 10000
99}; 99};
100 100
101struct mlx4_cmd_context { 101struct mlx4_cmd_context {
@@ -155,7 +155,7 @@ static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param,
155 155
156 end = jiffies; 156 end = jiffies;
157 if (event) 157 if (event)
158 end += HZ * 10; 158 end += msecs_to_jiffies(GO_BIT_TIMEOUT_MSECS);
159 159
160 while (cmd_pending(dev)) { 160 while (cmd_pending(dev)) {
161 if (time_after_eq(jiffies, end)) 161 if (time_after_eq(jiffies, end))