fm10k: do not assume VF always has 1 queue
authorJacob Keller <jacob.e.keller@intel.com>
Tue, 25 Aug 2015 00:27:24 +0000 (17:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 15 Sep 2016 06:27:39 +0000 (08:27 +0200)
commit87a7bea68d32ef961f0d6883feb7a83f45c2a74e
treed38f3f9a93653624956cc933a6b8dc8e43fc731d
parent4aa1324340dabca412d39ba98de7eabd495af7f0
fm10k: do not assume VF always has 1 queue

[ Upstream commit 1340181fe435ccb8ca2f996b8680bd9566860619 ]

It is possible that the PF has not yet assigned resources to the VF.
Although rare, this could result in the VF attempting to read queues it
does not own and result in FUM or THI faults in the PF. To prevent this,
check queue 0 before we continue in init_hw_vf.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Tested-by: Krishneil Singh <Krishneil.k.singh@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/intel/fm10k/fm10k_type.h
drivers/net/ethernet/intel/fm10k/fm10k_vf.c