diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2016-01-22 08:04:18 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2016-01-26 06:46:28 -0500 |
commit | 8ead7efb6379354d0d31efb39342f4399c87cb67 (patch) | |
tree | d987d3c657bb8299926f55e253768dd6c301b439 | |
parent | c0cabaddeeeab13db8ef4e275ab5c7c0e8746324 (diff) |
s390/pci: set error state for unusable functions
We receive special notifications from firmware when an error was detected
and a pci function became unusable. Set the error_state accordingly to give
device drivers a hint that they don't need to try error recovery.
Suggested-by: Alexander Schmidt <alexschm@de.ibm.com>
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>
-rw-r--r-- | arch/s390/pci/pci_event.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/s390/pci/pci_event.c b/arch/s390/pci/pci_event.c index 369a3e05d468..b0e04751c5d5 100644 --- a/arch/s390/pci/pci_event.c +++ b/arch/s390/pci/pci_event.c | |||
@@ -53,6 +53,11 @@ static void __zpci_event_error(struct zpci_ccdf_err *ccdf) | |||
53 | 53 | ||
54 | pr_err("%s: Event 0x%x reports an error for PCI function 0x%x\n", | 54 | pr_err("%s: Event 0x%x reports an error for PCI function 0x%x\n", |
55 | pdev ? pci_name(pdev) : "n/a", ccdf->pec, ccdf->fid); | 55 | pdev ? pci_name(pdev) : "n/a", ccdf->pec, ccdf->fid); |
56 | |||
57 | if (!pdev) | ||
58 | return; | ||
59 | |||
60 | pdev->error_state = pci_channel_io_perm_failure; | ||
56 | } | 61 | } |
57 | 62 | ||
58 | void zpci_event_error(void *data) | 63 | void zpci_event_error(void *data) |