Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e08a8761 authored by Haggai Eran's avatar Haggai Eran Committed by Roland Dreier
Browse files

mlx5_core: Fix out arg size in access_register command



The output size should be the sum of the core access reg output struct
plus the size of the specific register data provided by the caller.

Signed-off-by: default avatarHaggai Eran <haggaie@mellanox.com>
Signed-off-by: default avatarEli Cohen <eli@mellanox.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent c1be5232
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -57,7 +57,7 @@ int mlx5_core_access_reg(struct mlx5_core_dev *dev, void *data_in,
	in->arg = cpu_to_be32(arg);
	in->arg = cpu_to_be32(arg);
	in->register_id = cpu_to_be16(reg_num);
	in->register_id = cpu_to_be16(reg_num);
	err = mlx5_cmd_exec(dev, in, sizeof(*in) + size_in, out,
	err = mlx5_cmd_exec(dev, in, sizeof(*in) + size_in, out,
			    sizeof(out) + size_out);
			    sizeof(*out) + size_out);
	if (err)
	if (err)
		goto ex2;
		goto ex2;