<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:12.0pt;
font-family:"Aptos",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE-CH" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Good morning Mr. Helgas,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Sorry if I am not posting my question through the proper channel, but I am not so familiar with that.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">I have noticed that the Kernel API pci_enable_pcie_error_reporting() has been removed from kernel 6.6<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><a href="https://lore.kernel.org/all/20230710232136.233034-3-helgaas@kernel.org/"><span lang="EN-US">https://lore.kernel.org/all/20230710232136.233034-3-helgaas@kernel.org/</span></a></span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">"pci_enable_pcie_error_reporting() is used only inside aer.c. Stop exposing it outside the file."<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">This caused a build error in our PCIe driver after upgrading the kernel and I fixed it adding a pre-processor check:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:red">#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 6, 0)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> result = pci_enable_pcie_error_reporting(dev);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> if(result) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> err(" Unable to enable PCIe error reporting");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> printk(KERN_WARNING "dg pci_enable_pcie_error_reporting returned %d (ignoring)\n", result);<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"> }<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:red">#else<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:red"> printk(KERN_WARNING "pci_enable_pcie_error_reporting is not available in this kernel version\n");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:red">#endif<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">In the newer kernel docs (see
<a href="https://www.kernel.org/doc/html/v6.5/PCI/pcieaer-howto.html">https://www.kernel.org/doc/html/v6.5/PCI/pcieaer-howto.html</a>) this paragraph has been removed:<o:p></o:p></span></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></i></b></p>
<p class="MsoNormal"><b><i><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">"8.3.3. helper functions<o:p></o:p></span></i></b></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">int pci_enable_pcie_error_reporting(struct pci_dev *dev);<o:p></o:p></span></i></p>
<p class="MsoNormal"><i><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">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."<o:p></o:p></span></i></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">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?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Or maybe the call of pci_enable_pcie_error_reporting() was superfluous also in the kernels < 6.6?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Thank you in advance<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif">Best regards<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p> </o:p></span></p>
<p><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#002663;mso-fareast-language:EN-US">Alberto Amori</span></b><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US"><br>
</span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Senior Embedded Software Engineer<br>
Phone +41 44 743 73 94</span><span lang="EN-US"><o:p></o:p></span></p>
<p><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">duagon AG</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">
<b><span style="color:#CE692F">I</span></b> Riedstrasse 12 <b><span style="color:#CE692F">I</span></b> 8953</span><span lang="EN-US">
</span><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;mso-fareast-language:EN-US">Dietikon
<b><span style="color:#CE692F">I</span></b> Switzerland <b><span style="color:#CE692F">I</span></b>
</span><span lang="DE" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black;mso-fareast-language:EN-US">www.duagon.com</span><o:p></o:p></p>
<p style="mso-margin-top-alt:0cm;margin-right:0cm;margin-bottom:6.0pt;margin-left:0cm">
<img border="0" width="600" height="3" style="width:6.25in;height:.0312in" id="_x0030_.ott721kvj48" src="cid:image001.jpg@01DAF2E2.19B9D230" alt="2024-05-02_signatur-600x30px_linie3.jpg"><o:p></o:p></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#002663">InnoTrans 2024 </span></b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#002663">I 24 - 27 September 2024
I Messe Berlin I MEET OUR EXPERTS I </span><b><span lang="EN-US" style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#CE692F">BOOTH 740 - Hall 27</span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Calibri",sans-serif"><br>
<br>
</span><span lang="EN-US" style="font-size:9.0pt;font-family:"Calibri",sans-serif">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.
</span><span style="font-size:9.0pt;font-family:"Calibri",sans-serif">Thank you.</span><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"><o:p></o:p></span></p>
</div>
</body>
</html>