diff options
author | Kevin Scott <kevin.c.scott@intel.com> | 2014-04-09 05:58:54 +0000 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2014-05-29 02:02:25 -0700 |
commit | 8b833b4faa76df878cbf6059212093f2842c3962 (patch) | |
tree | d011f06663b04fef922f1aad19e59df9ba1856a8 | |
parent | 6623b4194459c07859d3e3196c3994fa7be5b88e (diff) |
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: Kevin Scott <kevin.c.scott@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40e/i40e_common.c | 6 | ||||
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40e_common.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/i40e/i40e_common.c b/drivers/net/ethernet/intel/i40e/i40e_common.c index 22eefda3a530..4bea409a552d 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_common.c +++ b/drivers/net/ethernet/intel/i40e/i40e_common.c @@ -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; } /** diff --git a/drivers/net/ethernet/intel/i40evf/i40e_common.c b/drivers/net/ethernet/intel/i40evf/i40e_common.c index ac660963b8b7..ea0f2001cc20 100644 --- a/drivers/net/ethernet/intel/i40evf/i40e_common.c +++ b/drivers/net/ethernet/intel/i40evf/i40e_common.c @@ -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; } /** |