[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID:
<GVAP278MB0119BBB30DC2065981D978B5968D2@GVAP278MB0119.CHEP278.PROD.OUTLOOK.COM>
Date: Tue, 20 Aug 2024 07:54:19 +0000
From: "Amori, Alberto" <Alberto.Amori@...gon.com>
To: "helgaas@...nel.org" <helgaas@...nel.org>
CC: "bhelgaas@...gle.com" <bhelgaas@...gle.com>, "linux-pci@...r.kernel.org"
<linux-pci@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linuxppc-dev@...ts.ozlabs.org"
<linuxppc-dev@...ts.ozlabs.org>
Subject: Question about AER in latest kernels (text format)
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@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
Powered by blists - more mailing lists