<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.3268" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=436252513-09042008><FONT face=Arial color=#0000ff 
size=2>Hi,</FONT></SPAN></DIV>
<DIV><SPAN class=436252513-09042008><FONT face=Arial color=#0000ff 
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=436252513-09042008><FONT face=Arial color=#0000ff size=2>The 
following patch adds WA for Hermon chip.</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV dir=ltr align=left><FONT face=Arial color=#0000ff size=2><EM>Thanks, 
Reuven.</EM></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT> </DIV>
<DIV>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">Index: 
tools/mtcr/user/mtcr.c<?xml:namespace prefix = o ns = 
"urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">===================================================================<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">--- 
tools/mtcr/user/mtcr.c<SPAN style="mso-tab-count: 1">    
</SPAN>(revision 1047)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+++ 
tools/mtcr/user/mtcr.c<SPAN style="mso-tab-count: 1">    
</SPAN>(working copy)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-21,33 +21,82 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define USB_DEV_NAME<SPAN 
style="mso-spacerun: yes">    
</SPAN>"mtusb-1"<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define CLEAR(st)<SPAN 
style="mso-spacerun: yes">               
</SPAN>memset(&(st), 0, sizeof(st))<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
HERMON ORDERING WA:<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_WA_BASE 0xf0384 // SEM BASE ADDR. SEM 0xf0380 is reserved for external 
tools usage.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_WA_SIZE 3<SPAN 
style="mso-spacerun: yes">       </SPAN>// Size in 
entries<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
MTCR_DEBUG_ENV "MTCR_DEBUG_LEVEL"<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-#define 
MTCR_DEBUG_ENV "MTCR_DEBUG_LEVEL"<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+/* 
<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+ 
* DLL global variables <o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+ 
*/<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#pragma 
data_seg(".sdata")<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+/* 
Process / thread count */<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+DWORD 
g_Slots[HERMON_WA_SIZE];<SPAN style="mso-tab-count: 1">     
</SPAN>/* 3 slots */<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#ifdef DBG<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>ULONG g_DebugLevel = 
DEBUG_LEVEL_MID;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#else<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>ULONG g_DebugLevel = 
DEBUG_LEVEL_LOW;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#endif<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#pragma 
data_seg()<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>//-----------------------------------------------------<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define MAX_HCA_NUM 
16<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
flags in below structure<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
FIX_ORDERING_BUG<SPAN style="mso-tab-count: 1">     
</SPAN>1<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>typedef struct mfile_ibal_t 
{<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     </SPAN>mfile<SPAN 
style="mso-spacerun: yes">            
</SPAN>s;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     </SPAN>ib_al_handle_t<SPAN 
style="mso-spacerun: yes">   </SPAN>h_al;<SPAN 
style="mso-spacerun: yes">      
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     </SPAN>ib_ca_handle_t<SPAN 
style="mso-spacerun: yes">   </SPAN>h_ca;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     </SPAN>map_crspace<SPAN 
style="mso-spacerun: yes">      
</SPAN>cr_map;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>int <SPAN 
style="mso-tab-count: 2">         
</SPAN><SPAN 
style="mso-spacerun: yes">  </SPAN>bugs;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>int <SPAN 
style="mso-tab-count: 2">         
</SPAN><SPAN 
style="mso-spacerun: yes">  </SPAN>slot_num;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>u_int32_t<SPAN 
style="mso-tab-count: 1">    </SPAN><SPAN 
style="mso-spacerun: yes">  </SPAN>hermon_wa_slot; /* apply hermon cr write 
workaround */<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>int <SPAN 
style="mso-tab-count: 2">         
</SPAN><SPAN 
style="mso-spacerun: yes">  </SPAN>hermon_wa_last_op_write;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>u_int64_t<SPAN 
style="mso-tab-count: 1">    </SPAN><SPAN 
style="mso-spacerun: yes">  
</SPAN>hermon_wa_max_retries;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>u_int64_t<SPAN 
style="mso-tab-count: 1">    </SPAN><SPAN 
style="mso-spacerun: yes">  
</SPAN>hermon_wa_num_of_writes;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>u_int64_t<SPAN 
style="mso-tab-count: 1">    </SPAN><SPAN 
style="mso-spacerun: yes">  
</SPAN>hermon_wa_num_of_retry_writes;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>} mfile_ibal;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
Return slot_num or -1 when no free slots <o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+static 
int __get_slot()<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+{<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>int i, 
prev_val;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>for (i = 0; i < 
HERMON_WA_SIZE; ++i) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>prev_val = InterlockedCompareExchange(<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>(LONG volatile* )&g_Slots[i], 0, 1 );<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>if ( prev_val ) <o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>return i;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>return 
-1;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+static 
void __put_slot(int slot_num)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+{<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>int 
prev_val;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>prev_val = 
InterlockedExchange(<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(LONG volatile* )&g_Slots[slot_num], 1 );<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>if ( !prev_val ) 
<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>DPRINT1(("Wrong semaphore %d value \n", slot_num));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>BOOL APIENTRY DllMain( HANDLE 
hModule,<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">                        
</SPAN>DWORD<SPAN style="mso-spacerun: yes">  
</SPAN>ul_reason_for_call,<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">                  
</SPAN><SPAN 
style="mso-spacerun: yes">      </SPAN>LPVOID 
lpReserved<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">                                          
</SPAN>)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>int i;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     </SPAN>char* 
pszDbgLevel;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     </SPAN>switch 
(ul_reason_for_call)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     
</SPAN>{<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-59,6 +108,9 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>if (pszDbgLevel) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>g_DebugLevel = atol(pszDbgLevel);<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>// set slot data<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>for (i = 0; i < HERMON_WA_SIZE; ++i)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>g_Slots[i] = 1;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>break;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-85,13 +137,20 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define SINAI_4X_CONF_DEV_ID<SPAN 
style="mso-spacerun: yes">                            
</SPAN>24205<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define SINAI_8X_DEV_ID<SPAN 
style="mso-spacerun: yes">                                 
</SPAN>25204<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define SINAI_8X_CONF_DEV_ID<SPAN 
style="mso-spacerun: yes">                            
</SPAN>25205<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_SDR_DEV_ID<SPAN 
style="mso-spacerun: yes">                               
</SPAN>25408<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_DDR_DEV_ID<SPAN 
style="mso-spacerun: yes">                               
</SPAN>25418<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_QDR_DEV_ID<SPAN 
style="mso-spacerun: yes">                               
</SPAN>25428<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_DDR_PCI5_DEV_ID<SPAN 
style="mso-spacerun: yes">                          
</SPAN>26418<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_QDR_PCI5_DEV_ID<SPAN 
style="mso-spacerun: yes">                          
</SPAN>26428<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+#define 
HERMON_CONF_DEV_ID<SPAN 
style="mso-spacerun: yes">                              
</SPAN>401<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define IS_CONF_DEV(dev_id)<SPAN 
style="mso-spacerun: yes">     
</SPAN>\<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">        
</SPAN>((dev_id == TAVOR_CONF_DEV_ID) <SPAN 
style="mso-spacerun: yes">   </SPAN>|| \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">         
</SPAN>(dev_id == ARBEL_TM_CONF_DEV_ID) || \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">         
</SPAN>(dev_id == ARBEL_CONF_DEV_ID)<SPAN 
style="mso-spacerun: yes">    </SPAN>|| \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">         
</SPAN>(dev_id == SINAI_4X_CONF_DEV_ID) || \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">         
</SPAN>(dev_id == SINAI_8X_CONF_DEV_ID))<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>((dev_id == TAVOR_CONF_DEV_ID)<SPAN 
style="mso-spacerun: yes">    </SPAN>|| \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == ARBEL_TM_CONF_DEV_ID) || \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == ARBEL_CONF_DEV_ID)<SPAN 
style="mso-spacerun: yes">    </SPAN>|| \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == SINAI_4X_CONF_DEV_ID) || \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == SINAI_8X_CONF_DEV_ID) || \<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == HERMON_CONF_DEV_ID))<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define MAX_DEV_NAME<SPAN 
style="mso-spacerun: yes">            
</SPAN>32<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>typedef struct {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-115,7 +174,15 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>{<SPAN style="mso-spacerun: yes">       
</SPAN>SINAI_4X_DEV_ID,<SPAN 
style="mso-spacerun: yes">        
</SPAN>"InfiniHost_III_Lx",<SPAN style="mso-spacerun: yes">    
</SPAN>MDEVS_TAVOR<SPAN style="mso-spacerun: yes">     
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>{<SPAN style="mso-spacerun: yes">       
</SPAN>SINAI_4X_CONF_DEV_ID,<SPAN style="mso-spacerun: yes">   
</SPAN>"InfiniHostBd",<SPAN 
style="mso-spacerun: yes">         
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-spacerun: yes">  
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>{<SPAN style="mso-spacerun: yes">       
</SPAN>SINAI_8X_DEV_ID,<SPAN 
style="mso-spacerun: yes">        
</SPAN>"InfiniHost_III_Lx",<SPAN style="mso-spacerun: yes">  </SPAN><SPAN 
style="mso-spacerun: yes">  </SPAN>MDEVS_TAVOR<SPAN 
style="mso-spacerun: yes">     
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">        
</SPAN>{<SPAN style="mso-spacerun: yes">       
</SPAN>SINAI_8X_CONF_DEV_ID,<SPAN style="mso-spacerun: yes">   
</SPAN>"InfiniHostBd",<SPAN 
style="mso-spacerun: yes">         
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-spacerun: yes">  
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">        
</SPAN>{<SPAN style="mso-spacerun: yes">       
</SPAN>SINAI_8X_CONF_DEV_ID,<SPAN style="mso-tab-count: 1">    
</SPAN>"InfiniHostBd", <SPAN 
style="mso-tab-count: 2">        
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-tab-count: 1">    
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>{<SPAN style="mso-tab-count: 1">     
</SPAN>HERMON_SDR_DEV_ID,<SPAN 
style="mso-tab-count: 1">      </SPAN>"ConnectX", <SPAN 
style="mso-tab-count: 2">            
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-tab-count: 1">    
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>{<SPAN style="mso-tab-count: 1">     
</SPAN>HERMON_DDR_DEV_ID,<SPAN 
style="mso-tab-count: 1">      </SPAN>"ConnectX", <SPAN 
style="mso-tab-count: 2">            
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-tab-count: 1">    
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>{<SPAN style="mso-tab-count: 1">     
</SPAN>HERMON_QDR_DEV_ID,<SPAN 
style="mso-tab-count: 1">      </SPAN>"ConnectX", <SPAN 
style="mso-tab-count: 2">            
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-tab-count: 1">    
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>{<SPAN style="mso-tab-count: 1">     
</SPAN>HERMON_DDR_PCI5_DEV_ID, "ConnectX", <SPAN 
style="mso-tab-count: 2">            
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-tab-count: 1">    
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>{<SPAN style="mso-tab-count: 1">     
</SPAN>HERMON_QDR_PCI5_DEV_ID, "ConnectX", <SPAN 
style="mso-tab-count: 2">            
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-tab-count: 1">    
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>{<SPAN style="mso-tab-count: 1">     
</SPAN>HERMON_CONF_DEV_ID, "ConnectXBd",<SPAN 
style="mso-tab-count: 2">         
</SPAN>MDEVS_TAVOR_CR<SPAN style="mso-tab-count: 1">    
</SPAN>},<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>};<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define DEVICE_DB_SIZE<SPAN 
style="mso-spacerun: yes">  </SPAN>(sizeof(db) / 
sizeof(DEVICE_DB_T))<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-123,6 +190,14 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>char *dsuffix[] = { "conf", "_cr", 
"_uar", "_ddr"};<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>#define MASKS_SIZE<SPAN 
style="mso-spacerun: yes">      </SPAN>(sizeof(dmasks) 
/ sizeof(Mdevs))<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+static 
int is_hermon(USHORT dev_id)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+{<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 1">     </SPAN>return (dev_id == 
HERMON_SDR_DEV_ID) ||<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == HERMON_DDR_DEV_ID) ||<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == HERMON_QDR_DEV_ID) ||<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == HERMON_DDR_PCI5_DEV_ID) ||<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>(dev_id == HERMON_QDR_PCI5_DEV_ID);<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>// Return: < 0 - Error.<SPAN 
style="mso-spacerun: yes">   </SPAN>> 0 - Numbern of characters 
written (including last '\0')<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>int create_mst_names_by_dev_id(USHORT 
dev_id, int dev_ix, int mask, char *name, int name_len, int 
*cnt)<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-431,8 +506,70 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
Hermon PCI ordering bug work around (in kernel):<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
Toggle bit is done using a HW semaphore. 3 slots (sems) are allocated for MST 
tools and<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
are dynamically allocated by the mst_pci.o module. 1 slot is reserved for 
external tools usage.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
This means to more than 3 tools that use the PCI dev can run 
simultaniously.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
Open:<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>If the wa is enabled 
("MTCR_HERMON_WA" env variable does NOT exist or exist and equals 
1):<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>and HERMON-A0 dev id is 
read:<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>get a vacant slot - ioctl( , 
PCI_HERMON_WA ,);<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>read the sem in the slot (to lock 
it).<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
Flush (hermon_wa_write_confirm_sem):<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>If enabled on first read after 
write:<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>write 0 to 
sem.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>read sem untlill sem = 
0;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+// 
Close/release<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<SPAN 
style="mso-spacerun: yes">   </SPAN>Zero the 
slot.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+int 
hermon_wa_write_confirm_sem(mfile* mf, u_int32_t addr) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>u_int64_t max_retries = 
0x1000000;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>u_int64_t retries = 
0;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>mfile_ibal *mfi = 
(mfile_ibal *)mf;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    
</SPAN>mfi->hermon_wa_num_of_writes++;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>// clear 
sem<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>*((u_int32_t *)((char 
*)mf->ptr + mfi->hermon_wa_slot)) = 0;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">    </SPAN>while (retries < 
max_retries) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">         
</SPAN>u_int32_t slot_value ;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">         
</SPAN>slot_value = __be32_to_cpu(*((volatile u_int32_t *)((char *)mf->ptr + 
mfi->hermon_wa_slot)));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">         
</SPAN>if (slot_value == 0) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">  </SPAN><SPAN 
style="mso-spacerun: yes">           </SPAN>// 
Good - The written value was read<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">             
</SPAN>if (retries) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                 
</SPAN>// NOT REALLY NEEDED - just to collect statistics<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                 
</SPAN>// printf("-D- Hermon WA addr %06x took %d retries\n", addr, 
retries);<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                 
</SPAN>mfi->hermon_wa_num_of_retry_writes++;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                 
</SPAN>if (retries > mfi->hermon_wa_max_retries) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                     
</SPAN>mfi->hermon_wa_max_retries = retries;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                 
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">             
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">             
</SPAN>return 4;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">         
</SPAN>} else {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">             
</SPAN>// sem is still locked from previous read - read passed the 
write<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">             
</SPAN>retries++;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">         
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">     
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">     </SPAN>DPRINT1(("-D- Hermon 
WA addr %06x failed after %ld retries\n", addr, retries));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">     </SPAN>return 
0;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+}<SPAN 
style="mso-spacerun: yes">  </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>// List devices in their MST compatible 
names.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>// Each device type is indexed 
sepetrately.<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN>//<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-629,7 +766,7 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>} else {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">                     
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">            
</SPAN>int bar_num;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">            
</SPAN>int bar_num, slot_num;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>// Type of file <o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>mf->s.tp = MST_PCI;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-649,8 +786,36 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes"> </SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>mf->s.ptr = (void*)(ULONG_PTR)mf->cr_map.va;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-tab-count: 1">     </SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">-<SPAN 
style="mso-spacerun: yes">           
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>// check whether we need to perform the workaround<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>if (is_hermon(dev_id)) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 4">                       
</SPAN>char* hermon_wa_env = getenv("MTCR_HERMON_WA");<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 4">                       
</SPAN>// if there is no env variable or it = "0" - we perform the 
workaround<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 4">                       
</SPAN>if (hermon_wa_env == NULL || strcmp(hermon_wa_env, "0")) 
{<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 5">                             
</SPAN>// perform the workaround only for A0 revision<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 5">                             
</SPAN>if (access_type == MDEVS_TAVOR_CR) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 6">                                   
</SPAN>u_int32_t rev = 0;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 6">                                   
</SPAN>mread4((mfile*)mf, 0xf0014, &rev);<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 6">                                   
</SPAN>if (rev == 0xa00190)<SPAN style="mso-spacerun: yes">  </SPAN>{ // 
TODO: Should I ignore REV here ?<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 7">                                         
</SPAN>slot_num = __get_slot();<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 7">                                         
</SPAN>if (slot_num < 0) // no free slot <o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 8">                                               
</SPAN>goto ErrExit;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 7">                                         
</SPAN>mf->bugs |= FIX_ORDERING_BUG;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 7">                                         
</SPAN>mf->slot_num = slot_num;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 6">                                   
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 5">                             
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 4">                       
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>// prepare for the workaround<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>if (mf->bugs & FIX_ORDERING_BUG) {<SPAN 
style="mso-tab-count: 1">  </SPAN>// Hermon WA setup<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 4">                       
</SPAN>DPRINT1(("-D- Hermon WA setup\n"));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 4">                       
</SPAN>mf->hermon_wa_slot = HERMON_WA_BASE + 
4*slot_num;<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 4">                       
</SPAN>hermon_wa_write_confirm_sem((mfile*)mf, 
mf->hermon_wa_slot);<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 2">           
</SPAN><SPAN 
style="mso-spacerun: yes">           
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">     </SPAN>} else if (dev_id == 
DEVASYS_DEV_ID) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>// Type of file <o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>h = usb_open();<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">@@ 
-702,6 +867,16 @@<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>if (mf->tp == MST_PCICONF) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>ibal_access(mfi->h_ca, 0x0, &stub, 4, FW_CLOSE_IF 
);<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">         
</SPAN>} else if (mf->tp = MST_PCI) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">            
</SPAN>if (mfi->bugs & FIX_ORDERING_BUG) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-tab-count: 3">                 
</SPAN>__put_slot( mfi->slot_num );<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                    
</SPAN>DPRINT1(("-D- Hermon WA stats:\n"));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                    
</SPAN>DPRINT1(("-D- : num of write flushes: %8ld\n", 
mfi->hermon_wa_num_of_writes));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">                    
</SPAN>DPRINT1(("-D- : num of retry flushes: %8ld\n", 
mfi->hermon_wa_num_of_retry_writes));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">               
</SPAN><SPAN 
style="mso-spacerun: yes">     </SPAN>DPRINT1(("-D- : 
max_retries:<SPAN 
style="mso-spacerun: yes">          
</SPAN>%8ld\n", mfi->hermon_wa_max_retries));<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<SPAN 
style="mso-spacerun: yes">            
</SPAN>}<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA">+<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">             
</SPAN>if (mfi->cr_map.size) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">                 
</SPAN><o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><SPAN 
style="mso-spacerun: yes">                 
</SPAN>if (ibal_access(mfi->h_ca, 0x0, NULL, 0, FW_UNMAP_CRSPACE ) != 
IB_SUCCESS) {<o:p></o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt; mso-layout-grid-align: none"><SPAN 
style="FONT-SIZE: 10pt; FONT-FAMILY: 'Courier New'; mso-bidi-language: AR-SA"><o:p> </o:p></SPAN></P>
<P class=MsoNormal 
style="MARGIN: 0in 0in 0pt"><o:p> </o:p></P></DIV></BODY></HTML>