ixgbe: Change how we check for pre-existing and assigned VFs
authorAlexander Duyck <alexander.h.duyck@intel.com>
Wed, 23 May 2012 02:58:40 +0000 (02:58 +0000)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Sat, 21 Jul 2012 23:02:56 +0000 (16:02 -0700)
commit9297127b9cdd8d30c829ef5fd28b7cc0323a7bcd
tree1c5c99f9144f9738436c35c5bdad3a98b70d730a
parent99d744875d01d57d832b8dbfc36d9a1990d503b8
ixgbe: Change how we check for pre-existing and assigned VFs

This patch does two things.  First it drops the unnecessary work of
searching for enabled VFs when we first bring up the adapter and instead
just uses pci_num_vf to determine how many VFs are enabled on the adapter.

The second thing it does is drop the use of vfdev from the vf_data_storage
structure.  Instead we just search the entire system for a VF that has us
as it's PF, and then if that VF is assigned we indicate that the VFs are
assigned.  This allows us to still check for assigned VFs even if the
vfinfo allocation has failed, or vfinfo has been freed.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe.h
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.h