From: ethan.zhao Date: Fri, 17 Jan 2014 03:41:05 +0000 (-0800) Subject: ixgbe: set driver_max_VFs should be done before enabling SRIOV X-Git-Tag: v3.14-rc1~94^2~105^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31ac910e105db07e2f615d00cf20876b27538d52;p=pandora-kernel.git ixgbe: set driver_max_VFs should be done before enabling SRIOV commit 43dc4e01 Limit number of reported VFs to device specific value It doesn't work and always returns -EBUSY because VFs are already enabled. ixgbe_enable_sriov() pci_enable_sriov() sriov_enable() { ... .. iov->ctrl |= PCI_SRIOV_CTRL_VFE | PCI_SRIOV_CTRL_MSE; pci_cfg_access_lock(dev); ... ... } pci_sriov_set_totalvfs() { ... ... if (dev->sriov->ctrl & PCI_SRIOV_CTRL_VFE) return -EBUSY; ... } So should set driver_max_VFs with pci_sriov_set_totalvfs() before enable VFs with ixgbe_enable_sriov(). V2: revised for net-next tree. Signed-off-by: Ethan Zhao Tested-by: Phil Schmitt Signed-off-by: Aaron Brown Signed-off-by: David S. Miller --- Reading git-diff-tree failed