Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

s390/pci: obtain function handle in hotplug notifier

When using the CLP interface to enable or disable a pci device a
valid function handle needs to be delivered. So far our assumption
was that we always have an up-to-date version of the function handle
(since it doesn't change when the device is in use). This assumption
is incorrect if the pci device is enabled or disabled outside of our
control. When we are notified about such a change we already receive
the new function handle. Just use it.

Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Sebastian Ott and committed by
Martin Schwidefsky
fcf2f402 36d9f4d3

+2
+2
arch/s390/pci/pci_event.c
··· 75 75 if (!zdev || zdev->state == ZPCI_FN_STATE_CONFIGURED) 76 76 break; 77 77 zdev->state = ZPCI_FN_STATE_CONFIGURED; 78 + zdev->fh = ccdf->fh; 78 79 ret = zpci_enable_device(zdev); 79 80 if (ret) 80 81 break; ··· 102 101 if (pdev) 103 102 pci_stop_and_remove_bus_device(pdev); 104 103 104 + zdev->fh = ccdf->fh; 105 105 zpci_disable_device(zdev); 106 106 zdev->state = ZPCI_FN_STATE_STANDBY; 107 107 break;