net/mlx4_core: Initialize all mailbox buffers to zero before use
[cascardo/linux.git] / drivers / net / ethernet / mellanox / mlx4 / srq.c
index 79fd269..8fdf237 100644 (file)
@@ -34,6 +34,7 @@
 #include <linux/init.h>
 
 #include <linux/mlx4/cmd.h>
+#include <linux/mlx4/srq.h>
 #include <linux/export.h>
 #include <linux/gfp.h>
 
@@ -188,8 +189,6 @@ int mlx4_srq_alloc(struct mlx4_dev *dev, u32 pdn, u32 cqn, u16 xrcd,
        }
 
        srq_context = mailbox->buf;
-       memset(srq_context, 0, sizeof *srq_context);
-
        srq_context->state_logsize_srqn = cpu_to_be32((ilog2(srq->max) << 24) |
                                                      srq->srqn);
        srq_context->logstride          = srq->wqe_shift - 4;