i40evf: delay releasing rings
authorMitch Williams <mitch.a.williams@intel.com>
Fri, 27 Mar 2015 07:12:09 +0000 (00:12 -0700)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 27 Mar 2015 09:57:03 +0000 (02:57 -0700)
commite284fc88dfb6ceb69c547abb8d78b9fde6b9dc85
tree47f1394bf5181d256f3b17323349621751e7ad3b
parentae24b4095c2f9547d0f2ab2845155aabe4e564d0
i40evf: delay releasing rings

When the VF interface is closed, we cannot immediately free our rings
and RX buffers, because the hardware hasn't yet stopped accessing this
memory. This shows up as a panic or memory corruption when the device is
brought down while under heavy stress.

To fix this, delay releasing resources until we receive acknowledgment
from the PF driver that the rings have indeed been stopped. Because of
this delay, we also need to check to make sure that all of our admin
queue requests have been handled before allowing the device to be
opened.

Change-ID: I44edd35529ce2fa2a9512437a3a8e6f14ed8ed63
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Jim Young <james.m.young@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40evf/i40evf.h
drivers/net/ethernet/intel/i40evf/i40evf_main.c
drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c