Skip to content

Commit

Permalink
net/mlx5: Fix masking of reserved bits in XRCD number
Browse files Browse the repository at this point in the history
Mask the reserved bits when reading the number of newly
created XRCD.

Fixes: e126ba9 ('mlx5: Add driver for Mellanox Connect-IB adapters')
Signed-off-by: Majd Dibbiny <majd@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Majd Dibbiny authored and David S. Miller committed Jun 10, 2016
1 parent 418f839 commit 9cd3411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/qp.c
Original file line number Diff line number Diff line change
@@ -418,7 +418,7 @@ int mlx5_core_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn)
if (out.hdr.status)
err = mlx5_cmd_status_to_err(&out.hdr);
else
*xrcdn = be32_to_cpu(out.xrcdn);
*xrcdn = be32_to_cpu(out.xrcdn) & 0xffffff;

return err;
}

0 comments on commit 9cd3411

Please sign in to comment.