]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit5edf6b859c174cc60f2d005539e60bcbcaa7c58f
treedbde3b2cf4f1e7abfbe7fe63156ff1ad12bba553
parentf67a7d52902c7c825bea8b8db2a96cdd9a1b6e14
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