diff options
author | Mitch Williams <mitch.a.williams@intel.com> | 2016-03-10 23:59:49 +0100 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2016-04-05 21:27:09 +0200 |
commit | 19b73d8efaa459a66665b5e0a3e7acedd05f4901 (patch) | |
tree | 85f4bba499b7e15dbb6877204e8830d0ed75f89d | |
parent | i40e: Change unknown event error msg to ignore message (diff) | |
download | linux-19b73d8efaa459a66665b5e0a3e7acedd05f4901.tar.xz linux-19b73d8efaa459a66665b5e0a3e7acedd05f4901.zip |
i40evf: Add additional check for reset
If the driver happens to read a register during the time in which the
device is undergoing reset, it will receive a value of 0xdeadbeef
instead of a valid value. Unfortunately, the driver may misinterpret
this as a valid value, especially if it's just looking for individual
bits.
Add an explicit check for this value when we are looking for admin queue
errors, and trigger reset recovery if we find it.
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/i40evf/i40evf_main.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c b/drivers/net/ethernet/intel/i40evf/i40evf_main.c index 820ad94c932b..d783c1b19a16 100644 --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c @@ -1994,6 +1994,8 @@ static void i40evf_adminq_task(struct work_struct *work) /* check for error indications */ val = rd32(hw, hw->aq.arq.len); + if (val == 0xdeadbeef) /* indicates device in reset */ + goto freedom; oldval = val; if (val & I40E_VF_ARQLEN1_ARQVFE_MASK) { dev_info(&adapter->pdev->dev, "ARQ VF Error detected\n"); |