netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] qlcnic: Initialize mailbox cmd structure to zero.
@ 2014-05-25 14:55 Rajesh Borundia
  2014-05-30 22:27 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Rajesh Borundia @ 2014-05-25 14:55 UTC (permalink / raw)
  To: davem; +Cc: netdev, Dept-HSGLinuxNICDev

o Uninitialized fields in mailbox command structure
  caused commands to time out randomly due to garbage
  values, so initialize it to zero.

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
---
 .../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c   |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
index 6afe9c1..15f4c9e 100644
--- a/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
+++ b/drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
@@ -702,6 +702,7 @@ static int qlcnic_sriov_alloc_bc_mbx_args(struct qlcnic_cmd_args *mbx, u32 type)
 	const struct qlcnic_mailbox_metadata *mbx_tbl;
 	int i, size;
 
+	memset(mbx, 0, sizeof(*mbx));
 	mbx_tbl = qlcnic_sriov_bc_mbx_tbl;
 	size = ARRAY_SIZE(qlcnic_sriov_bc_mbx_tbl);
 
-- 
1.6.3.3

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-05-30 22:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-25 14:55 [PATCH net] qlcnic: Initialize mailbox cmd structure to zero Rajesh Borundia
2014-05-30 22:27 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).