diff options
author | Pierre Morel <pmorel@linux.ibm.com> | 2020-04-22 16:15:23 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-04-28 14:49:47 +0300 |
commit | 44510d6fa0c00aa90b80075caa6b313b25927475 (patch) | |
tree | 23c0c41788e48e66cd343b7db76e5595bbc037d6 /arch/s390/pci/pci_event.c | |
parent | 65e450a9f9adabf3de1305a4c616f1313df402a3 (diff) | |
download | linux-44510d6fa0c00aa90b80075caa6b313b25927475.tar.xz |
s390/pci: Handling multifunctions
We allow multiple functions on a single bus.
We suppress the ZPCI_DEVFN definition and replace its
occurences with zpci->devfn.
We verify the number of device during the registration.
There can never be more domains in use than existing
devices, so we do not need to verify the count of domain
after having verified the count of devices.
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci_event.c')
-rw-r--r-- | arch/s390/pci/pci_event.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c index c296214f0a19..08e1d619398e 100644 --- a/arch/s390/pci/pci_event.c +++ b/arch/s390/pci/pci_event.c @@ -55,7 +55,7 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf) zpci_err_hex(ccdf, sizeof(*ccdf)); if (zdev) - pdev = pci_get_slot(zdev->zbus->bus, ZPCI_DEVFN); + pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); pr_err("%s: Event 0x%x reports an error for PCI function 0x%x\n", pdev ? pci_name(pdev) : "n/a", ccdf->pec, ccdf->fid); @@ -81,7 +81,7 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf) int ret; if (zdev && zdev->zbus && zdev->zbus->bus) - pdev = pci_get_slot(zdev->zbus->bus, ZPCI_DEVFN); + pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); zpci_err("avail CCDF:\n"); zpci_err_hex(ccdf, sizeof(*ccdf)); |