<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 12 (filtered medium)">
<title>RE: [PATCH 4/4][v2] rapidio, powerpc/85xx: Error interrupt handler for
sRIO.</title>
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:SimSun;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
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=EN-US link=blue vlink=purple>

<div class=WordSection1>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'><o:p> </o:p></span></p>

<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>Best Regards,</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> <br>
</span><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:blue'>Shaohui Xie</span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'> <o:p></o:p></span></p>

</div>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>

<div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'>

<div>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Bounine, Alexandre
[mailto:Alexandre.Bounine@idt.com] <br>
<b>Sent:</b> Tuesday, November 16, 2010 10:01 PM<br>
<b>To:</b> Xie Shaohui-B21989; akpm@linux-foundation.org<br>
<b>Cc:</b> linux-kernel@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Li
Yang-R58472; Gala Kumar-B11780; Zang Roy-R61911<br>
<b>Subject:</b> RE: [PATCH 4/4][v2] rapidio, powerpc/85xx: Error interrupt
handler for sRIO.<o:p></o:p></span></p>

</div>

</div>

<p class=MsoNormal><o:p> </o:p></p>

<p style='margin-bottom:12.0pt'><span style='font-size:10.0pt'>> From:
Shaohui Xie [<a href="mailto:b21989@freescale.com">mailto:b21989@freescale.com</a>]<br>
><br>
> The sRIO controller reports errors to the core with one signal, it<br>
uses<br>
> register EPWISR to provides the core quick access to where the error<br>
occurred.<br>
> The EPWISR indicates that there are 4 interrupts sources, port1,<br>
port2, message<br>
> unit and port write receive, but the sRIO driver does not support<br>
port2<br>
> for now, still the handler takes care of port2.<br>
> Currently the handler only clear error status without any recovery.<br>
><br>
<br>
Do these dual-RIO controllers have only one port-write interrupt?<br>
(sorry, user manuals are not available for download from FSL).  <span
style='color:#1F497D'><o:p></o:p></span></span></p>

<p style='margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>[Xie Shaohui] Yes, only one inbound port-write
interrupt.<o:p></o:p></span></i></b></p>

<p style='margin-bottom:12.0pt'><span style='font-size:10.0pt'><br>
<br>
> @@ -1082,14 +1142,24 @@ fsl_rio_port_write_handler(int irq, void<br>
*dev_instance)<br>
>       ipwsr = in_be32(&priv->msg_regs->pwsr);<br>
><br>
>       epwisr = in_be32(priv->regs_win +
RIO_EPWISR);<br>
> -     if (epwisr & 0x80000000) {<br>
> +     if (epwisr & EPWISR_ERR_PINT1) {<br>
>              
tmp = in_be32(priv->regs_win + RIO_LTLEDCSR);<br>
>              
pr_info("RIO_LTLEDCSR = 0x%x\n", tmp);<br>
> -            
out_be32(priv->regs_win + RIO_LTLEDCSR, 0);<br>
> +            
port_error_handler(port, 0);<br>
> +     }<br>
> +<br>
> +     if (epwisr & EPWISR_ERR_PINT2) {<br>
> +            
pr_info("RIO: port2 error\n");<br>
> +            
port_error_handler(port, 1);<br>
> +     }<br>
> +<br>
> +     if (epwisr & EPWISR_ERR_MU) {<br>
> +            
pr_info("RIO: message unit error\n");<br>
> +            
msg_unit_error_handler(port);<br>
>       }<br>
><br>
> -     if (!(epwisr & 0x00000001))<br>
> -            
return IRQ_HANDLED;<br>
> +     if (!(epwisr & EPWISR_ERR_PW))<br>
> +            
return IRQ_NONE;<br>
><br>
>  #ifdef DEBUG_PW<br>
>       pr_debug("PW Int->IPWMR: 0x%08x
IPWSR: 0x%08x (", ipwmr, ipwsr);<br>
<br>
This part is out of sync with mainline code tree (37-rc1). Probably it<br>
should be updated to make it easier to apply your patch. Besides that,<br>
works as expected on my RIO setup.<br>
<br>
<br>
<o:p></o:p></span></p>

<p style='margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>[Xie Shaohui] Ok, I’ll updated my
patch to latest kernel.<o:p></o:p></span></i></b></p>

<p style='margin-bottom:12.0pt'><b><i><span style='font-size:11.0pt;font-family:
"Calibri","sans-serif";color:#1F497D'>BTW: Something wrong with my outlook,
seems it cannot prefix  each line of original message to some specific emails,
but not all, Sorry if this cause you trouble to read my reply. </span></i></b><span
style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>

</div>

</div>

</body>

</html>