summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMitch Williams <mitch.a.williams@intel.com>2014-10-17 03:14:42 +0000
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2014-11-03 01:23:24 -0800
commit7bdd6f74876e1bf4fc9849fe872000ecc944e71d (patch)
tree04413ba1caa42cb629af3f66319675c1e94ef844 /drivers
parent1790ed0c65c114b6d262963bb054526697728815 (diff)
i40evf: properly handle multiple AQ messages
When we receive an admin queue message, the msg_size field in the event struct gets overwritten. Because of this, we need to reinit the field each time we go through the loop. Without this we may receive truncated messages due to the firmware thinking we have insufficient buffer size. Change-ID: I21dcca5114d91365d731169965ce3ffec0e4a190 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Patrick Lu <patrick.lu@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')
-rw-r--r--drivers/net/ethernet/intel/i40evf/i40evf_main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
index dabe6a4220c..b2f01eb2f9e 100644
--- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
+++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
@@ -1647,10 +1647,8 @@ static void i40evf_adminq_task(struct work_struct *work)
v_msg->v_retval, event.msg_buf,
event.msg_size);
if (pending != 0) {
- dev_info(&adapter->pdev->dev,
- "%s: ARQ: Pending events %d\n",
- __func__, pending);
memset(event.msg_buf, 0, I40EVF_MAX_AQ_BUF_SIZE);
+ event.msg_size = I40EVF_MAX_AQ_BUF_SIZE;
}
} while (pending);