<!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.6000.16587" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=972004920-05052008><FONT face=Arial size=2>Here is the Linux
description of the patch named: mlx4_0270_fmr_enable.patch</FONT></SPAN></DIV>
<DIV><BR><FONT face=Arial size=2>mlx4_table_find (for fmr mpt's) requires that
ICM memory already<BR>be mapped. Before this fix, fmr allocation depended
on ICM memory<BR>already being mapped for the mpt entry. If all currently
mapped<BR>entries are taken, the find operation fails (even if the ICM
mpt<BR>table still had more entries, which were as yet unmapped).</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This fix moves the mpt find operation to
fmr_enable, to guarantee<BR>that any required ICM memory mapping has already
occurred.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Found by: Oren Duer of Mellanox</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Signed-off-by: Jack Morgenstein <</FONT><A
href="mailto:jackm@dev.mellanox.co.il"><FONT face=Arial
size=2>jackm@dev.mellanox.co.il</FONT></A><FONT face=Arial
size=2>><BR></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>Bellow is the
windows porting of the patch.</FONT></SPAN></FONT></DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>Important
info: This patch was tested using a specific fmr tests. SRP which also used fmr
was not tested. I'll be very happy if one can test
that.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=972004920-05052008></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN
class=972004920-05052008>Thanks</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=972004920-05052008>Tzachi</SPAN></FONT></DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial
size=2></FONT></SPAN></FONT> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>Index:
mlx4/kernel/bus/ib/mr.c</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial
size=2>===================================================================</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>---
mlx4/kernel/bus/ib/mr.c (revision 1126)</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>+++
mlx4/kernel/bus/ib/mr.c (working copy)</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>@@ -198,7
+198,7 @@</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2> if
(err)<BR> goto err_free;<BR> <BR>- err =
mlx4_mr_enable(to_mdev(pd->device)->dev,
&fmr->mfmr.mr);<BR>+ err =
mlx4_fmr_enable(to_mdev(pd->device)->dev,
&fmr->mfmr.mr);<BR> if (err)<BR> goto
err_mr;<BR> <BR>Index: mlx4/kernel/bus/net/mr.c</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial
size=2>===================================================================</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>---
mlx4/kernel/bus/net/mr.c (revision 1126)</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>+++
mlx4/kernel/bus/net/mr.c (working copy)</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial size=2>@@ -576,14
+576,6 @@</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial
size=2> err = -ENOMEM;<BR> goto
err_free;<BR> }<BR>-<BR>- fmr->mpt =
mlx4_table_find(&priv->mr_table.dmpt_table,<BR>-
key_to_hw_index(fmr->mr.key), NULL);<BR>- if (!fmr->mpt)
{<BR>- err = -ENOMEM;<BR>- goto
err_free;<BR>- }<BR>-<BR> return
0;<BR> <BR> err_free:<BR>@@ -594,7 +586,19
@@</FONT></SPAN></FONT></DIV>
<DIV> </DIV>
<DIV><FONT><SPAN class=972004920-05052008><FONT face=Arial
size=2> <BR> int mlx4_fmr_enable(struct mlx4_dev *dev, struct mlx4_fmr
*fmr)<BR> {<BR>- return mlx4_mr_enable(dev,
&fmr->mr);<BR>+ struct mlx4_priv *priv =
mlx4_priv(dev);<BR>+ int err;<BR>+<BR>+ err = mlx4_mr_enable(dev,
&fmr->mr);<BR>+ if (err)<BR>+ return
err;<BR>+<BR>+ fmr->mpt =
mlx4_table_find(&priv->mr_table.dmpt_table,<BR>+
key_to_hw_index(fmr->mr.key), NULL);<BR>+ if
(!fmr->mpt)<BR>+ return -ENOMEM;<BR>+<BR>+ return
0;<BR> }<BR> EXPORT_SYMBOL_GPL(mlx4_fmr_enable);<BR></FONT></SPAN></DIV></FONT></BODY></HTML>