<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.6001.18702"></HEAD>
<BODY>
<DIV><SPAN class=371204316-17092009><FONT color=#0000ff size=2 
face=Arial>Committed on 2443.</FONT></SPAN></DIV>
<DIV><SPAN class=371204316-17092009><FONT color=#0000ff size=2 
face=Arial></FONT></SPAN> </DIV>
<DIV><SPAN class=371204316-17092009><FONT color=#0000ff size=2 
face=Arial>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=371204316-17092009><FONT color=#0000ff size=2 
face=Arial>Tzachi</FONT></SPAN></DIV><BR>
<BLOCKQUOTE 
style="BORDER-LEFT: #0000ff 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px" 
dir=ltr>
  <DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
  <HR tabIndex=-1>
  <FONT size=2 face=Tahoma><B>From:</B> ofw-bounces@lists.openfabrics.org 
  [mailto:ofw-bounces@lists.openfabrics.org] <B>On Behalf Of </B>Tzachi 
  Dar<BR><B>Sent:</B> Wednesday, September 16, 2009 6:29 PM<BR><B>To:</B> 
  ofw@lists.openfabrics.org<BR><B>Subject:</B> [ofw] PATCH: Fix Support for APM 
  on the low level drivers<BR></FONT><BR></DIV>
  <DIV></DIV>
  <DIV><FONT size=1>
  <P><FONT size=2 face=Arial><SPAN class=762132615-16092009>Signed off by: <A 
  href="mailto:leonid@mellanox.co.il">leonid@mellanox.co.il</A></SPAN></FONT></P>
  <P><FONT size=2 face=Arial>[HW] fixes to APM support: missed some lines and 
  apm_state was not converted into low-driver format</FONT></P>
  <P><FONT size=2 face=Arial>Index: 
  Q:/projinf4/trunk/hw/mlx4/kernel/hca/data.c<BR>===================================================================<BR>--- 
  Q:/projinf4/trunk/hw/mlx4/kernel/hca/data.c (revision 4811)<BR>+++ 
  Q:/projinf4/trunk/hw/mlx4/kernel/hca/data.c (revision 4812)<BR>@@ -551,6 
  +551,14 @@<BR>  return ib_qps;<BR> }<BR> <BR>+enum 
  ib_mig_state to_apm_state(ib_apm_state_t apm)<BR>+{<BR>+ if (apm == 
  IB_APM_MIGRATED) return IB_MIG_MIGRATED;<BR>+ if (apm == IB_APM_REARM) 
  return IB_MIG_REARM;<BR>+ if (apm == IB_APM_ARMED) return 
  IB_MIG_ARMED;<BR>+ return 
  0xffffffff;<BR>+}<BR>+<BR> ib_api_status_t<BR> to_qp_attr(<BR>  IN  
  const struct ib_qp *p_ib_qp,<BR>@@ -794,7 +802,7 
  @@<BR>     // 
  IB_QP_PATH_MIG_STATE<BR>     if 
  (p_ib_qp_mod->state.rts.opts & IB_MOD_QP_APM_STATE) 
  {<BR>      *p_qp_attr_mask |= 
  IB_QP_PATH_MIG_STATE; <BR>-     p_ib_qp_attr->path_mig_state 
  =  
  p_ib_qp_mod->state.rts.apm_state;<BR>+     p_ib_qp_attr->path_mig_state 
  =  
  to_apm_state(p_ib_qp_mod->state.rts.apm_state);<BR>     }<BR> <BR>     // 
  IB_QP_ACCESS_FLAGS<BR>@@ -812,7 +820,8 
  @@<BR>       status = 
  IB_ERROR;<BR>       break;<BR>      }<BR>-     p_ib_qp_attr->alt_timeout   
  = p_ib_qp_mod->state.rts.alternate_av.conn.local_ack_timeout; // XXX: 
  conv<BR>+     p_ib_qp_attr->alt_timeout  = 
  p_ib_qp_mod->state.rts.alternate_av.conn.local_ack_timeout; // XXX: 
  conv<BR>+     p_ib_qp_attr->alt_port_num  = 
  p_ib_qp_mod->state.rts.alternate_av.port_num;<BR>     }<BR>     break;<BR>     <BR>@@ 
  -841,7 +850,7 @@<BR>     // 
  IB_QP_PATH_MIG_STATE<BR>     if 
  (p_ib_qp_mod->state.rts.opts & IB_MOD_QP_APM_STATE) 
  {<BR>      *p_qp_attr_mask |= 
  IB_QP_PATH_MIG_STATE; <BR>-     p_ib_qp_attr->path_mig_state 
  =  
  p_ib_qp_mod->state.rts.apm_state;<BR>+     p_ib_qp_attr->path_mig_state 
  =  
  to_apm_state(p_ib_qp_mod->state.rts.apm_state);<BR>     }<BR> <BR>     // 
  IB_QP_ACCESS_FLAGS<BR>@@ -859,6 +868,8 
  @@<BR>       status = 
  IB_ERROR;<BR>       break;<BR>      }<BR>+     p_ib_qp_attr->alt_timeout  = 
  p_ib_qp_mod->state.rts.alternate_av.conn.local_ack_timeout; // XXX: 
  conv<BR>+     p_ib_qp_attr->alt_port_num  = 
  p_ib_qp_mod->state.rts.alternate_av.port_num;<BR>     }<BR>     break;<BR>      <BR>Index: 
  Q:/projinf4/trunk/hw/mthca/kernel/hca_data.c<BR>===================================================================<BR>--- 
  Q:/projinf4/trunk/hw/mthca/kernel/hca_data.c (revision 4811)<BR>+++ 
  Q:/projinf4/trunk/hw/mthca/kernel/hca_data.c (revision 4812)<BR>@@ -409,6 
  +409,14 @@<BR>  return qps;<BR> }<BR> <BR>+enum 
  ib_mig_state to_apm_state(ib_apm_state_t apm)<BR>+{<BR>+ if (apm == 
  IB_APM_MIGRATED) return IB_MIG_MIGRATED;<BR>+ if (apm == IB_APM_REARM) 
  return IB_MIG_REARM;<BR>+ if (apm == IB_APM_ARMED) return 
  IB_MIG_ARMED;<BR>+ return 
  0xffffffff;<BR>+}<BR>+<BR> ib_api_status_t<BR> mlnx_conv_qp_modify_attr(<BR>  IN  
  const struct ib_qp *ib_qp_p,<BR>@@ -644,7 +652,7 
  @@<BR>     // 
  IB_QP_PATH_MIG_STATE<BR>     if 
  (modify_attr_p->state.rts.opts & IB_MOD_QP_APM_STATE) 
  {<BR>      *qp_attr_mask_p |= 
  IB_QP_PATH_MIG_STATE; <BR>-     qp_attr_p->path_mig_state 
  =  
  modify_attr_p->state.rts.apm_state;<BR>+     qp_attr_p->path_mig_state 
  =  
  to_apm_state(modify_attr_p->state.rts.apm_state);<BR>     }<BR> <BR>     // 
  IB_QP_ACCESS_FLAGS<BR>@@ -691,7 +699,7 @@<BR>     // 
  IB_QP_PATH_MIG_STATE<BR>     if 
  (modify_attr_p->state.rts.opts & IB_MOD_QP_APM_STATE) 
  {<BR>      *qp_attr_mask_p |= 
  IB_QP_PATH_MIG_STATE; <BR>-     qp_attr_p->path_mig_state 
  =  
  modify_attr_p->state.rts.apm_state;<BR>+     qp_attr_p->path_mig_state 
  =  
  to_apm_state(modify_attr_p->state.rts.apm_state);<BR>     }<BR> <BR>     // 
  IB_QP_ACCESS_FLAGS<BR></FONT></P></FONT></DIV></BLOCKQUOTE></BODY></HTML>