]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c
cxgb4: Fix for SR-IOV VF initialization
[mirror_ubuntu-artful-kernel.git] / drivers / net / ethernet / chelsio / cxgb4 / cxgb4_main.c
index 4247356c16ffda89db7868797f8c09c2b4ff6073..1a162d21d8ace587476789609be1d7326ebb3305 100644 (file)
@@ -6527,11 +6527,9 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
 
        /* We control everything through one PF */
        func = SOURCEPF_GET(readl(adapter->regs + PL_WHOAMI));
-       if ((pdev->device == 0xa000 && func != 0) ||
-           func != ent->driver_data) {
+       if (func != ent->driver_data) {
                pci_save_state(pdev);        /* to restore SR-IOV later */
-               err = 0;
-               goto out_unmap_bar0;
+               goto sriov;
        }
 
        adapter->pdev = pdev;
@@ -6697,6 +6695,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
        if (is_offload(adapter))
                attach_ulds(adapter);
 
+sriov:
 #ifdef CONFIG_PCI_IOV
        if (func < ARRAY_SIZE(num_vf) && num_vf[func] > 0)
                if (pci_enable_sriov(pdev, num_vf[func]) == 0)