OSDN Git Service

i40e: don't panic on VSI allocation failure
authorMitch Williams <mitch.a.williams@intel.com>
Mon, 31 Aug 2015 23:54:48 +0000 (19:54 -0400)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 14 Oct 2015 06:32:25 +0000 (23:32 -0700)
commit21be99ec4ed366e24d4735d230aa3086ff2bc6ed
treedbde3b2cf4f1e7abfbe7fe63156ff1ad12bba553
parente7e6cfce16e9184497716e004fc9e714a7411ad0
i40e: don't panic on VSI allocation failure

In some circumstances, the firmware may fail to allocate a VSI for a VF.
When this happens, the driver does not react well to the bad news and
has a panic attack.

To fix this problem, check the return value from i40e_alloc_vf_res and
don't try to configure the device further if it failed. Additionally,
explicitly clear the INIT bit when we free VF resources, so that this
bit will be in the proper state in the failure case, and won't blow up
elsewhere.

Change-ID: I6a20ce2b59c3458fd832032e88fa28cd42500189
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>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c