[Openib-windows] [PATCH] client reregister bit and static mac for Mellanox device

Fabian Tillier ftillier at silverstorm.com
Mon Apr 24 21:53:00 PDT 2006


Hi Yossi,

On 4/24/06, Fabian Tillier <ftillier at silverstorm.com> wrote:
> Hi Yossi,
>
> On 4/24/06, Yossi Leybovich <sleybo at mellanox.co.il> wrote:
> > Fab
> >
> > While debug the IPoIB reregister I found 2 bugs:
> >
> > 1. FW bug, our latest FW does not clear the client reregister bit on
> > port_info_set response.
> > This will be fix in the coming release but meanwhile I think we should
> > add work around for the problem.
> > It will add stability to our reregister flow.
>
> Working around FW bugs belongs in the HCA driver, not in IBAL.
> Attached is a patch that fixes both the MT23108 and MTHCA drivers to
> fix the FW behavior.

I screwed up the patch I sent (it has a partial fix for the caching,
but it results in hitting asserts and handling SMPs improperly).

Her it is again, limited to only working around the FW bug.  I will
send a separate one to fix the SMP caching.

- Fab

Index: hw/mthca/kernel/hca_smp.c
===================================================================
--- hw/mthca/kernel/hca_smp.c	(revision 322)
+++ hw/mthca/kernel/hca_smp.c	(working copy)
@@ -568,6 +567,32 @@
 			status = IB_ERROR;
 			goto err_process_mad;
 		}
+
+		if( (p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR ||
+			p_mad_in->mgmt_class == IB_MCLASS_SUBN_LID) &&
+			p_mad_in->attr_id == IB_MAD_ATTR_PORT_INFO )
+		{
+			ib_port_info_t	*p_pi_in, *p_pi_out;
+
+			if( p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR )
+			{
+				p_pi_in = (ib_port_info_t*)
+					ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in );
+				p_pi_out = (ib_port_info_t*)
+					ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_out );
+			}
+			else
+			{
+				p_pi_in = (ib_port_info_t*)(p_mad_in + 1);
+				p_pi_out = (ib_port_info_t*)(p_mad_out + 1);
+			}
+
+			/* Work around FW bug 33958 */
+			p_pi_out->subnet_timeout &= 0x7F;
+			if( p_mad_in->method == IB_MAD_METHOD_SET )
+				p_pi_out->subnet_timeout |= (p_pi_in->subnet_timeout & 0x80);
+		}
+
 		mlnx_update_cache( h_ca, port_num, p_mad_out );
 	}

Index: hw/mt23108/kernel/hca_smp.c
===================================================================
--- hw/mt23108/kernel/hca_smp.c	(revision 322)
+++ hw/mt23108/kernel/hca_smp.c	(working copy)
@@ -541,6 +540,31 @@
 			goto cleanup;
 		}

+		if( (p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR ||
+			p_mad_in->mgmt_class == IB_MCLASS_SUBN_LID) &&
+			p_mad_in->attr_id == IB_MAD_ATTR_PORT_INFO )
+		{
+			ib_port_info_t	*p_pi_in, *p_pi_out;
+
+			if( p_mad_in->mgmt_class == IB_MCLASS_SUBN_DIR )
+			{
+				p_pi_in = (ib_port_info_t*)
+					ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_in );
+				p_pi_out = (ib_port_info_t*)
+					ib_smp_get_payload_ptr( (ib_smp_t*)p_mad_out );
+			}
+			else
+			{
+				p_pi_in = (ib_port_info_t*)(p_mad_in + 1);
+				p_pi_out = (ib_port_info_t*)(p_mad_out + 1);
+			}
+
+			/* Work around FW bug 33958 */
+			p_pi_out->subnet_timeout &= 0x7F;
+			if( p_mad_in->method == IB_MAD_METHOD_SET )
+				p_pi_out->subnet_timeout |= (p_pi_in->subnet_timeout & 0x80);
+		}
+
 		mlnx_update_cache( h_ca, port_num, p_mad_out );
 	}
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: fw_bug_33958.patch2
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20060424/a0ed4fc0/attachment.ksh>


More information about the ofw mailing list