aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx4/qp.c
diff options
context:
space:
mode:
authorGuy Levi <guyle@mellanox.com>2017-08-17 15:50:47 +0300
committerDoug Ledford <dledford@redhat.com>2017-08-24 16:27:11 -0400
commit078b3573030346df0cdc46d798c0f434dc53c2cc (patch)
tree704ecbe103e8d4699e86a9b70b4456cce6f3d3f0 /drivers/infiniband/hw/mlx4/qp.c
parentIB/mlx4: Fix RSS QP type in creation verb (diff)
downloadlinux-dev-078b3573030346df0cdc46d798c0f434dc53c2cc.tar.xz
linux-dev-078b3573030346df0cdc46d798c0f434dc53c2cc.zip
IB/mlx4: Fix struct mlx4_ib_create_wq alignment
The mlx4 ABI defines to have structures with alignment of 64B. Fixes: 400b1ebcfe31 ("IB/mlx4: Add support for WQ related verbs") Signed-off-by: Guy Levi <guyle@mellanox.com> Signed-off-by: Leon Romanovsky <leon@kernel.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx4/qp.c')
-rw-r--r--drivers/infiniband/hw/mlx4/qp.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c
index 0d2923c2225f..c3958fcfed75 100644
--- a/drivers/infiniband/hw/mlx4/qp.c
+++ b/drivers/infiniband/hw/mlx4/qp.c
@@ -1046,9 +1046,8 @@ static int create_qp_common(struct mlx4_ib_dev *dev, struct ib_pd *pd,
}
if (src == MLX4_IB_RWQ_SRC) {
- if (ucmd.wq.comp_mask || ucmd.wq.reserved1 ||
- ucmd.wq.reserved[0] || ucmd.wq.reserved[1] ||
- ucmd.wq.reserved[2]) {
+ if (ucmd.wq.comp_mask || ucmd.wq.reserved[0] ||
+ ucmd.wq.reserved[1] || ucmd.wq.reserved[2]) {
pr_debug("user command isn't supported\n");
err = -EOPNOTSUPP;
goto err;
@@ -4146,8 +4145,8 @@ struct ib_wq *mlx4_ib_create_wq(struct ib_pd *pd,
if (!(udata && pd->uobject))
return ERR_PTR(-EINVAL);
- required_cmd_sz = offsetof(typeof(ucmd), reserved) +
- sizeof(ucmd.reserved);
+ required_cmd_sz = offsetof(typeof(ucmd), comp_mask) +
+ sizeof(ucmd.comp_mask);
if (udata->inlen < required_cmd_sz) {
pr_debug("invalid inlen\n");
return ERR_PTR(-EINVAL);