1
0
Fork 0
alistair23-linux/arch/s390/pci
Niklas Schnelle 51c9c98a7b s390/pci: Recover handle in clp_set_pci_fn()
[ Upstream commit 17cdec960c ]

When we try to recover a PCI function using

    echo 1 > /sys/bus/pci/devices/<id>/recover

or manually with

    echo 1 > /sys/bus/pci/devices/<id>/remove
    echo 0 > /sys/bus/pci/slots/<slot>/power
    echo 1 > /sys/bus/pci/slots/<slot>/power

clp_disable_fn() / clp_enable_fn() call clp_set_pci_fn() to first
disable and then reenable the function.

When the function is already in the requested state we may be left with
an invalid function handle.

To get a new valid handle we do a clp_list_pci() call. For this we need
both the function ID and function handle in clp_set_pci_fn() so pass the
zdev and get both.

To simplify things also pull setting the refreshed function handle into
clp_set_pci_fn()

Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-24 08:37:03 +01:00
..
Makefile s390/pci: move everything irq related to pci_irq.c 2019-04-29 10:47:01 +02:00
pci.c s390/pci: Recover handle in clp_set_pci_fn() 2020-02-24 08:37:03 +01:00
pci_clp.c s390/pci: Recover handle in clp_set_pci_fn() 2020-02-24 08:37:03 +01: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci_insn.c s390/pci: provide support for MIO instructions 2019-04-29 10:47:01 +02:00
pci_irq.c s390/pci: fix MSI message data 2019-09-16 13:21:51 +02:00
pci_mmio.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
pci_sysfs.c s390/pci: Fix possible deadlock in recover_store() 2020-02-24 08:36:29 +01:00