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

Commit 8b833b4f authored by Kevin Scott's avatar Kevin Scott Committed by Jeff Kirsher
Browse files

i40e/i40evf: Update check for AQ aliveness



Update the i40e_check_asq_alive check to ensure that the len register
offset is non-zero, indicating that SW has initialized the AQ.

Change-ID: I9c2e804788b4775bef9c7e80954ab004e6bdb306
Signed-off-by: default avatarKevin Scott <kevin.c.scott@intel.com>
Tested-by: default avatarKavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent 6623b419
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -133,7 +133,11 @@ void i40e_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
 **/
bool i40e_check_asq_alive(struct i40e_hw *hw)
{
	return !!(rd32(hw, hw->aq.asq.len) & I40E_PF_ATQLEN_ATQENABLE_MASK);
	if (hw->aq.asq.len)
		return !!(rd32(hw, hw->aq.asq.len) &
			  I40E_PF_ATQLEN_ATQENABLE_MASK);
	else
		return false;
}

/**
+5 −1
Original line number Diff line number Diff line
@@ -133,7 +133,11 @@ void i40evf_debug_aq(struct i40e_hw *hw, enum i40e_debug_mask mask, void *desc,
 **/
bool i40evf_check_asq_alive(struct i40e_hw *hw)
{
	return !!(rd32(hw, hw->aq.asq.len) & I40E_PF_ATQLEN_ATQENABLE_MASK);
	if (hw->aq.asq.len)
		return !!(rd32(hw, hw->aq.asq.len) &
			  I40E_PF_ATQLEN_ATQENABLE_MASK);
	else
		return false;
}

/**