]> www.infradead.org Git - users/jedix/linux-maple.git/commit
i40evf: detect reset more reliably
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 28 Aug 2015 21:55:53 +0000 (17:55 -0400)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:32:28 +0000 (08:32 -0800)
commitd8c3469b2e1ad066a3b342be446a86ad8559df1f
treedcd9bfa6e5bd9a7ef1ffff02dbd7f8b7da6acd51
parent4da9f272b9bc74d408ab91c1c66bf8767c3e998a
i40evf: detect reset more reliably

Orabug: 22342532

Using VFGEN_RSTAT to detect a VF reset is an endeavor that is fraught
with peril. It's entirely too easy to miss a reset because none of the
bits are sticky. By the time the VF driver reads the register, the reset
may have been processed and cleaned up by the PF driver, leaving the
register in the same state that it was before the reset.

Instead, detect a reset with the VF_ARQLEN register. When the VF is
reset, the enable bit in this register is cleared, and it stays cleared
until the VF driver processes the reset and re-enables the admin queue.

Because we now deal with multiple registers in the reset and watchdog
tasks, rename the rstat_val variable to reg_val.

Change-ID: Id1df17045c0992e607da0162d31807f7fc20d199
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>
(cherry picked from commit ee5c1e92dd01d372b8e054b5a7e1cc19a1d32815)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40evf/i40evf_main.c