aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/pci
diff options
context:
space:
mode:
authorSebastian Ott <sebott@linux.vnet.ibm.com>2013-12-18 10:46:02 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2013-12-30 05:28:47 -0500
commitfcf2f402937a6696f6fa2a1aa882c5075e5fac34 (patch)
treee1a0020a0f2efce7444fe7ec7a166f662b71fd8c /arch/s390/pci
parent36d9f4d3b68c7035ead3850dc85f310a579ed0eb (diff)
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>
Diffstat (limited to 'arch/s390/pci')
-rw-r--r--arch/s390/pci/pci_event.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c
index 800f064b0da7..069607209a30 100644
--- a/arch/s390/pci/pci_event.c
+++ b/arch/s390/pci/pci_event.c
@@ -75,6 +75,7 @@ void zpci_event_availability(void *data)
75 if (!zdev || zdev->state == ZPCI_FN_STATE_CONFIGURED) 75 if (!zdev || zdev->state == ZPCI_FN_STATE_CONFIGURED)
76 break; 76 break;
77 zdev->state = ZPCI_FN_STATE_CONFIGURED; 77 zdev->state = ZPCI_FN_STATE_CONFIGURED;
78 zdev->fh = ccdf->fh;
78 ret = zpci_enable_device(zdev); 79 ret = zpci_enable_device(zdev);
79 if (ret) 80 if (ret)
80 break; 81 break;
@@ -101,6 +102,7 @@ void zpci_event_availability(void *data)
101 if (pdev) 102 if (pdev)
102 pci_stop_and_remove_bus_device(pdev); 103 pci_stop_and_remove_bus_device(pdev);
103 104
105 zdev->fh = ccdf->fh;
104 zpci_disable_device(zdev); 106 zpci_disable_device(zdev);
105 zdev->state = ZPCI_FN_STATE_STANDBY; 107 zdev->state = ZPCI_FN_STATE_STANDBY;
106 break; 108 break;