--- zzzz-none-000/linux-3.10.107/drivers/pci/pcie/aer/aerdrv.c 2017-06-27 09:49:32.000000000 +0000 +++ vr9-7490-729/linux-3.10.107/drivers/pci/pcie/aer/aerdrv.c 2021-11-10 11:53:55.000000000 +0000 @@ -41,6 +41,8 @@ MODULE_DESCRIPTION(DRIVER_DESC); MODULE_LICENSE("GPL"); +extern int ifx_pcie_rc_aer_irq_register(struct pci_dev *dev, void *context); + static int aer_probe(struct pcie_device *dev); static void aer_remove(struct pcie_device *dev); static pci_ers_result_t aer_error_detected(struct pci_dev *dev, @@ -291,6 +293,14 @@ } } +struct pci_dev *aer_dev_to_pci_dev(void *context) +{ + struct pcie_device *dev = (struct pcie_device *)context; + + return dev->port; +} +EXPORT_SYMBOL_GPL(aer_dev_to_pci_dev); + /** * aer_probe - initialize resources * @dev: pointer to the pcie_dev data structure @@ -317,6 +327,9 @@ return -ENOMEM; } +#ifdef CONFIG_IFX_PCIE + ifx_pcie_rc_aer_irq_register(dev->port, dev); +#else /* Request IRQ ISR */ status = request_irq(dev->irq, aer_irq, IRQF_SHARED, "aerdrv", dev); if (status) { @@ -324,6 +337,7 @@ aer_remove(dev); return status; } +#endif /* CONFIG_IFX_PCIE */ rpc->isr = 1;