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>
This commit is contained in:
Sebastian Ott
2017-06-10 13:54:44 +02:00
committed by Martin Schwidefsky
parent 795818e8bf
commit 4dfbd3efe3
3 changed files with 25 additions and 16 deletions

View File

@@ -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 */