]> git.baikalelectronics.ru Git - kernel.git/commit
i40e: disable IOV before freeing resources
authorMitch A Williams <mitch.a.williams@intel.com>
Tue, 9 Dec 2014 08:53:01 +0000 (08:53 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 13 Jan 2015 19:28:47 +0000 (11:28 -0800)
commit78276ddd9f41bba6ab1b6079a0c49651d967893f
tree11fe74384d3fe29b4f9f512cb3a34b57f2c5b086
parent99ab0d909d94186bc7135babd0d16f19c090eeed
i40e: disable IOV before freeing resources

If VF drivers are loaded in the host OS, the call to pci_disable_sriov()
will cause these drivers' remove routines to be called. If the PF driver
has already freed VF resources before this happens, then the VF remove
routine can't properly communicate with the PF driver causing all sorts
of mayhem and error messages and hurt feelings.

To fix this, we move the call to pci_disable_sriov() up to the top of
the function and let it complete before freeing any VF resources.

Change-ID: I397c3997a00f6408e32b7735273911e499600236
Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Acked-by: Shannon Nelson <shannon.nelson@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/i40e/i40e_virtchnl_pf.c