Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01264108 authored by Rose, Gregory V's avatar Rose, Gregory V Committed by David S. Miller
Browse files

ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined



Fix compiler errors and warnings with CONFIG_PCI_IOV defined and not
defined.

Signed-off-by: default avatarGreg Rose <gregory.v.rose@intel.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1a6422f6
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -442,12 +442,14 @@ static int ixgbe_set_vf_macvlan(struct ixgbe_adapter *adapter,


int ixgbe_check_vf_assignment(struct ixgbe_adapter *adapter)
int ixgbe_check_vf_assignment(struct ixgbe_adapter *adapter)
{
{
#ifdef CONFIG_PCI_IOV
	int i;
	int i;
	for (i = 0; i < adapter->num_vfs; i++) {
	for (i = 0; i < adapter->num_vfs; i++) {
		if (adapter->vfinfo[i].vfdev->dev_flags &
		if (adapter->vfinfo[i].vfdev->dev_flags &
				PCI_DEV_FLAGS_ASSIGNED)
				PCI_DEV_FLAGS_ASSIGNED)
			return true;
			return true;
	}
	}
#endif
	return false;
	return false;
}
}


+2 −2
Original line number Original line Diff line number Diff line
@@ -42,11 +42,11 @@ int ixgbe_ndo_set_vf_spoofchk(struct net_device *netdev, int vf, bool setting);
int ixgbe_ndo_get_vf_config(struct net_device *netdev,
int ixgbe_ndo_get_vf_config(struct net_device *netdev,
			    int vf, struct ifla_vf_info *ivi);
			    int vf, struct ifla_vf_info *ivi);
void ixgbe_check_vf_rate_limit(struct ixgbe_adapter *adapter);
void ixgbe_check_vf_rate_limit(struct ixgbe_adapter *adapter);
#ifdef CONFIG_PCI_IOV
void ixgbe_disable_sriov(struct ixgbe_adapter *adapter);
void ixgbe_disable_sriov(struct ixgbe_adapter *adapter);
int ixgbe_check_vf_assignment(struct ixgbe_adapter *adapter);
#ifdef CONFIG_PCI_IOV
void ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
void ixgbe_enable_sriov(struct ixgbe_adapter *adapter,
			const struct ixgbe_info *ii);
			const struct ixgbe_info *ii);
int ixgbe_check_vf_assignment(struct ixgbe_adapter *adapter);
#endif
#endif