diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2017-06-10 13:54:44 +0200 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2017-06-28 07:32:08 +0200 |
commit | 4dfbd3efe3f0cf9ff1325b87491e1b1fe07afaf1 (patch) | |
tree | 61652229d4efa449d991a704f1679be377b8f12a /arch/s390/pci/pci_insn.c | |
parent | s390/pci: don't cleanup in arch_setup_msi_irqs (diff) | |
download | linux-4dfbd3efe3f0cf9ff1325b87491e1b1fe07afaf1.tar.xz linux-4dfbd3efe3f0cf9ff1325b87491e1b1fe07afaf1.zip |
s390/pci: improve error handling during interrupt deregistration
When we ask a function to stop creating interrupts this may fail
due to the function being already gone (e.g. after hot-unplug).
Consequently we don't free associated resources like summary bits
and bit vectors used for irq processing. This could lead to
situations where we ran out of these resources and fail to setup
new interrupts.
The fix is to just ignore the errors in cases where we can be
sure no new interrupts are generated.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Reviewed-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/pci/pci_insn.c')
-rw-r--r-- | arch/s390/pci/pci_insn.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/arch/s390/pci/pci_insn.c b/arch/s390/pci/pci_insn.c index fa8d7d4b9751..ea34086c8674 100644 --- a/arch/s390/pci/pci_insn.c +++ b/arch/s390/pci/pci_insn.c @@ -40,20 +40,20 @@ static inline u8 __mpcifc(u64 req, struct zpci_fib *fib, u8 *status) return cc; } -int zpci_mod_fc(u64 req, struct zpci_fib *fib) +u8 zpci_mod_fc(u64 req, struct zpci_fib *fib, u8 *status) { - u8 cc, status; + u8 cc; do { - cc = __mpcifc(req, fib, &status); + cc = __mpcifc(req, fib, status); if (cc == 2) msleep(ZPCI_INSN_BUSY_DELAY); } while (cc == 2); if (cc) - zpci_err_insn(cc, status, req, 0); + zpci_err_insn(cc, *status, req, 0); - return (cc) ? -EIO : 0; + return cc; } /* Refresh PCI Translations */ |