Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ea3beca4 authored by Jeff Shaw's avatar Jeff Shaw Committed by Jeff Kirsher
Browse files

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: 940b61af ("ice: Initialize PF and setup miscellaneous
interrupt")

Signed-off-by: default avatarJeff Shaw <jeffrey.b.shaw@intel.com>
Signed-off-by: default avatarAnirudh Venkataramanan <anirudh.venkataramanan@intel.com>
Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 5ae4bbf7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1014,10 +1014,10 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_info *cq,
	desc = ICE_CTL_Q_DESC(cq->rq, ntc);
	desc_idx = ntc;

	cq->rq_last_status = (enum ice_aq_err)le16_to_cpu(desc->retval);
	flags = le16_to_cpu(desc->flags);
	if (flags & ICE_AQ_FLAG_ERR) {
		ret_code = ICE_ERR_AQ_ERROR;
		cq->rq_last_status = (enum ice_aq_err)le16_to_cpu(desc->retval);
		ice_debug(hw, ICE_DBG_AQ_MSG,
			  "Control Receive Queue Event received with error 0x%x\n",
			  cq->rq_last_status);