]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
IB/mlx5: Clear out struct before create QP command
authorEli Cohen <eli@dev.mellanox.co.il>
Tue, 14 Jan 2014 15:45:14 +0000 (17:45 +0200)
committerRoland Dreier <roland@purestorage.com>
Thu, 23 Jan 2014 07:23:46 +0000 (23:23 -0800)
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>
drivers/net/ethernet/mellanox/mlx5/core/qp.c

index 54faf8bfcaf4bff96de48f8caf8eaa1b7d7a87de..e7941843a72dcd05469693598b578cfe3e1cdef9 100644 (file)
@@ -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));