aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/i40evf
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2014-06-04 04:45:16 -0400
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-07-02 22:02:18 -0400
commit4334edf53a032f54403d1f367b501502a8c61e93 (patch)
treee97ce15c8e39d7286a3987cd7e5a6da8d382d46d /drivers/net/ethernet/intel/i40evf
parent49d7d933316375665cea49473d563cb8447d8a06 (diff)
i40evf: don't violate scope
Move a declaration up one level so we don't dereference it out of scope. This didn't cause any panics, but the details->async field would mysteriously disappear, causing unnecessary delays when sending AQ commands. Also, the code is just plain wrong. Change-ID: I753f64f13c55e5d75ea4351e29b14fb53b2f0104 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Tested-by: Jim Young <jamesx.m.young@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/i40evf')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40e_common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c
index a43155afdbe2..4ea90bf239bb 100644
--- a/drivers/net/ethernet/intel/i40evf/i40e_common.c
+++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c
@@ -551,6 +551,7 @@ i40e_status i40e_aq_send_msg_to_pf(struct i40e_hw *hw,
551 struct i40e_asq_cmd_details *cmd_details) 551 struct i40e_asq_cmd_details *cmd_details)
552{ 552{
553 struct i40e_aq_desc desc; 553 struct i40e_aq_desc desc;
554 struct i40e_asq_cmd_details details;
554 i40e_status status; 555 i40e_status status;
555 556
556 i40evf_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_send_msg_to_pf); 557 i40evf_fill_default_direct_cmd_desc(&desc, i40e_aqc_opc_send_msg_to_pf);
@@ -565,7 +566,6 @@ i40e_status i40e_aq_send_msg_to_pf(struct i40e_hw *hw,
565 desc.datalen = cpu_to_le16(msglen); 566 desc.datalen = cpu_to_le16(msglen);
566 } 567 }
567 if (!cmd_details) { 568 if (!cmd_details) {
568 struct i40e_asq_cmd_details details;
569 memset(&details, 0, sizeof(details)); 569 memset(&details, 0, sizeof(details));
570 details.async = true; 570 details.async = true;
571 cmd_details = &details; 571 cmd_details = &details;