diff options
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 4247356c16ff..1a162d21d8ac 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |||
@@ -6527,11 +6527,9 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
6527 | 6527 | ||
6528 | /* We control everything through one PF */ | 6528 | /* We control everything through one PF */ |
6529 | func = SOURCEPF_GET(readl(adapter->regs + PL_WHOAMI)); | 6529 | func = SOURCEPF_GET(readl(adapter->regs + PL_WHOAMI)); |
6530 | if ((pdev->device == 0xa000 && func != 0) || | 6530 | if (func != ent->driver_data) { |
6531 | func != ent->driver_data) { | ||
6532 | pci_save_state(pdev); /* to restore SR-IOV later */ | 6531 | pci_save_state(pdev); /* to restore SR-IOV later */ |
6533 | err = 0; | 6532 | goto sriov; |
6534 | goto out_unmap_bar0; | ||
6535 | } | 6533 | } |
6536 | 6534 | ||
6537 | adapter->pdev = pdev; | 6535 | adapter->pdev = pdev; |
@@ -6697,6 +6695,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
6697 | if (is_offload(adapter)) | 6695 | if (is_offload(adapter)) |
6698 | attach_ulds(adapter); | 6696 | attach_ulds(adapter); |
6699 | 6697 | ||
6698 | sriov: | ||
6700 | #ifdef CONFIG_PCI_IOV | 6699 | #ifdef CONFIG_PCI_IOV |
6701 | if (func < ARRAY_SIZE(num_vf) && num_vf[func] > 0) | 6700 | if (func < ARRAY_SIZE(num_vf) && num_vf[func] > 0) |
6702 | if (pci_enable_sriov(pdev, num_vf[func]) == 0) | 6701 | if (pci_enable_sriov(pdev, num_vf[func]) == 0) |