diff options
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r-- | drivers/pci/iov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 1fe2d6fb19d5..9dce7c5e2a77 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -84,6 +84,7 @@ static int virtfn_add(struct pci_dev *dev, int id, int reset) | |||
84 | virtfn->dev.parent = dev->dev.parent; | 84 | virtfn->dev.parent = dev->dev.parent; |
85 | virtfn->physfn = pci_dev_get(dev); | 85 | virtfn->physfn = pci_dev_get(dev); |
86 | virtfn->is_virtfn = 1; | 86 | virtfn->is_virtfn = 1; |
87 | virtfn->multifunction = 0; | ||
87 | 88 | ||
88 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { | 89 | for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { |
89 | res = dev->resource + PCI_IOV_RESOURCES + i; | 90 | res = dev->resource + PCI_IOV_RESOURCES + i; |
@@ -441,6 +442,7 @@ static int sriov_init(struct pci_dev *dev, int pos) | |||
441 | 442 | ||
442 | found: | 443 | found: |
443 | pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, ctrl); | 444 | pci_write_config_word(dev, pos + PCI_SRIOV_CTRL, ctrl); |
445 | pci_write_config_word(dev, pos + PCI_SRIOV_NUM_VF, 0); | ||
444 | pci_read_config_word(dev, pos + PCI_SRIOV_VF_OFFSET, &offset); | 446 | pci_read_config_word(dev, pos + PCI_SRIOV_VF_OFFSET, &offset); |
445 | pci_read_config_word(dev, pos + PCI_SRIOV_VF_STRIDE, &stride); | 447 | pci_read_config_word(dev, pos + PCI_SRIOV_VF_STRIDE, &stride); |
446 | if (!offset || (total > 1 && !stride)) | 448 | if (!offset || (total > 1 && !stride)) |