Commit 36ce10d3 authored by Dotan Barak's avatar Dotan Barak Committed by Roland Dreier

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: default avatarDotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: default avatarRoland Dreier <rolandd@cisco.com>
parent 65d470b3
...@@ -95,7 +95,7 @@ enum { ...@@ -95,7 +95,7 @@ enum {
}; };
enum { enum {
GO_BIT_TIMEOUT = 10000 GO_BIT_TIMEOUT_MSECS = 10000
}; };
struct mlx4_cmd_context { struct mlx4_cmd_context {
...@@ -155,7 +155,7 @@ static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param, ...@@ -155,7 +155,7 @@ static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param,
end = jiffies; end = jiffies;
if (event) if (event)
end += HZ * 10; end += msecs_to_jiffies(GO_BIT_TIMEOUT_MSECS);
while (cmd_pending(dev)) { while (cmd_pending(dev)) {
if (time_after_eq(jiffies, end)) if (time_after_eq(jiffies, end))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment