]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commite5e2164e0ab67b2e2d0c9452828d94780fca3db7
tree47f1394bf5181d256f3b17323349621751e7ad3b
parent875016daf3bbb954d958b6af3b3a8df86b34ebaa
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