mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
s390/pci: map IOV resources
Map IOV resources such that pci common code recognizes the IOV capability of PFs. Signed-off-by: Sebastian Ott <sebott@linux.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
e8e25a7718
commit
cfbb4a7ab6
1 changed files with 20 additions and 0 deletions
|
@ -482,6 +482,15 @@ void arch_teardown_msi_irqs(struct pci_dev *pdev)
|
|||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
static struct resource iov_res = {
|
||||
.name = "PCI IOV res",
|
||||
.start = 0,
|
||||
.end = -1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
};
|
||||
#endif
|
||||
|
||||
static void zpci_map_resources(struct pci_dev *pdev)
|
||||
{
|
||||
resource_size_t len;
|
||||
|
@ -495,6 +504,17 @@ static void zpci_map_resources(struct pci_dev *pdev)
|
|||
(resource_size_t __force) pci_iomap(pdev, i, 0);
|
||||
pdev->resource[i].end = pdev->resource[i].start + len - 1;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PCI_IOV
|
||||
i = PCI_IOV_RESOURCES;
|
||||
|
||||
for (; i < PCI_SRIOV_NUM_BARS + PCI_IOV_RESOURCES; i++) {
|
||||
len = pci_resource_len(pdev, i);
|
||||
if (!len)
|
||||
continue;
|
||||
pdev->resource[i].parent = &iov_res;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void zpci_unmap_resources(struct pci_dev *pdev)
|
||||
|
|
Loading…
Reference in a new issue