diff options
Diffstat (limited to 'drivers/pci/iov.c')
-rw-r--r-- | drivers/pci/iov.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c index 4d109c07294a..4b3a4eaad996 100644 --- a/drivers/pci/iov.c +++ b/drivers/pci/iov.c | |||
@@ -479,20 +479,16 @@ void pci_iov_release(struct pci_dev *dev) | |||
479 | * pci_iov_resource_bar - get position of the SR-IOV BAR | 479 | * pci_iov_resource_bar - get position of the SR-IOV BAR |
480 | * @dev: the PCI device | 480 | * @dev: the PCI device |
481 | * @resno: the resource number | 481 | * @resno: the resource number |
482 | * @type: the BAR type to be filled in | ||
483 | * | 482 | * |
484 | * Returns position of the BAR encapsulated in the SR-IOV capability. | 483 | * Returns position of the BAR encapsulated in the SR-IOV capability. |
485 | */ | 484 | */ |
486 | int pci_iov_resource_bar(struct pci_dev *dev, int resno, | 485 | int pci_iov_resource_bar(struct pci_dev *dev, int resno) |
487 | enum pci_bar_type *type) | ||
488 | { | 486 | { |
489 | if (resno < PCI_IOV_RESOURCES || resno > PCI_IOV_RESOURCE_END) | 487 | if (resno < PCI_IOV_RESOURCES || resno > PCI_IOV_RESOURCE_END) |
490 | return 0; | 488 | return 0; |
491 | 489 | ||
492 | BUG_ON(!dev->is_physfn); | 490 | BUG_ON(!dev->is_physfn); |
493 | 491 | ||
494 | *type = pci_bar_unknown; | ||
495 | |||
496 | return dev->sriov->pos + PCI_SRIOV_BAR + | 492 | return dev->sriov->pos + PCI_SRIOV_BAR + |
497 | 4 * (resno - PCI_IOV_RESOURCES); | 493 | 4 * (resno - PCI_IOV_RESOURCES); |
498 | } | 494 | } |
@@ -510,13 +506,12 @@ int pci_iov_resource_bar(struct pci_dev *dev, int resno, | |||
510 | resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno) | 506 | resource_size_t pci_sriov_resource_alignment(struct pci_dev *dev, int resno) |
511 | { | 507 | { |
512 | struct resource tmp; | 508 | struct resource tmp; |
513 | enum pci_bar_type type; | 509 | int reg = pci_iov_resource_bar(dev, resno); |
514 | int reg = pci_iov_resource_bar(dev, resno, &type); | ||
515 | 510 | ||
516 | if (!reg) | 511 | if (!reg) |
517 | return 0; | 512 | return 0; |
518 | 513 | ||
519 | __pci_read_base(dev, type, &tmp, reg); | 514 | __pci_read_base(dev, pci_bar_unknown, &tmp, reg); |
520 | return resource_alignment(&tmp); | 515 | return resource_alignment(&tmp); |
521 | } | 516 | } |
522 | 517 | ||