linux-stable/arch/s390/pci
Niklas Schnelle 3cddb79afc s390/pci: fix zpci_bus_link_virtfn()
We were missing the pci_dev_put() for candidate PFs.  Furhtermore in
discussion with upstream it turns out that somewhat counterintuitively
some common code, in particular the vfio-pci driver, assumes that
pdev->is_virtfn always implies that pdev->physfn is set, i.e. that VFs
are always linked.
While POWER does seem to set pdev->is_virtfn even for unlinked functions
(see comments in arch/powerpc/kernel/eeh.c:eeh_debugfs_break_device())
for now just be safe and only set pdev->is_virtfn on linking.
Also make sure that we only search for parent PFs if the zbus is
multifunction and we thus know the devfn values supplied by firmware
come from the RID.

Fixes: e5794cf1a2 ("s390/pci: create links between PFs and VFs")
Cc: <stable@vger.kernel.org> # 5.8
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
2020-08-17 13:17:18 +02:00
..
Makefile s390/pci: create zPCI bus 2020-04-28 13:49:46 +02:00
pci.c s390/pci: ioremap() align with generic code 2020-05-20 10:22:52 +02:00
pci_bus.c s390/pci: fix zpci_bus_link_virtfn() 2020-08-17 13:17:18 +02:00
pci_bus.h s390/pci: Handling multifunctions 2020-04-28 13:49:47 +02:00
pci_clp.c s390/pci: Log new handle in clp_disable_fh() 2020-05-28 12:26:03 +02:00
pci_debug.c locking/atomic, s390/pci: Remove redundant casts 2019-06-03 12:32:57 +02:00
pci_dma.c dma-mapping updates for 5.4: 2019-09-19 13:27:23 -07:00
pci_event.c s390/pci: ignore stale configuration request event 2020-08-17 13:17:05 +02:00
pci_insn.c s390/pci: provide support for MIO instructions 2019-04-29 10:47:01 +02:00
pci_irq.c s390/pci: do not set affinity for floating irqs 2020-04-22 16:20:55 +02:00
pci_mmio.c s390/pci: clarify comment in s390_mmio_read/write 2020-07-27 10:33:24 +02:00
pci_sysfs.c s390/pci: create zPCI bus 2020-04-28 13:49:46 +02:00