mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-16 00:06:46 +07:00
IB/mlx4: Fix struct mlx4_ib_create_wq alignment
The mlx4 ABI defines to have structures with alignment of 64B.
Fixes: 400b1ebcfe
("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>
This commit is contained in:
parent
c3f1ee292f
commit
078b357303
@ -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 (src == MLX4_IB_RWQ_SRC) {
|
||||||
if (ucmd.wq.comp_mask || ucmd.wq.reserved1 ||
|
if (ucmd.wq.comp_mask || ucmd.wq.reserved[0] ||
|
||||||
ucmd.wq.reserved[0] || ucmd.wq.reserved[1] ||
|
ucmd.wq.reserved[1] || ucmd.wq.reserved[2]) {
|
||||||
ucmd.wq.reserved[2]) {
|
|
||||||
pr_debug("user command isn't supported\n");
|
pr_debug("user command isn't supported\n");
|
||||||
err = -EOPNOTSUPP;
|
err = -EOPNOTSUPP;
|
||||||
goto err;
|
goto err;
|
||||||
@ -4146,8 +4145,8 @@ struct ib_wq *mlx4_ib_create_wq(struct ib_pd *pd,
|
|||||||
if (!(udata && pd->uobject))
|
if (!(udata && pd->uobject))
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
|
||||||
required_cmd_sz = offsetof(typeof(ucmd), reserved) +
|
required_cmd_sz = offsetof(typeof(ucmd), comp_mask) +
|
||||||
sizeof(ucmd.reserved);
|
sizeof(ucmd.comp_mask);
|
||||||
if (udata->inlen < required_cmd_sz) {
|
if (udata->inlen < required_cmd_sz) {
|
||||||
pr_debug("invalid inlen\n");
|
pr_debug("invalid inlen\n");
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
|
@ -121,7 +121,6 @@ struct mlx4_ib_create_wq {
|
|||||||
__u8 log_range_size;
|
__u8 log_range_size;
|
||||||
__u8 reserved[3];
|
__u8 reserved[3];
|
||||||
__u32 comp_mask;
|
__u32 comp_mask;
|
||||||
__u32 reserved1;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct mlx4_ib_modify_wq {
|
struct mlx4_ib_modify_wq {
|
||||||
|
Loading…
Reference in New Issue
Block a user