Question about AER in latest kernels (text format)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Good morning Mr. Helgas,
Sorry if I am not posting my question through the proper channel, but I am not so familiar with that.

I have noticed that the Kernel API pci_enable_pcie_error_reporting() has been removed from kernel 6.6

https://lore.kernel.org/all/20230710232136.233034-3-helgaas@xxxxxxxxxx/
"pci_enable_pcie_error_reporting() is used only inside aer.c.  Stop exposing it outside the file."

This caused a build error in our PCIe driver after upgrading the kernel and I fixed it adding a pre-processor check:

#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0)
    result = pci_enable_pcie_error_reporting(dev);
    if(result) {
        err(" Unable to enable PCIe error reporting");
        printk(KERN_WARNING "dg pci_enable_pcie_error_reporting returned %d (ignoring)\n", result);
    }
#else
    printk(KERN_WARNING "pci_enable_pcie_error_reporting is not available in this kernel version\n");
#endif

In the newer kernel docs (see https://www.kernel.org/doc/html/v6.5/PCI/pcieaer-howto.html) this paragraph has been removed:

"8.3.3. helper functions
int pci_enable_pcie_error_reporting(struct pci_dev *dev);
pci_enable_pcie_error_reporting enables the device to send error messages to root port when an error is detected. Note that devices don't enable the error reporting by default, so device drivers need call this function to enable it."

I guess that with the new kernels the AER is implicitly enabled when installing the device (e.g. when pci_device_add is called), but can you confirm this?
Or maybe the call of pci_enable_pcie_error_reporting() was superfluous also in the kernels < 6.6?

Thank you in advance
Best regards

Alberto Amori
Senior Embedded Software Engineer
Phone +41 44 743 73 94
duagon AG I Riedstrasse 12 I 8953 Dietikon I Switzerland I www.duagon.com






[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux