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>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
c1f732ad76
commit
fb145456fa
@@ -1048,10 +1048,15 @@ static long genwqe_ioctl(struct file *filp, unsigned int cmd,
|
||||
int rc = 0;
|
||||
struct genwqe_file *cfile = (struct genwqe_file *)filp->private_data;
|
||||
struct genwqe_dev *cd = cfile->cd;
|
||||
struct pci_dev *pci_dev = cd->pci_dev;
|
||||
struct genwqe_reg_io __user *io;
|
||||
u64 val;
|
||||
u32 reg_offs;
|
||||
|
||||
/* Return -EIO if card hit EEH */
|
||||
if (pci_channel_offline(pci_dev))
|
||||
return -EIO;
|
||||
|
||||
if (_IOC_TYPE(cmd) != GENWQE_IOC_CODE)
|
||||
return -EINVAL;
|
||||
|
||||
|
Reference in New Issue
Block a user