Skip to content

Commit

Permalink
mlx4: Fix mlx4_read_clock returned errno value
Browse files Browse the repository at this point in the history
[ Upstream commit 50eb393 ]

mlx4_query_rt_values should return the value of errno on failure, but in
some cases where mlx4_read_clock fails, a negative EOPNOTSUPP is
returned instead.
ix mlx4_read_clock to return the correct value.

Fixes: ee7b8d0 ("mlx4: Add ibv_query_rt_values")
Signed-off-by: Shay Drory <shayd@nvidia.com>
Signed-off-by: Yishai Hadas <yishaih@nvidia.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
  • Loading branch information
shayshyi authored and nmorey committed May 4, 2021
1 parent 0ba49c3 commit 9283e1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion providers/mlx4/verbs.c
Expand Up @@ -113,7 +113,7 @@ static int mlx4_read_clock(struct ibv_context *context, uint64_t *cycles)
struct mlx4_context *ctx = to_mctx(context);

if (!ctx->hca_core_clock)
return -EOPNOTSUPP;
return EOPNOTSUPP;

/* Handle wraparound */
for (i = 0; i < 2; i++) {
Expand Down

0 comments on commit 9283e1b

Please sign in to comment.