]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: guard against vf message races
authorMitch Williams <mitch.a.williams@intel.com>
Thu, 28 Nov 2013 06:39:30 +0000 (06:39 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sun, 5 Jan 2014 06:37:57 +0000 (22:37 -0800)
commitde8ceea6f2e2b33dee90df4c3ee38415bd18c463
tree5ef810d3d597f444737e961d2a227d9970d07cae
parent168662838edc6ce24b71bf1f36467fc4664cc814
i40e: guard against vf message races

When disabling and enabling VFs on a live system with the VF driver
loaded, it's possible to receive an admin queue message from the VF
driver at an inconvenient time, e.g. when the associated data structures
aren't present or configured. This causes a rather inconvenient panic.

To guard against this, we change the order of when we set num_alloc_vfs
when turning off SR-IOV, and then gate processing of any VF messages
based upon that value. Likewise, when enabling VFs, we shut off the
relevant interrupt until configuration is complete.

Change-Id: I0c172c056616c2bebd78bbc807ab446eb484deea
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c