diff options
author | Jeff Shaw <jeffrey.b.shaw@intel.com> | 2018-04-18 14:23:27 -0400 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2018-05-11 14:43:17 -0400 |
commit | ea3beca422742ca7e8502496e2806421d5e9d6fd (patch) | |
tree | 4a9394232167195c395d5f079aef2d9e861358f4 /drivers/net/ethernet/intel/ice/ice_controlq.c | |
parent | 5ae4bbf76928b401fe467e837073d939300adbf0 (diff) |
ice: Set rq_last_status when cleaning rq
Prior to this commit, the rq_last_status was only set when hardware
responded with an error. This leads to rq_last_status being invalid
in the future when hardware eventually responds without error. This
commit resolves the issue by unconditionally setting rq_last_status
with the value returned in the descriptor.
Fixes: 940b61af02f4 ("ice: Initialize PF and setup miscellaneous
interrupt")
Signed-off-by: Jeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: Anirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: Tony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_controlq.c')
-rw-r--r-- | drivers/net/ethernet/intel/ice/ice_controlq.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_controlq.c b/drivers/net/ethernet/intel/ice/ice_controlq.c index 5909a4407e38..7c511f144ed6 100644 --- a/drivers/net/ethernet/intel/ice/ice_controlq.c +++ b/drivers/net/ethernet/intel/ice/ice_controlq.c | |||
@@ -1014,10 +1014,10 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq, | |||
1014 | desc = ICE_CTL_Q_DESC(cq->rq, ntc); | 1014 | desc = ICE_CTL_Q_DESC(cq->rq, ntc); |
1015 | desc_idx = ntc; | 1015 | desc_idx = ntc; |
1016 | 1016 | ||
1017 | cq->rq_last_status = (enum ice_aq_err)le16_to_cpu(desc->retval); | ||
1017 | flags = le16_to_cpu(desc->flags); | 1018 | flags = le16_to_cpu(desc->flags); |
1018 | if (flags & ICE_AQ_FLAG_ERR) { | 1019 | if (flags & ICE_AQ_FLAG_ERR) { |
1019 | ret_code = ICE_ERR_AQ_ERROR; | 1020 | ret_code = ICE_ERR_AQ_ERROR; |
1020 | cq->rq_last_status = (enum ice_aq_err)le16_to_cpu(desc->retval); | ||
1021 | ice_debug(hw, ICE_DBG_AQ_MSG, | 1021 | ice_debug(hw, ICE_DBG_AQ_MSG, |
1022 | "Control Receive Queue Event received with error 0x%x\n", | 1022 | "Control Receive Queue Event received with error 0x%x\n", |
1023 | cq->rq_last_status); | 1023 | cq->rq_last_status); |