Skip to content

Commit

Permalink
IB/mlx5: Clear out struct before create QP command
Browse files Browse the repository at this point in the history
Output structs are expected by firmware to be cleared when a command is called.
Clear the "out" struct instead of "dout" which is used only later.

Signed-off-by: Eli Cohen <eli@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
  • Loading branch information
Eli Cohen authored and Roland Dreier committed Jan 23, 2014
1 parent e08a876 commit 0b6e81b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/qp.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int mlx5_core_create_qp(struct mlx5_core_dev *dev,
struct mlx5_destroy_qp_mbox_out dout;
int err;

memset(&dout, 0, sizeof(dout));
memset(&out, 0, sizeof(out));
in->hdr.opcode = cpu_to_be16(MLX5_CMD_OP_CREATE_QP);

err = mlx5_cmd_exec(dev, in, inlen, &out, sizeof(out));
Expand Down

0 comments on commit 0b6e81b

Please sign in to comment.