diff options
author | Niklas Schnelle <schnelle@linux.ibm.com> | 2019-12-17 09:34:46 +0100 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2020-01-22 13:05:34 +0100 |
commit | 17cdec960cf776b20b1fb08c622221babe591d51 (patch) | |
tree | 118efa4a32aea55bbafc79fc1d6d95ea4559deba /arch/s390/pci/pci.c | |
parent | d1eef1c619749b2a57e514a3fa67d9a516ffa919 (diff) | |
download | linux-17cdec960cf776b20b1fb08c622221babe591d51.tar.gz linux-17cdec960cf776b20b1fb08c622221babe591d51.tar.bz2 linux-17cdec960cf776b20b1fb08c622221babe591d51.zip |
s390/pci: Recover handle in clp_set_pci_fn()
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>
Diffstat (limited to 'arch/s390/pci/pci.c')
-rw-r--r-- | arch/s390/pci/pci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/pci/pci.c b/arch/s390/pci/pci.c index 8e872951c07b..bc61ea18e88d 100644 --- a/arch/s390/pci/pci.c +++ b/arch/s390/pci/pci.c @@ -939,5 +939,5 @@ subsys_initcall_sync(pci_base_init); void zpci_rescan(void) { if (zpci_is_enabled()) - clp_rescan_pci_devices_simple(); + clp_rescan_pci_devices_simple(NULL); } |