]> www.infradead.org Git - users/jedix/linux-maple.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)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 10 Mar 2016 16:32:35 +0000 (08:32 -0800)
commita60258a445de5cee7795c38064b9e82acb44f420
treea30e79674df79ca51ef5f5b51958a36231550f24
parentde3a77653274e771ec06361cef0f14ddb988d3bb
i40e: don't panic on VSI allocation failure

Orabug: 22342532

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>
(cherry picked from commit 21be99ec4ed366e24d4735d230aa3086ff2bc6ed)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c