diff options
author | Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com> | 2014-06-04 10:57:51 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-07-09 14:14:27 -0700 |
commit | fb145456fa4f4311f90703aeee058bab3b274bf8 (patch) | |
tree | 980ae85a3c35b8b574dddeaf96bf84d41dbb83d3 /drivers/misc/genwqe/card_ddcb.c | |
parent | c1f732ad767e37bd1d41043cbdefc0874b4d05e5 (diff) | |
download | linux-stable-fb145456fa4f4311f90703aeee058bab3b274bf8.tar.gz linux-stable-fb145456fa4f4311f90703aeee058bab3b274bf8.tar.bz2 linux-stable-fb145456fa4f4311f90703aeee058bab3b274bf8.zip |
GenWQE: Add support for EEH error recovery
This patch implements the callbacks and functions necessary to have EEH
recovery support.
It adds a config option to enable or disable explicit calls to trigger
platform specific mechanisms on error recovery paths. This option is
enabled by default only on PPC64 systems and can be overritten via
debugfs. If this option is enabled, on the error recovery path the
driver will call pci_channel_offline() to check for error condition and
issue non-raw MMIO reads to trigger early EEH detection in case of
hardware failures. This is necessary since the driver MMIO helper
funtions use raw accessors.
Signed-off-by: Kleber Sacilotto de Souza <klebers@linux.vnet.ibm.com>
Acked-by: Frank Haverkamp <haver@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/genwqe/card_ddcb.c')
-rw-r--r-- | drivers/misc/genwqe/card_ddcb.c | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/drivers/misc/genwqe/card_ddcb.c b/drivers/misc/genwqe/card_ddcb.c index c8046db2d5a2..f0de6153bea2 100644 --- a/drivers/misc/genwqe/card_ddcb.c +++ b/drivers/misc/genwqe/card_ddcb.c @@ -1118,7 +1118,21 @@ static irqreturn_t genwqe_pf_isr(int irq, void *dev_id) * safer, but slower for the good-case ... See above. */ gfir = __genwqe_readq(cd, IO_SLC_CFGREG_GFIR); - if ((gfir & GFIR_ERR_TRIGGER) != 0x0) { + if (((gfir & GFIR_ERR_TRIGGER) != 0x0) && + !pci_channel_offline(pci_dev)) { + + if (cd->use_platform_recovery) { + /* + * Since we use raw accessors, EEH errors won't be + * detected by the platform until we do a non-raw + * MMIO or config space read + */ + readq(cd->mmio + IO_SLC_CFGREG_GFIR); + + /* Don't do anything if the PCI channel is frozen */ + if (pci_channel_offline(pci_dev)) + goto exit; + } wake_up_interruptible(&cd->health_waitq); @@ -1126,12 +1140,12 @@ static irqreturn_t genwqe_pf_isr(int irq, void *dev_id) * By default GFIRs causes recovery actions. This * count is just for debug when recovery is masked. */ - printk_ratelimited(KERN_ERR - "%s %s: [%s] GFIR=%016llx\n", - GENWQE_DEVNAME, dev_name(&pci_dev->dev), - __func__, gfir); + dev_err_ratelimited(&pci_dev->dev, + "[%s] GFIR=%016llx\n", + __func__, gfir); } + exit: return IRQ_HANDLED; } |