<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff size=2>After
looking at this patch, there is one problem that I see:</FONT></SPAN></DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff size=2>If the
call to ipoib_set_active fails, we are already after the
lines:</FONT></SPAN></DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff
size=2> if (p_port->state == IB_QPS_INIT)
{<BR> p_port->state =
IB_QPS_RTS;<BR> }<BR></FONT></SPAN></DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff size=2>which
means that our p_port->state will likely be IB_QPS_RTS. In other
words, the next time port_up will be called it will do
nothing.</FONT></SPAN></DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff
size=2>Actually our QP is already at RTS which means that we should probably
undo more things. (move QP to error, is for sure).</FONT></SPAN></DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff size=2>I'll
look more at ipoib_port_down and see what else should be done
there.</FONT></SPAN></DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=281041117-04112008><FONT face=Arial color=#0000ff
size=2>Tzachi</DIV></FONT></SPAN><BR>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B> ofw-bounces@lists.openfabrics.org
[mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Anatoly
Greenblatt<BR><B>Sent:</B> Monday, November 03, 2008 11:46 AM<BR><B>To:</B>
ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] Emailing:
pkey_not_found.diff<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Tahoma>Hi,</FONT></DIV>
<DIV><FONT face=Tahoma></FONT> </DIV>
<DIV><FONT face=Tahoma>This patch fixes partition bug where n</FONT><FONT
face=Tahoma>etwork connection appeared as connected while pkey not yet
configured in sm.</FONT></DIV>
<DIV><FONT face=Tahoma></FONT> </DIV>
<DIV><FONT face=Tahoma>Thanks,</FONT></DIV>
<DIV><FONT face=Tahoma>Anatoly.</FONT></DIV>
<DIV><FONT face=Tahoma></FONT> </DIV>
<DIV><FONT face=Tahoma></FONT> </DIV>
<DIV><FONT face=Tahoma>Index:
ulp/ipoib/kernel/ipoib_adapter.c<BR>===================================================================<BR>---
ulp/ipoib/kernel/ipoib_adapter.c (revision 1715)<BR>+++
ulp/ipoib/kernel/ipoib_adapter.c (working copy)<BR>@@ -560,6 +560,7
@@<BR> ("Pkey table is invalid, index
not found\n"));<BR> NdisWriteErrorLogEntry(
p_adapter->h_adapter,<BR> EVENT_IPOIB_PARTITION_ERR,
1, p_adapter->guids.port_guid.pkey );<BR>+ status =
IB_NOT_FOUND;<BR> p_adapter->p_port->pkey_index =
PKEY_INVALID_INDEX;<BR> goto pkey_end;<BR> }<BR>@@
-1070,12 +1071,13
@@<BR> }<BR> <BR> <BR>-void<BR>+ib_api_status_t<BR> ipoib_set_active(<BR> IN ipoib_adapter_t*
const p_adapter
)<BR> {<BR> ib_pnp_event_t old_state;<BR> uint8_t i;<BR>+ ib_api_status_t status
= IB_SUCCESS;<BR> <BR> IPOIB_ENTER( IPOIB_DBG_INIT
);<BR> <BR>@@ -1104,8 +1106,11
@@<BR> <BR> default:<BR> if
(p_adapter->guids.port_guid.pkey !=
IB_DEFAULT_PKEY)<BR>- ipoib_query_pkey_index(p_adapter);<BR>-<BR>+ {<BR>+ status
= ipoib_query_pkey_index(p_adapter);<BR>+ if( IB_SUCCESS !=
status)<BR>+ break;<BR>+ }<BR> /*
Join all programmed multicast groups. */<BR> for( i = 0; i
< p_adapter->mcast_array_size; i++ )<BR> {<BR>@@
-1143,6 +1148,7 @@<BR> }<BR> <BR> IPOIB_EXIT(
IPOIB_DBG_INIT
);<BR>+ return status;<BR> }<BR> <BR> <BR>Index:
ulp/ipoib/kernel/ipoib_adapter.h<BR>===================================================================<BR>---
ulp/ipoib/kernel/ipoib_adapter.h (revision 1715)<BR>+++
ulp/ipoib/kernel/ipoib_adapter.h (working copy)<BR>@@ -413,7 +413,7
@@<BR> IN const uint8_t link_speed
);<BR> <BR> <BR>-void<BR>+ib_api_status_t<BR> ipoib_set_active(<BR> IN ipoib_adapter_t*
const p_adapter );<BR> <BR>Index:
ulp/ipoib/kernel/ipoib_port.c<BR>===================================================================<BR>---
ulp/ipoib/kernel/ipoib_port.c (revision 1715)<BR>+++
ulp/ipoib/kernel/ipoib_port.c (working copy)<BR>@@ -5770,7 +5770,17
@@<BR> cl_spinlock_release( &p_port->recv_lock
);<BR> <BR> /* Notify the adapter that we now have an active
connection. */<BR>- ipoib_set_active( p_port->p_adapter
);<BR>+ status = ipoib_set_active( p_port->p_adapter );<BR>+ if(
status != IB_SUCCESS )<BR>+ {<BR>+ ipoib_set_inactive(
p_port->p_adapter );<BR>+ __endpt_mgr_reset_all( p_port
);<BR>+ KeSetEvent( &p_port->sa_event, EVENT_INCREMENT,
FALSE );<BR>+ IPOIB_PRINT_EXIT( TRACE_LEVEL_INFORMATION,
IPOIB_DBG_INIT,<BR>+ ("ipoib_set_active returned
%s.\n",p_port->p_adapter->p_ifc->get_err_str( status
)));<BR>+ ipoib_port_deref( p_port, ref_join_bcast
);<BR>+ return;<BR>+ }<BR> <BR> /* garbage
collector timer is needed when link is active
*/<BR> gc_due_time.QuadPart =
-(int64_t)(((uint64_t)p_port->p_adapter->params.mc_leave_rescan *
2000000) * 10);<BR></FONT></DIV></BLOCKQUOTE></BODY></HTML>