net/mlx5: Fix masking of reserved bits in XRCD number
Mask the reserved bits when reading the number of newly
created XRCD.
Fixes: e126ba97db ('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>
This commit is contained in:
committed by
David S. Miller
parent
418f8399a8
commit
9cd3411c42
@@ -418,7 +418,7 @@ int mlx5_core_xrcd_alloc(struct mlx5_core_dev *dev, u32 *xrcdn)
|
|||||||
if (out.hdr.status)
|
if (out.hdr.status)
|
||||||
err = mlx5_cmd_status_to_err(&out.hdr);
|
err = mlx5_cmd_status_to_err(&out.hdr);
|
||||||
else
|
else
|
||||||
*xrcdn = be32_to_cpu(out.xrcdn);
|
*xrcdn = be32_to_cpu(out.xrcdn) & 0xffffff;
|
||||||
|
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user