diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2015-06-16 18:58:37 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2015-06-18 15:45:54 +0200 |
commit | 7fc611ff3ff1a0b8f5a6569fe75a97d6c70bed6c (patch) | |
tree | a03dcbbb7d77dead865832bc9c8eede6c7588e81 /arch/s390/pci | |
parent | 0c36b8ac7052eafed952ad3487ed8671dc9dc5f9 (diff) | |
download | op-kernel-dev-7fc611ff3ff1a0b8f5a6569fe75a97d6c70bed6c.zip op-kernel-dev-7fc611ff3ff1a0b8f5a6569fe75a97d6c70bed6c.tar.gz |
s390/pci: improve handling of hotplug event 0x301
Hypervisors may deliver event 0x301 not only for standby
but also for reserved devices.
Just handle event 0x301 regardless of the device's state.
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.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c index 460fdb2..ed2394d 100644 --- a/arch/s390/pci/pci_event.c +++ b/arch/s390/pci/pci_event.c @@ -75,7 +75,13 @@ static void __zpci_event_availability(struct zpci_ccdf_avail *ccdf) zpci_err_hex(ccdf, sizeof(*ccdf)); switch (ccdf->pec) { - case 0x0301: /* Standby -> Configured */ + case 0x0301: /* Reserved|Standby -> Configured */ + if (!zdev) { + ret = clp_add_pci_device(ccdf->fid, ccdf->fh, 0); + if (ret) + break; + zdev = get_zdev_by_fid(ccdf->fid); + } if (!zdev || zdev->state != ZPCI_FN_STATE_STANDBY) break; zdev->state = ZPCI_FN_STATE_CONFIGURED; |