Hi Oza, Thank you for the patch! Yet something to improve: [auto build test ERROR on pci/next] [also build test ERROR on v4.17-rc3 next-20180503] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Oza-Pawandeep/Address-error-and-recovery-for-AER-and-DPC/20180504-050017 base: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git next config: i386-randconfig-a1-05030941 (attached as .config) compiler: gcc-4.9 (Debian 4.9.4-2) 4.9.4 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): drivers/pci/pcie/err.c: In function 'report_error_detected': >> drivers/pci/pcie/err.c:98:3: error: implicit declaration of function 'pci_uevent_ers' [-Werror=implicit-function-declaration] pci_uevent_ers(dev, PCI_ERS_RESULT_NONE); ^ drivers/pci/pcie/err.c: In function 'reset_link': drivers/pci/pcie/err.c:203:5: warning: 'driver' is used uninitialized in this function [-Wuninitialized] if (driver && driver->reset_link) { ^ cc1: some warnings being treated as errors vim +/pci_uevent_ers +98 drivers/pci/pcie/err.c 52 53 static int report_error_detected(struct pci_dev *dev, void *data) 54 { 55 pci_ers_result_t vote; 56 const struct pci_error_handlers *err_handler; 57 struct aer_broadcast_data *result_data; 58 59 result_data = (struct aer_broadcast_data *) data; 60 61 device_lock(&dev->dev); 62 dev->error_state = result_data->state; 63 64 if (!dev->driver || 65 !dev->driver->err_handler || 66 !dev->driver->err_handler->error_detected) { 67 if (result_data->state == pci_channel_io_frozen && 68 dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) { 69 /* 70 * In case of fatal recovery, if one of down- 71 * stream device has no driver. We might be 72 * unable to recover because a later insmod 73 * of a driver for this device is unaware of 74 * its hw state. 75 */ 76 pci_printk(KERN_DEBUG, dev, "device has %s\n", 77 dev->driver ? 78 "no AER-aware driver" : "no driver"); 79 } 80 81 /* 82 * If there's any device in the subtree that does not 83 * have an error_detected callback, returning 84 * PCI_ERS_RESULT_NO_AER_DRIVER prevents calling of 85 * the subsequent mmio_enabled/slot_reset/resume 86 * callbacks of "any" device in the subtree. All the 87 * devices in the subtree are left in the error state 88 * without recovery. 89 */ 90 91 if (dev->hdr_type != PCI_HEADER_TYPE_BRIDGE) 92 vote = PCI_ERS_RESULT_NO_AER_DRIVER; 93 else 94 vote = PCI_ERS_RESULT_NONE; 95 } else { 96 err_handler = dev->driver->err_handler; 97 vote = err_handler->error_detected(dev, result_data->state); > 98 pci_uevent_ers(dev, PCI_ERS_RESULT_NONE); 99 } 100 101 result_data->result = merge_result(result_data->result, vote); 102 device_unlock(&dev->dev); 103 return 0; 104 } 105 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation