diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2012-01-09 20:14:07 +0400 |
|---|---|---|
| committer | Arnd Bergmann <arnd@arndb.de> | 2012-01-09 20:14:07 +0400 |
| commit | 142f2101a86ade2d6c9dfbedf82e1b5b31c8fce6 (patch) | |
| tree | 8cced517382b7087df4e89a9e2a00ccac9676a92 /drivers/pci/iov.c | |
| parent | 155bc27fdfbdf65a07a4f8ef3eafa25e57d8b511 (diff) | |
| parent | a07613a54d700a974f3a4a657da78ef5d097315d (diff) | |
| download | linux-142f2101a86ade2d6c9dfbedf82e1b5b31c8fce6.tar.xz | |
Merge branch 'samsung/cleanup' into samsung/driver
Conflicts:
arch/arm/mach-s5p64x0/cpu.c -> common.c
More changes to a file that got moved into common.c,
see previous conflict resolutions.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Diffstat (limited to 'drivers/pci/iov.c')
| -rw-r--r-- | drivers/pci/iov.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index b82c155d7b37..1969a3ee3058 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c @@ -283,6 +283,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) struct resource *res; struct pci_dev *pdev; struct pci_sriov *iov = dev->sriov; + int bars = 0; if (!nr_virtfn) return 0; @@ -307,6 +308,7 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) nres = 0; for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) { + bars |= (1 << (i + PCI_IOV_RESOURCES)); res = dev->resource + PCI_IOV_RESOURCES + i; if (res->parent) nres++; @@ -324,6 +326,11 @@ static int sriov_enable(struct pci_dev *dev, int nr_virtfn) return -ENOMEM; } + if (pci_enable_resources(dev, bars)) { + dev_err(&dev->dev, "SR-IOV: IOV BARS not allocated\n"); + return -ENOMEM; + } + if (iov->link != dev->devfn) { pdev = pci_get_slot(dev->bus, iov->link); if (!pdev) |
