<html><body>
<p><tt>Linas Vepstas &lt;linasvepstas@gmail.com&gt; wrote on 07/23/2009 07:44:33 AM:<br>
<br>
&gt; 2009/7/15 Mike Mason &lt;mmlnx@us.ibm.com&gt;:<br>
&gt; &gt; By default, EEH does what's known as a &quot;hot reset&quot; during error recovery of<br>
&gt; &gt; a PCI Express device.  We've found a case where the device needs a<br>
&gt; &gt; &quot;fundamental reset&quot; to recover properly.  The current PCI error recovery and<br>
&gt; &gt; EEH frameworks do not support this distinction.<br>
&gt; &gt;<br>
&gt; &gt; The attached patch (courtesy of Richard Lary) adds a bit field to pci_dev<br>
&gt; &gt; that indicates whether the device requires a fundamental reset during error<br>
&gt; &gt; recovery.  This bit can be checked by EEH to determine which reset type is<br>
&gt; &gt; required.<br>
&gt; &gt;<br>
&gt; &gt; This patch supersedes the previously submitted patch that implemented a<br>
&gt; &gt; reset type callback.<br>
&gt; &gt;<br>
&gt; &gt; Please review and let me know of any concerns.<br>
&gt; <br>
&gt; I like this patch a *lot* better .. it is vastly simpler, more direct.<br>
&gt; <br>
&gt; <br>
&gt; &gt; diff -uNrp a/include/linux/pci.h b/include/linux/pci.h<br>
&gt; &gt; --- a/include/linux/pci.h       2009-07-13 14:25:37.000000000 -0700<br>
&gt; &gt; +++ b/include/linux/pci.h       2009-07-15 10:25:37.000000000 -0700<br>
&gt; &gt; @@ -273,6 +273,7 @@ struct pci_dev {<br>
&gt; &gt;        unsigned int    ari_enabled:1;  /* ARI forwarding */<br>
&gt; &gt;        unsigned int    is_managed:1;<br>
&gt; &gt;        unsigned int    is_pcie:1;<br>
&gt; &gt; +       unsigned int    fndmntl_rst_rqd:1; /* Dev requires fundamental reset<br>
&gt; &gt; */<br>
&gt; &gt;        unsigned int    state_saved:1;<br>
&gt; &gt;        unsigned int    is_physfn:1;<br>
&gt; &gt;        unsigned int    is_virtfn:1;<br>
&gt; <br>
&gt; As Ben points out, the name is awkward. &nbsp;How about needs_freset ?<br>
</tt><br>
<tt>I am OK with name change.</tt><br>
<tt>&nbsp;<br>
&gt; Since this affects the entire pci subsystem, it should be documented<br>
&gt; properly. &nbsp;The &quot;pci error recovery&quot; subsystem was designed to be<br>
&gt; usable in other architectures, and so the error recovery docs should<br>
&gt; take at least a paragraph to describe what this flag means, and when<br>
&gt; its supposed to be used.<br>
</tt><br>
<tt>I will update the documentation, are you referring to</tt><br>
<tt>Documentation/powerpc/eeh-pci-error-recovery.txt</tt><br>
<tt>or some other documentation?</tt><br>
<tt>&nbsp;<br>
&gt; Providing the docs patch together with the pci.h patch *only* would<br>
&gt; probably simplify acceptance by the PCI community.<br>
&gt; <br>
&gt; --linas<br>
</tt></body></html>