summaryrefslogtreecommitdiff
path: root/drivers/firewire
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2016-11-11 12:39:27 -0800
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-12-06 21:24:01 -0800
commitac9e239014413e483abadba7722cfc1672302738 (patch)
tree04e2a38c7d326b7317fd91edc1648eb40fa96af0 /drivers/firewire
parent38326218acce336d99cd128a11ecc69f6512f8e4 (diff)
i40e: refactor i40e_update_filter_state to avoid passing aq_err
The current caller of i40e_update_filter_state incorrectly passes aq_ret, an i40e_status variable, instead of the expected aq_err. This happens to work because i40e_status is actually just a typedef integer, and 0 is still the successful return. However i40e_update_filter_state has special handling for ENOSPC which is currently being ignored. Also notice that firmware does not update the per-filter response for many types of errors, such as EINVAL. Thus, modify the filter setup so that the firmware response memory is pre-set with I40E_AQC_MM_ERR_NO_RES. This enables us to refactor i40e_update_filter_state, removing the need to pass aq_err and avoiding a need for having 3 different flows for checking the filter state. The resulting code for i40e_update_filter_state is much simpler, only a single loop and we always check each filter response value every time. Since we pre-set the response value to match our expected error this correctly works for all success and error flows. Change-ID: Ie292c9511f34ee18c6ef40f955ad13e28b7aea7d Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Andrew Bowers <andrewx.bowers@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/firewire')
0 files changed, 0 insertions, 0 deletions