Skip to content

Commit

Permalink
mlx4_core: Use enum value GO_BIT_TIMEOUT_MSECS
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dotan Barak authored and Roland Dreier committed Oct 10, 2007
1 parent 65d470b commit 36ce10d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/mlx4/cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ enum {
};

enum {
GO_BIT_TIMEOUT = 10000
GO_BIT_TIMEOUT_MSECS = 10000
};

struct mlx4_cmd_context {
Expand Down Expand Up @@ -155,7 +155,7 @@ static int mlx4_cmd_post(struct mlx4_dev *dev, u64 in_param, u64 out_param,

end = jiffies;
if (event)
end += HZ * 10;
end += msecs_to_jiffies(GO_BIT_TIMEOUT_MSECS);

while (cmd_pending(dev)) {
if (time_after_eq(jiffies, end))
Expand Down

0 comments on commit 36ce10d

Please sign in to comment.