Commit 833d12b2 authored by Majd Dibbiny's avatar Majd Dibbiny Committed by Ben Hutchings

net/mlx5: Fix masking of reserved bits in XRCD number

commit 9cd3411c upstream.

Mask the reserved bits when reading the number of newly
created XRCD.

Fixes: e126ba97 ('mlx5: Add driver for Mellanox Connect-IB adapters')
Signed-off-by: default avatarMajd Dibbiny <majd@mellanox.com>
Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarBen Hutchings <ben@decadent.org.uk>
parent 74e4b89b
......@@ -274,7 +274,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;
}
......
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