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-helg...@kernel.org/
"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


InnoTrans 2024 I 24 - 27 September 2024 I Messe Berlin I MEET OUR EXPERTS I 
BOOTH 740 - Hall 27

This message and/or attachments may be privileged or confidential. If you are 
not the intended recipient, you are hereby notified that you have received this 
transmittal in error; any review, dissemination, or copying is strictly 
prohibited. If you received this transmittal in error, please notify us 
immediately by reply and immediately delete this message and all its 
attachments. Thank you.

Reply via email to