Skip to content

Commit

Permalink
qlcnic: Initialize mailbox cmd structure to zero
Browse files Browse the repository at this point in the history
o Uninitialzed 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>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Rajesh Borundia authored and David S. Miller committed Jun 5, 2014
1 parent d4c642e commit c531692
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ static int qlcnic_sriov_get_vf_acl(struct qlcnic_adapter *adapter)
struct qlcnic_cmd_args cmd;
int ret = 0;

memset(&cmd, 0, sizeof(cmd));
ret = qlcnic_sriov_alloc_bc_mbx_args(&cmd, QLCNIC_BC_CMD_GET_ACL);
if (ret)
return ret;
Expand Down Expand Up @@ -1441,6 +1442,7 @@ static int qlcnic_sriov_channel_cfg_cmd(struct qlcnic_adapter *adapter, u8 cmd_o
struct qlcnic_vf_info *vf = &adapter->ahw->sriov->vf_info[0];
int ret;

memset(&cmd, 0, sizeof(cmd));
if (qlcnic_sriov_alloc_bc_mbx_args(&cmd, cmd_op))
return -ENOMEM;

Expand Down Expand Up @@ -1998,6 +2000,7 @@ int qlcnic_sriov_cfg_vf_guest_vlan(struct qlcnic_adapter *adapter,
struct qlcnic_cmd_args cmd;
int ret;

memset(&cmd, 0, sizeof(cmd));
if (vid == 0)
return 0;

Expand Down

0 comments on commit c531692

Please sign in to comment.