diff options
author | Majd Dibbiny <majd@mellanox.com> | 2016-06-10 00:07:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-06-10 08:06:25 +0300 |
commit | 9cd3411c42c5d5ba55d6e745edfe7df53c1ffa41 (patch) | |
tree | b8a64e6c85f67c64f7d1d1849708853d7df83222 /drivers/net | |
parent | 418f8399a8bedf376ec13eb01088f04a76ebdd6f (diff) | |
download | linux-9cd3411c42c5d5ba55d6e745edfe7df53c1ffa41.tar.xz |
net/mlx5: Fix masking of reserved bits in XRCD number
Mask the reserved bits when reading the number of newly
created XRCD.
Fixes: e126ba97dba9 ('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>
Diffstat (limited to 'drivers/net')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/qp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/qp.c b/drivers/net/ethernet/mellanox/mlx5/core/qp.c index b720a274220d..b82d65802d96 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/qp.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/qp.c @@ -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; } |